Debian Codegraph @

doc/example/compiler-etc-dependencies/modulerc3/mvapich/common

raw
1 # Common modulefile for mvapich
2 # Using "modulerc based" strategy
3 # Expects the following variables to have been
4 # previously defined:
5 # version: version of mvapich
6 # compilerTag: the compiler to use
7
8 # Declare the path where the packages are installed
9 # The reference to the environment variable is a hack
10 # for this example; normally one would hard code a path
11 set rootdir $::env(MOD_GIT_ROOTDIR)
12 set swroot $rootdir/doc/example/compiler-etc-dependencies/dummy-sw-root
13
14 # Also get location of and load common procedures
15 # This is a hack for the cookbook examples, in production
16 # one should either
17 # 1) declare the procedures in a site config file (preferred)
18 # 2) hardcode the path to $tcllibdir and common_utilities.tcl
19 set tcllibdir $rootdir/doc/example/compiler-etc-dependencies/tcllib
20 source $tcllibdir/common_utilities.tcl
21
22 proc ModulesHelp { } {
23 global version compilerTag
24 puts stderr "
25 mvapich: Test dummy version of mvapich $version
26
27 mvapich version: $version
28 Compiler: $compilerTag
29
30 For testing packages depending on compilers/MPI
31
32 "
33 }
34
35 module-whatis "Dummy mvapich $version (built for $compilerTag)"
36
37 # Make sure loadedCompiler matches what we want. And
38 # load compiler if no compiler loaded
39 #LoadedCompilerMatches $compilerTag 1 1
40 # For Env Modules 3.x, set requireIt to 0
41 LoadedCompilerMatches $compilerTag 0 1
42
43 # Compute the installation prefix
44 set pkgroot $swroot/mvapich
45 set vroot $pkgroot/$version
46 set prefix $vroot/$compilerTag
47
48 # Set environment variables
49 setenv MPI_DIR $prefix
50
51 set bindir $prefix/bin
52 set libdir $prefix/lib
53 set incdir $prefix/include
54
55 prepend-path PATH $bindir
56 prepend-path LIBRARY_PATH $libdir
57 prepend-path LD_LIBRARY_PATH $libdir
58 prepend-path CPATH $incdir