The CSF2 has been replaced by the CSF3 - please use that system! This documentation may be out of date. Please read the CSF3 documentation instead. To display this old CSF2 page click here. |
Mark 23 Fortran using Intel Compiler (FLL6I23DC)
This is the serial (single core) version of the NAG Fortran library. Run the following module commands to load the environment for the Intel Compiler and the relevant NAG library
module load compilers/intel/fortran/12.0.5 module load libs/intel/nag/fortran_mark23_intel
This will set the following environment variable for easy access to the libraries, header files and example scripts:
NAG_HOME_FLL6I23DC=/opt/gridware/libs/intel/nag/fll6i23dcl
Compiling the example programs
The NAG library ships with example programs for every routine available. The directory
$NAG_HOME_FLL6I23DC/scripts/
contains four scripts:
nag_example_mkl nag_example_shar_mkl nag_example nag_example_shar
which provide easy to use interfaces to compile, link and run each of these examples. This scripts directory is added to your PATH environment variable for convenience. The differences between these scripts are shown below:
- nag_example_mkl, to link with the NAG static library libnag_mkl.a and the supplied MKL libraries
- nag_example_shar_mkl, to link with the NAG shareable library libnag_mkl.so and the supplied MKL libraries
- nag_example, to link with the NAG self-contained static library libnag_nag.a
- nag_example_shar, to link with the NAG self-contained shareable library libnag_nag.so
These can be used to inform you how to compile the NAG library according to your needs. For example, to compile,link and run the example for the routine c02aff using the NAG static library libnag_mkl.a and the NAG-supplied MKL libraries you would run
nag_example_mkl c02aff
The output from this script is
Copying c02affe.f90 to current directory cp /opt/gridware/libs/intel/nag/fll6i23dcl/examples/source/c02affe.f90 . export LD_LIBRARY_PATH=/opt/gridware/libs/intel/nag/fll6i23dcl/mkl_intel64:/opt/gridware/libs/intel/nag/fll6i23dcl/lib:/opt/gridware/compilers/intel/2011.5.220/composerxe-2011.5.220/compiler/lib/intel64 Compiling and linking c02affe.f90 to produce executable c02affe.exe ifort -I/opt/gridware/libs/intel/nag/fll6i23dcl/nag_interface_blocks c02affe.f90 \ /opt/gridware/libs/intel/nag/fll6i23dcl/lib/libnag_mkl.a -Wl,--start-group \ /opt/gridware/libs/intel/nag/fll6i23dcl/mkl_intel64/libmkl_core.a \ /opt/gridware/libs/intel/nag/fll6i23dcl/mkl_intel64/libmkl_intel_lp64.a \ /opt/gridware/libs/intel/nag/fll6i23dcl/mkl_intel64/libmkl_intel_thread.a \ -Wl,--end-group -liomp5 -lpthread -o c02affe.exe Copying c02affe.d to current directory cp /opt/gridware/libs/intel/nag/fll6i23dcl/examples/data/c02affe.d . Running c02affe.exe with data from c02affe.d ./c02affe.exe < c02affe.d > c02affe.r
Among other things, the above shows you the form of the ifort command that NAG recommend for this usage case. The output from running the example will be contained in the file c02affe.r
Submitting an example job
To run the c02affe.exe example compiled above on the CSF, you could use the following SGE submission script
#$ -S /bin/bash #$ -N NAGExample #$ -cwd #$ -o outputfile.log #$ -j y #$ -V ./c02affe.exe < c02affe.d > c02affe.r