|
||||||||||||||||
|
Porting Compaq Visual Fortran 6.6 projects to MS Visual Studio .NET 2003
|
|
|
The CTC is in the process of phasing out Microsoft Visual Studio 6. Once this occurs, Compaq Visual Fortran will no longer be available. It will be replaced with the Intel 8.1 Fortran compiler, which is integrated into Microsoft Visual Studio .NET 2003. This document will provide a guide to converting Compaq Visual Fortran 6.6 projects to Intel Fortran in Visual Studio .NET 2003. It pertains only to Visual Studio. The steps listed work for both serial and parallel codes. If you use the command-line implementation of Fortran, it does not apply to you. The advantage of converting your project, rather than rebuilding it from scratch, is that you will not need to redo the steps involved in creating a new project.
As the first project conversion, use the default "Hello World" project to make sure that you understand the procedure. Use either ctclogin1 or ctclogin4, the two login nodes that still have Visual Studio 6. To build such a project, open Visual Studio 6 and navigate File | New | Projects | Fortran Console Application. Supply a project name and location. Then click OK. Select A "Hello World" sample project. Then Finish and OK. The new project is open. Build the project and execute it. The output in a new command window should be Hello World.
As a precaution, make a backup copy of your projects before you convert them. Do this both for the Hello World project and your research projects.
Comparison of Intel 8.1 Fortran with Compaq Fortran
Allocation of variables
Compaq Fortran's default behavior is /Qsave, static allocation of variables. The Intel 8.1 Fortran default is /Qauto, which makes all local variables automatic. If your program ran correctly with Compaq, but generated the following error message with Intel, "forrtl: severe (157): Program Exception - access violation", try using the /Qsave flag.
Stack size
The maximum amount of data that can be put on the stack may be different and possibly insufficient. If you encounter the following runtime message,"forrtl: severe (170): Program Exception - stack overflow", then you need to increase the space on the stack. You do this by setting the option /F<n>, where n is the number of bytes. (The Intel compiler passes this option to the linker.) The default is 1048576 bytes, or 1 MByte. If you have any questions, please send electronic mail to consult@tc.cornell.edu or call (607) 254-8686 and press 2 to speak to a consultant. |
|
![]() |
||