GNU Compiler Collection and Intel Compiler Suite
If you do not have a specific reason to need the Intel brand compilers, we strongly recommend you use the free, open source GNU Compiler Collection — “GCC”. (It is actually a whole collection of compilers, not just a C compiler anymore.) GCC includes many compilers including C, C++, Fortran 77 and 90, and Java. GCC is very standard and works extremely well. It comes standard with just about all versions of Linux. In ENG, we only provide support for BU Linux, on the ENG-Grid by following the instructions at Grid Instructions, or directly on your own computer by following the instructions at http://linux.bu.edu . GCC with GFORTRAN is also easy to install on Windows, following the instructions at http://approximatrix.com/articles/setting-up-gnu-gfortran-on-windows-xp . In addition to the default version of gcc, we have newer versions installed at /ad/eng/support/software/linux/all/x86_64/gcc . Be sure to export your PATH and LD_LIBRARY_PATH accordingly when using these versions.
If you do need the Intel-brand compilers, we have two types of floating licenses for the Intel Compiler Suite Professional which includes both the FORTRAN and C/C++ compiler along with tools, math libraries etc. They’re accessible via the BU AFS network file system.
Teaching/Classroom Related Use
For teaching and classroom-related use, Intel has granted us a large pool of floating licenses. Please do NOT use the research licenses for classes (we don’t have enough of them!) and do NOT use the teaching licenses for grant research (it violates Intel’s terms of service!)
To use a license from the teaching license pool, load the module, and then simply run icc or whichever program you need:
module load intel-c++
Research Related Use
For research, you should be using the research licenses, for which there are only a few simultaneous floating shared licenses paid for by the labs that use them. Additional users can try them, but if you choose to continue using them, you will need to contribute money towards the purchase of more license seats for the pool. The floating research licenses currently cost on the order of $1700 per simultaneous-use license.
Please login to the following page to view the procedure for using the research license. If you do not have access please email enghelp@bu.edu and request it.
Brief demonstration
1. Copy these lines to a file named “hello_world.f90”:
program hello print *,"Hello World!" end program hello
2. Run “source /ad/eng/support/software/linux/all/x86_64/Intel/bin/iccvars.sh intel64”, and run “export INTEL_LICENSE_FILE=/ad/eng/support/software/linux/all/x86_64/Intel/licenses” if using the teaching license pool.
3. Execute: “ifort hello_world.f90 -o hello_world”
4. Test the program with: “./hello_world”
Example commands/output:
> ifort hello_world.f90 -o hello_world > ./hello_world Hello World!
Notes:
a. Regular users should put both the “source” line and if applicable, the “export” line in their ~/.bashrc file so that it is sourced every time they log in. The environment variables set by the “ifortvars.sh” script are necessary for both for compiling and running (unless linked statically).
b. The command “ifort -fast” will generally produce good code.
c. Putting “export OMP_NUM_THREADS 4” (or similar) in their ~/.bashrc fileswill aid in using the automatic parallelization features.