HPC FAQ - Compiling and Linking

Supercomputer documentation is always a work in progress! Please email questions, corrections, or suggestions to the HPC support team at help-hpc@uky.edu as usual. Thanks!

Frequently Asked Questions

1. What compilers should I use?

The Intel compilers is the compilers of choice for most applications. Use icc for c and c++ programs and ifort for fortran 77 and 90 programs. Add the --help option to one of these to get more information. For example:

ifort --help

2. What versions of the Intel compilers are available?

At this writing version 11.1 is current the default for all of the Intel compilers. You don't need to do anything special to use that version of any of them. Older and newer versions are sometimes installed for testing or other special special purposes. Use the command module avail to see all of the modules available, or the command module avail icc command to see just the icc modules. For example:

$ module avail icc
--------------- /usr/share/Modules/modulefiles --------------
icc/10.1 icc/11.1(default) icc/12.0 icc/12.0.3

If module avail shows that version icc/10.1 is available, then load it with the command module load icc/10.1/default command at the beginning of your session to make it the default for the rest of your session.

3. How do I compile with the Open MPI libraries?

OpenMPI is the MPI of choice for most applications, and it is is the default. Use mpicc for c programs, mpiCC for c++, mpif77 for Fortran 77, and mpif90 for Fortran 90.

4. How do I compile with the Intel MPI libraries?

If you need the Intel MPI libraries, load them at the beginning of your session with the module command. Use the module avail command to see all of the modules available, or the command module avail mpi/intel command to see just the mpi/intel modules. For example:

$ module avail mpi/intel
--------------- /usr/share/Modules/modulefiles ---------------
mpi/intel/3.0 mpi/intel/3.1 mpi/intel/3.2

If module avail shows that version mpi/intel/3.2 is available, then load it with the module load mpi/intel/3.2/default command at the beginning of your session to make it the default for the rest of your session. Use mpiicc and mpiifort to compile the programs, as before.

5. Is there any more documentation on the compilers?

There is a lot of documentation on the Intel web site. These might be useful:

Intel© C++ Compiler User and Reference Guides

Intel© Fortran Compiler User and Reference Guides

6. Is there any documentation on the Intel Math Kernel Library (IMKL)?

There is a lot of documentation on the Intel web site. This might be useful:

Intel© Math Kernel Library Documentation.

7. How can I find out what library dependencies an application has?

Use the ldd command. To see the ldd online manual use the man ldd command.

8. Are the GNU compilers available?

Yes. You can use gcc to compile c and c++ programs and gfortran for fortran 77 Fortran 95.

A short help text will be displayed by the gcc --help or gfortran --help commands.

More extensive documentation is in the online manual. Use the man gcc or man gfortran commands.

Documentation can also be found at http://gcc.gnu.org/onlinedocs/.

859-218-HELP (859-218-4357) 218help@uky.edu