#%Module1.0
#
# intel compiler module 19.1.3
#

conflict compiler

set BASE_PREFIX /opt/hlrs/non-spack
set RELEASE 2022-02   
set CAT compiler
set PACKAGE intel
set COMP_VERSION 19.1.3
set VERSION 19.1.3.304/compilers_and_libraries_2020.4.304/linux
set GCC_VERSION "11.2.0"

set INTEL_BASE $BASE_PREFIX/$RELEASE/$CAT/$PACKAGE/$VERSION

setenv SITE_INTEL_HOME ${INTEL_BASE}
setenv INTEL_VERSION   ${COMP_VERSION}

# use GCC libs and includes 
prepend-path   PATH             $BASE_PREFIX/$RELEASE/$CAT/gcc/$GCC_VERSION/bin
prepend-path   LD_LIBRARY_PATH  $BASE_PREFIX/$RELEASE/$CAT/gcc/$GCC_VERSION/lib64/
prepend-path   LD_LIBRARY_PATH  $BASE_PREFIX/$RELEASE/$CAT/gcc/$GCC_VERSION/lib/

prepend-path  PATH               $INTEL_BASE/bin/intel64
prepend-path  LD_LIBRARY_PATH    $INTEL_BASE/compiler/lib/intel64
prepend-path  MANPATH            $INTEL_BASE/man/common:$BASE_PREFIX/$RELEASE/$CAT/gcc/$GCC_VERSION/share/man
prepend-path  LM_LICENSE_FILE    "26000@X.X.X.X"

# --------------------------------------------------------------------
module-whatis "Intel Parallel Studio XE for Linux version : $COMP_VERSION"
# --------------------------------------------------------------------

proc ModulesHelp { } {
        global COMP_VERSION

        puts stderr "\ticc   - invokes the Intel(R) C compiler"
        puts stderr "\ticpc  - invokes the Intel(R) C++ compiler"
        puts stderr "\tifort - invokes the Intel(R) Fortran Compiler"
        puts stderr "\n\tsee 'man icc' or 'man icpc' or 'man ifort'"
        puts stderr "\n\tVersion $COMP_VERSION\n"
}
