forked from xiaoyeli/superlu_dist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_cmake_build.csh
executable file
·56 lines (52 loc) · 2.07 KB
/
run_cmake_build.csh
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/csh
if ( ! $?NERSC_HOST ) then
echo "NERSC_HOST undefined"
else
if ( "$NERSC_HOST" == "edison" ) then
setenv PARMETIS_ROOT ~/Edison/lib/parmetis-4.0.3
# setenv PARMETIS_BUILD_DIR ${PARMETIS_ROOT}/shared-build
setenv PARMETIS_BUILD_DIR ${PARMETIS_ROOT}/static-build/Linux-x86_64
cmake .. \
-DUSE_XSDK_DEFAULTS=FALSE\
-DTPL_PARMETIS_INCLUDE_DIRS="${PARMETIS_ROOT}/include;${PARMETIS_ROOT}/metis/include" \
-DTPL_PARMETIS_LIBRARIES="${PARMETIS_BUILD_DIR}/libparmetis/libparmetis.a;${PARMETIS_BUILD_DIR}/libmetis/libmetis.a" \
-DCMAKE_C_FLAGS="-std=c99 -fPIC" \
# -DCMAKE_EXE_LINKER_FLAGS="-shared" \
-DCMAKE_Fortran_COMPILER=ftn \
-Denable_blaslib=OFF \
# -DTPL_BLAS_LIBRARIES=" " \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_INSTALL_PREFIX=..
endif
if ( "$NERSC_HOST" == "cori" ) then
setenv PARMETIS_ROOT ~/Cori/lib/parmetis-4.0.3
setenv PARMETIS_BUILD_DIR ${PARMETIS_ROOT}/shared-build
# setenv PARMETIS_BUILD_DIR ${PARMETIS_ROOT}/static-build/Linux-x86_64
cmake .. \
-DUSE_XSDK_DEFAULTS=TRUE\
-DTPL_PARMETIS_INCLUDE_DIRS="${PARMETIS_ROOT}/include;${PARMETIS_ROOT}/metis/include" \
-DTPL_PARMETIS_LIBRARIES="${PARMETIS_BUILD_DIR}/libparmetis/libparmetis.so;${PARMETIS_BUILD_DIR}/libmetis/libmetis.so" \
-Denable_blaslib=OFF \
-DCMAKE_Fortran_COMPILER=ftn \
-DCMAKE_C_FLAGS="-std=c99 -fPIC" \
-DCMAKE_EXE_LINKER_FLAGS="-shared" \
-DCMAKE_INSTALL_PREFIX=..
endif
endif
set THISHOST=`hostname -s`
#echo $THISHOST
if ( "$THISHOST" == "ssg1" ) then
setenv PARMETIS_ROOT ~/lib/static/parmetis-4.0.3
setenv PARMETIS_BUILD_DIR ${PARMETIS_ROOT}/build/Linux-x86_64
echo $PARMETIS_ROOT
cmake .. \
-DTPL_PARMETIS_INCLUDE_DIRS="${PARMETIS_ROOT}/include;${PARMETIS_ROOT}/metis/include" \
-DTPL_PARMETIS_LIBRARIES="${PARMETIS_BUILD_DIR}/libparmetis/libparmetis.a;${PARMETIS_BUILD_DIR}/libmetis/libmetis.a" \
-DCMAKE_C_FLAGS="-std=c99 -g" \
-Denable_blaslib=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_INSTALL_PREFIX=..
endif
# make VERBOSE=1
# make test