Compilers

Q: Where is nmake?
A: C:\Program Files\Microsoft Visual Studio\VC98\bin\nmake. Call setup_visualc.bat  

Q: How can you find the cl compiler?
A: Call setup_visualc.bat  

Q: forrtl: severe (157): Program Exception - access violation
A: Segmentation fault. Look for a place where writing more than declared.  

Q: Trouble with stack overflow in a Compaq Visual Fortran program.
A: Increase the stack reserve quota, through a flag to nmake or using editbin.

Q: Intel 8.1 compiler gives stack overflow. Intel 7.1 fine. What to do? 0: forrtl: severe (170): Program Exception - stack overflow
A: Increase the space available on the stack with the flag /F, where is the size of the stack in bytes. The default is 1000000. Try /F10000000. Increase as necessary.

Q: Can't find uuid.lib.
A: It's in C:\Program Files\Microsoft SDK\lib on the login nodes.

Q: LINK fatal error LNK1201: error writing to program database H:\users\...\some.pdb; check for insufficient disk space, invalid path, or insufficient privilege.
A: Suspicion is that there is an older version of the file some.pdb.  Delete that file and rebuild.

Q: How do I use Intel Fortran at the command line?
A: First, call setup_intelf32.bat.  The compilation command is ifort.

Q: What is the command line syntax to compile with OpenMP?
A: See the info provided by "ifort -h". There are 4 options beginning with /Qopenmp.

Q: Does the CTC have a tutorial on OpenMP with Fortran?
A: No, we don't.  The focus is on MPI.

Q: Getting convergence errors with Intel 8.1 Fortran with /O1, /O2, /O3.  Answer comes out OK. Performance not obviously degraded. How can I fix this so that I don't get the errors?
A: Add /Op flag to enable better floating point precision.  The convergence errors disappear.

Q: I would like to debug an optimized Intel Fortran code, compiled with a flag such as /O2 , created either as a Release version in Visual Studio (VS) or at a command prompt.  A Debug version in VS sets the correct debugging flags, but disables optimization. How do I set the appropriate debugging environment for a Release version in VS or at a command prompt?
A: Add the command-line flags /Zi /debug:full /traceback.  Specify the linker option /pdbfile:filename.pdb to create the program database file.  This file and the executable must be copied to the same directory on T: when you run the program.

Q:  Can the Intel C compiler handle makefile dependencies without having to use cygwin's makedepend?

A:  Yes.  You can use the /QMM compiler option, which is OFF by default.

/QM
Generates makefile dependency lines for each source file, based on the #include lines found in the source file.
/QMD
Preprocess and compile. Generate output file (.d extension) containing dependency information.
/QMF file
Generate makefile dependency information in file. Must specify /QM or /QMM.
/QMG
Similar to /QM, but treats missing header files as generated files.
/QMM
Similar to /QM, but does not include system header files.
/QMMD
Similar to /QMD, but does not include system header files.