There are two compiler suites supported by NSC on Triolith, Intel and the GNU compiler collection. Other compilers may be installed and made accessible in due course, but support will be restricted to Intel and GNU for the foreseeable future. The two compiler suites are wrapped by NSC to provide some extra compiler flags and environment variables in addition to native compiler options. These extra flags can help users in the compilation and running of codes. Usage of these flags are recommended by NSC. For more details about how to compile please see triolith compiler guide.
Please contact NSC Support if you have any questions or problems.
The current version is v–1.2.7.p2
Triolith compilers are available via the modules. Below are few examples of loading compiler modules.
To load intel compilers use:
module load intel/12.1.4
To load gnu compilers use:
module load gcc/4.7.2
When a compiler module is loaded the NSC wrapped compiler wrapper is available in the PATH.
NSC supported compilers have few additional features through compiler wrapper. These are few additional compiler flags and embedding library paths in binary (rpathing).
The compiler wrapper flags are
-NmpiAdds the appropriate MPI libraries to compile and link MPI codes.
-NmklAdds the appropriate Intel mkl library paths (but not the library itself).
-NverboseExtra verbosity about compiler wrapper.
-NhelpDisplay the help information.
The compiler flags can be passed through command line or through the environment variable
Few examples are:
gcc -Nmpi mpicode.c icc -Nmkl -mkl=serial mklcode.c
NSC_COMPILER_FLAG : alternative for command line flags
export NSC_COMPILER_FLAG="-Nverbose -Nmpi" icc mpicode.c
NSC_LD_FLAG : controls how the library paths are rpthed in the binary.
1rpath libraries in the /software/ (default)
2rpath libraries in all folders
In the following example no rpathing will be done
export NSC_LD_FLAG=0 gcc -Nmpi -L/software/apps/lib1/ -llib1 -L/home/cbasu/lib2 -llib2 test.c
In the following example only the library under /software/apps/lib1 will be rpathed
export NSC_LD_FLAG=1 gcc -Nmpi -L/software/apps/lib1/ -llib1 -L/home/cbasu/lib2 -llib2 test.c
In the following example both the library path will be rpathed
export NSC_LD_FLAG=2 gcc -Nmpi -L/software/apps/lib1/ -llib1 -L/home/cbasu/lib2 -llib2 test.c
NSC_LD_EXTRA_LIBPATH : A colon separated list of additional paths for rpathing. If NSC_LD_FLAG is set to 0 this flag will be ignored.