-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcheck-build.sh
executable file
·56 lines (51 loc) · 1.55 KB
/
check-build.sh
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
#!/bin/bash -e
. /etc/profile.d/modules.sh
module load ci
# add prerequistes
module add gmp
module add mpfr
module add mpc
module add ncurses
module add gcc/${GCC_VERSION}
module add torque/2.5.13-gcc-${GCC_VERSION}
echo "About to make the modules"
cd ${WORKSPACE}/${NAME}-${VERSION}
ls
echo $?
echo "Installing into CI"
make install
mkdir -p modules
(
cat <<MODULE_FILE
#%Module1.0
## $NAME modulefile
##
proc ModulesHelp { } {
puts stderr "\tAdds OpenMPI ${OPENMPI_VERSION} to your environment"
}
module add gmp
module add mpfr
module add mpc
module add ncurses
module add gcc/${GCC_VERSION}
module add torque/2.5.13-gcc-${GCC_VERSION}
module-whatis "$NAME $VERSION. compiled for GCC ${GCC_VERSION}"
setenv OPENMPI_VERSION $VERSION
setenv OPENMPI_DIR /data/ci-build/$::env(SITE)/$::env(OS)/$::env(ARCH)/$NAME/$VERSION-gcc-${GCC_VERSION}
prepend-path PATH $::env(OPENMPI_DIR)/bin
prepend-path PATH $::env(OPENMPI_DIR)/include
prepend-path PATH $::env(OPENMPI_DIR)/bin
prepend-path MANPATH $::env(OPENMPI_DIR)/man
prepend-path LD_LIBRARY_PATH $::env(OPENMPI_DIR)/lib
MODULE_FILE
) > modules/${VERSION}-gcc-${GCC_VERSION}
mkdir -p ${COMPILERS}/${NAME}
cp modules/${VERSION}-gcc-${GCC_VERSION} ${COMPILERS}/${NAME}/${VERSION}-gcc-${GCC_VERSION}
# Testing module
module avail
module list
module add ${NAME}/${VERSION}-gcc-${GCC_VERSION}
echo "PATH is : $PATH"
echo "LD_LIBRARY_PATH is $LD_LIBRARY_PATH"
# confirm openmpi
which mpirun