Computational Science Community Wiki

Using the Intel Fortran Compiler on Mace01

Compilation

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