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 C using Intel Compiler (CLL6I23DCL)
Overview
This is the C version of the NAG library. Run the following module commands to load the environment for the Intel Compiler and the relevant NAG library
module load compilers/intel/c/12.0.5 module load libs/intel/nag/c_mark23_intel
This will set the following environment variable for easy access to the libraries, header files and example scripts:
NAG_HOME_CLL6I23DCL=/opt/gridware/libs/intel/nag/cll6i23dcl
Compiling the example programs
The NAG library ships with example programs for every routine available. The directory
$NAG_HOME_CLL6I23DCL/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:
- nagc_example_mkl, to link with the NAG static library libnagc_mkl.a and the supplied MKL libraries
- nagc_example_shar_mkl, to link with the NAG shareable library libnagc_mkl.so and the supplied MKL libraries
- nagc_example, to link with the NAG self-contained static library libnagc_nag.a
- nagc_example_shar, to link with the NAG self-contained shareable library libnagc_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 a00aac using the NAG static library libnagc_mkl.a and the NAG-supplied MKL libraries you would run
nagc_example_mkl a00aac
The output from this script is
Copying a00aace.c to current directory cp /software/libs/intel/nag/cll6i23dcl/examples/source/a00aace.c . Compiling and linking a00aace.c to produce executable a00aace.exe icc a00aace.c -I/software/libs/intel/nag/cll6i23dcl/include -m64 \ /software/libs/intel/nag/cll6i23dcl/lib/libnagc_mkl.a -Wl,--start-group \ /software/libs/intel/nag/cll6i23dcl/mkl_intel64/libmkl_intel_ilp64.a \ /software/libs/intel/nag/cll6i23dcl/mkl_intel64/libmkl_intel_thread.a \ /software/libs/intel/nag/cll6i23dcl/mkl_intel64/libmkl_core.a \ -Wl,--end-group -openmp -lpthread -lm -o a00aace.exe Running a00aace.exe ./a00aace.exe > a00aace.r
Among other things, the above shows you the form of the icc command that NAG recommend for this usage case. The output from running the example will be contained in the file 00aace.r
To submit and run the above job on CSF you might use the following submission script
#!/bin/bash #$ -S /bin/bash #$ -N NAGExample #$ -cwd #$ -o outputfile.log #$ -j y #$ -V ./a00aace.exe > a00aace.r
CLL6I23DCL User’s note – detailed library usage notes from NAG
Mark 23 C Library Manual – Includes details of all routines