Debian Codegraph @

doc/example/compiler-etc-dependencies/flavours/openmpi/common

raw
1 # Common stuff for "openmpi" modulefiles
2 # Using "flavours" strategy
3 #
4 # Expects the following Tcl variables to have been previously set:
5 # version: version of openmpi
6
7 # Common parts of modulefile for openmpi
8
9 # Initialise "flavours"
10 package require flavours
11 flavours init
12
13 proc ModulesHelp { } {
14 global version
15 puts stderr "
16 openmpi: Test dummy version of OpenMPI $version
17
18 For testing packages depending on compilers/MPI
19
20 "
21 }
22
23 module-whatis "Dummy openmpi $version"
24
25 # Construct flavour name
26 flavours prereq -class compiler
27 flavours conflict openmpi
28
29 # Declare the path where the packages are installed
30 # The reference to the environment variable is a hack
31 # for this example; normally one would hard code a path
32 set rootdir $::env(MOD_GIT_ROOTDIR)
33 set swroot $rootdir/doc/example/compiler-etc-dependencies/dummy-sw-root
34
35 flavours root $swroot/openmpi/$version
36 flavours revision 1
37 flavours commit
38
39 # Set environment variables
40 setenv MPI_DIR [flavours path]
41
42 # Prepend to environment variables (paths relative to
43 # the directory containing the flavour)
44 flavours prepend-path PATH bin
45 flavours prepend-path LIBRARY_PATH lib
46 flavours prepend-path LD_LIBRARY_PATH lib
47 flavours prepend-path CPATH include
48
49 # Reload any modules with this as a prerequisite
50 flavours cleanup