| 1 |
local modname = "mpich2" |
| 2 |
local version = "1.5" |
| 3 |
local system_type = os.getenv("SYSTEM_DIR") |
| 4 |
local modules_top_dir = "/unknown/apps/ossw" |
| 5 |
local compiler = "gcc" |
| 6 |
local compiler_version = "4.6" |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
family("mpi") |
| 12 |
|
| 13 |
|
| 14 |
help( |
| 15 |
"MPICH2 MPI-2 Library\n".. |
| 16 |
"Adds MPICH2 "..version.." built with "..compiler.." "..compiler_version.." compilers to environment.\n".. |
| 17 |
"Adds lib directory to LD_LIBRARY_PATH\n".. |
| 18 |
"Adds bin directory to PATH\n".. |
| 19 |
"Adds man directory to MANPATH\n" |
| 20 |
) |
| 21 |
|
| 22 |
whatis( "Name: MPICH2 MPI-2 Library" ) |
| 23 |
whatis( "Version: "..version..", built with "..compiler.." "..compiler_version ) |
| 24 |
whatis( "Category: library, runtime support" ) |
| 25 |
whatis( "URL: http://www.mcs.anl.gov/research/projects/mpich2/" ) |
| 26 |
|
| 27 |
local mpi_base = modules_top_dir.."/libraries/mpich2/mpich2-"..version.."/"..system_type.."/"..compiler.."-"..compiler_version |
| 28 |
|
| 29 |
local mpath_root = os.getenv("MODULEPATH_ROOT") |
| 30 |
edit_derived_modulepaths(mpath_root, modname, version) |
| 31 |
|
| 32 |
prepend_path( "LD_LIBRARY_PATH", pathJoin(mpi_base, "lib") ) |
| 33 |
prepend_path( "PATH", pathJoin(mpi_base, "bin" ) ) |
| 34 |
prepend_path( "MANPATH", pathJoin(mpi_base, "share/man" ) ) |
| 35 |
setenv( "MPI_DIR", mpi_base ) |
| 36 |
|
| 37 |
setenv( "MPICH2_VERSION", version ) |
| 38 |
setenv( "MPI_IMPLEMENTATION", "mpich2" ) |
| 39 |
setenv( "MPI_VERSION", version ) |