summarylogtreecommitdiffstats
path: root/modulefile
blob: f073ac3a63a112dd44f696c692f103bfac762768 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#%Module1.0
#
# Created by Darjan Krijan [https://disc-kuraudo.eu]
#

set MODULE      "aocc"
set BASE_DIR    "/opt"
set VERSION     "5.0.0"
set MODULE_ROOT "${BASE_DIR}/${MODULE}"
set MODULE_TEXT "AMD Optimizing C/C++ Compiler and Fortran Compiler (flang)"

prepend-path PATH            ${MODULE_ROOT}/bin
prepend-path LIBRARY_PATH    ${MODULE_ROOT}/lib32
prepend-path LIBRARY_PATH    ${MODULE_ROOT}/lib
prepend-path LD_LIBRARY_PATH ${MODULE_ROOT}/lib32
prepend-path LD_LIBRARY_PATH ${MODULE_ROOT}/lib
append-path  CPATH           ${MODULE_ROOT}/include
prepend-path MANPATH         ${MODULE_ROOT}/share/man

set CC  "${MODULE_ROOT}/bin/aocc-clang"
set CXX "${MODULE_ROOT}/bin/aocc-clang++"
set FC  "${MODULE_ROOT}/bin/aocc-flang"

set-alias clang   ${CC}
set-alias clang++ ${CXX}
set-alias flang   ${FC}

# Compiler environment variables for GNU Autotools, CMake, etc.
setenv CC         ${CC}
setenv CXX        ${CXX}
setenv FC         ${FC}
setenv F77        ${FC}
setenv F90        ${FC}

# MPT MPI
setenv MPICC_CC   ${CC}
setenv MPICXX_CXX ${CXX}
setenv MPIFC_FC   ${FC}
setenv MPIF90_F90 ${FC}
setenv MPIF08_F08 ${FC}

# OpenMPI
setenv OMPI_CC    ${CC}
setenv OMPI_CXX   ${CXX}
setenv OMPI_FC    ${FC}

module-whatis "${MODULE_TEXT} version ${VERSION}"

proc ModulesHelp {} {
	global MODULE_TEXT
	puts stderr "This module sets up the environment for ${MODULE_TEXT}"
	puts stderr "by adapting the following environment variables:"
	puts stderr "PATH"
	puts stderr "LIBRARY_PATH"
	puts stderr "LD_LIBRARY_PATH"
	puts stderr "CPATH"
	puts stderr "CC, CXX, FC, F77, F90"
	puts stderr "MPICC_CC, MPICXX_CXX, MPIF90_F90, MPIF08_F08"
	puts stderr "OMPI_CC, OMPI_CXX, OMPI_FC"
}