Using the Intel Fortran Compiler on Mace01
- Version 10 of the Intel compiler is installed on Mace01. If there is demand this can be upgraded to Version 11.
- Code may be compiled on the login node, but aside from 'very' short test runs (e.g., one minute), executables must always be run by submitting to the batch system. SGE.
To use the Intel compiler, first add appropriate entries to your environment
export PATH=$PATH:/opt/intel/fce/10.1.012/bin/ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/fce/10.1.012/lib/
so that the compiler itself, and also required libraries, can be found. Then, to compile a source file hello.f90 into an executable binary
ifort hello.f90 -o hello
Submitting an Executable to the Batch System SGE
To submit the executable binary hello to the batch system, first create a qsub script (by using your favourite editor) like this
#!/bin/bash #$ -S /bin/bash #$ -cwd #$ -q serial.q export PATH=$PATH:/opt/intel/fce/10.1.012/bin/ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/fce/10.1.012/lib/ ./hello
and then, assuming your save the above script as hello.qsub, send the job to SGE by entering
prompt> qsub hello.qsub