forked from openshmem-org/tests-cray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.sh
79 lines (67 loc) · 2.16 KB
/
configure.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
#
# Copyright (c) 2015 Cray Inc.
#
# The contents of this file is proprietary information of Cray Inc.
# and may not be disclosed without prior written consent.
#
# basic configuration script
# setup and modify the configuration script as necessary
user_setup() {
export CRAY_TEST_PATH=$PWD/testbin
export CRAY_TEST_FILE=$PWD
export NPES=28
export CUSTOM_SHMEM_DIR="/lus/scratch/nravi/opt/sma"
export CC=cc
export CXX=CC
export FTN=ftn
LAUNCHER=aprun
}
default_config() {
if [ ! -z "$CUSTOM_SHMEM_DIR" ]; then
export CFLAGS=" -I${CUSTOM_SHMEM_DIR}/include/ "
export CXXFLAGS=" -I${CUSTOM_SHMEM_DIR}/include/ "
export FFLAGS=" -I${CUSTOM_SHMEM_DIR}/include/ "
export FCFLAGS=" -I${CUSTOM_SHMEM_DIR}/include/ "
export CLIBS=" -L${CUSTOM_SHMEM_DIR}/lib64 -lsma "
export CXXLIBS=" -L${CUSTOM_SHMEM_DIR}/lib64 -lsma "
export FLIBS=" -L${CUSTOM_SHMEM_DIR}/lib64 -lsma "
export FCLIBS=" -L${CUSTOM_SHMEM_DIR}/lib64 -lsma "
fi
export CRAY_TEST_RUN=$CRAY_TEST_PATH/run/ # main run directory
export CRAY_TEST_RUN_OUT=$CRAY_TEST_PATH/run/out/ # run results are stored
export CRAY_TEST_BUILD=$CRAY_TEST_PATH/build # main build directory
export CRAY_TEST_BUILD_BIN=$CRAY_TEST_PATH/build/bin # build binaries are stored
export CRAY_TEST_BUILD_OUT=$CRAY_TEST_PATH/build/out/ # build outputs are stored
}
create_testenv() {
user_setup
default_config
}
create_path() {
mkdir $CRAY_TEST_PATH
mkdir $CRAY_TEST_RUN
mkdir $CRAY_TEST_RUN_OUT
mkdir $CRAY_TEST_RUN_OUT/sma1
mkdir $CRAY_TEST_RUN_OUT/sma2
mkdir $CRAY_TEST_RUN_OUT/smaf
mkdir $CRAY_TEST_BUILD
mkdir $CRAY_TEST_BUILD_BIN
mkdir $CRAY_TEST_BUILD_BIN/sma1
mkdir $CRAY_TEST_BUILD_BIN/sma2
mkdir $CRAY_TEST_BUILD_BIN/smaf
mkdir $CRAY_TEST_BUILD_OUT
mkdir $CRAY_TEST_BUILD_OUT/sma1
mkdir $CRAY_TEST_BUILD_OUT/sma2
mkdir $CRAY_TEST_BUILD_OUT/smaf
}
check_path() {
if [ ! -d $CRAY_TEST_PATH ]; then
create_path
else
rm -rf $CRAY_TEST_PATH
create_path
fi
}
create_testenv
check_path