FAQ: Compilers

  1. How do I select a compiler?
  2. Which compiler should I use?
  3. How do I select PGI compiler?
  4. How do I link lapack and/or blas libraries with PGI?
  5. How do I link lapack and/or blas libraries with Intel Compiler?

Q: How do I select a compiler?

A: The default compiler is Intel 7.1. You do not have to to anything special to set your environment to use this compiler. If you wish to use Intel 8.0 or Portland Group, you need to source one of the following files before you build your application.

For Portland Group:

. /usr/local/bin/pgsettings.sh. (for bash or ksh)
source /usr/local/bin/pgsettings.csh (for tcsh)

For Intel 8.0:

. /usr/local/bin/i80settings.sh (for bash or ksh)
source /usr/local/bin/i80settings.csh (for tcsh)

NOTE: As of October 10th, 2004, the Intel 8.0 compiler has a bug when vectorizing code. Vectorizing is required to make models run as fast as possible, so we do not recommend that this compiler be used at this time. The bug does not affect all codes, but we cannot guarantee what codes it does affect. We know that it does affect RUC20 and WRF, but it does not affect MM5. If you want or need to use the Intel 8.0 compiler, but want to know how to test your application to see if it will work ok, please email hpcshelp.fsl@noaa.gov for assistance.

Top

Q: Which compiler should I use?

A: It depends on your code and how it is maintained. The Intel compiler generates code that is usually 20-30% faster than the Portland Group compiler. However, some of the options are different and it has a little different behavior that PGI. For some codes this could make a difference.

Top

Q: How do I select PGI compiler? ?

A:
# module unload intel
# module load pgi/7.1-3

Top

Q: How do I link lapack and/or blas libraries with PGI?

A: -llapack -lblas (order does matter)

Top

Q: How do I link lapack and/or blas libraries with Intel Compiler?

A: -lmkl

Top

 

Last Updated 21Jul08