|
| 1 | +#%Module@VER@##################################################################### |
| 2 | + |
| 3 | +proc ModulesHelp { } { |
| 4 | + global helpmsg |
| 5 | + puts stderr "\t$helpmsg\n" |
| 6 | +} |
| 7 | + |
| 8 | +#module add library/gmp6.0.0a library/mpfr3.1.2 library/mpc1.0.3 compilers/gcc4.9.2 |
| 9 | + |
| 10 | + |
| 11 | +# change 'mpihome' to base directory where openmpi is located |
| 12 | +# and all variables below will be set correctly |
| 13 | + |
| 14 | +set mpihome /shared/openmpi211_64ib |
| 15 | + |
| 16 | +# make sure that another openmpi or FDS6 modules are not loaded |
| 17 | +# |
| 18 | +conflict openmpi |
| 19 | +conflict FDS6 |
| 20 | + |
| 21 | +if [ file isdirectory $mpihome/bin ] { |
| 22 | + module-whatis "Sets up your openmpi environment to use $mpihome" |
| 23 | + set helpmsg "Sets up your openmpi environment to use $mpihome" |
| 24 | + |
| 25 | + setenv OPAL_PREFIX $mpihome |
| 26 | + |
| 27 | + setenv CC $mpihome/bin/mpicc |
| 28 | + setenv FC $mpihome/bin/mpif77 |
| 29 | + setenv F90 $mpihome/bin/mpif90 |
| 30 | + setenv F77 $mpihome/bin/mpif77 |
| 31 | + |
| 32 | + prepend-path PATH $mpihome/bin |
| 33 | + prepend-path MANPATH $mpihome/man |
| 34 | + prepend-path C_INCLUDE_PATH $mpihome/include |
| 35 | + prepend-path CPLUS_INCLUDE_PATH $mpihome/include |
| 36 | + if [ file isdirectory $mpihome/lib64 ] { |
| 37 | + prepend-path LD_LIBRARY_PATH $mpihome/lib64:$mpihome/lib |
| 38 | + } else { |
| 39 | + prepend-path LD_LIBRARY_PATH $mpihome/lib |
| 40 | + } |
| 41 | + if [ file isdirectory /usr/lib64 ] { |
| 42 | + prepend-path LD_LIBRARY_PATH /usr/lib64 |
| 43 | + } |
| 44 | +} else { |
| 45 | + module-whatis "MPI $mpihome is NOT installed" |
| 46 | + set helpmsg "MPI $mpihome is NOT installed" |
| 47 | +} |
| 48 | + |
0 commit comments