Skip to content

Commit 31454d1

Browse files
committed
WIP Titan settings
1 parent 4e024d3 commit 31454d1

File tree

3 files changed

+161
-0
lines changed

3 files changed

+161
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash -l
2+
set -eu
3+
4+
# CORI BUILD
5+
# Compiles and installs the EQ/R module
6+
7+
THIS=$( dirname $0 )
8+
P1B3_MLRMBO=$( cd $THIS/../../.. ; /bin/pwd )
9+
10+
source $THIS/titan_build_settings.sh
11+
12+
# Access SWIG and recent Autotools
13+
PATH=/ccs/home/wozniak/Public/sfw/swig-3.0.2/bin:$PATH
14+
module load autoconf/2.69
15+
16+
cd $THIS
17+
./bootstrap
18+
./configure # The default prefix is the parent directory
19+
make
20+
make install
21+
22+
echo
23+
echo "Successfully installed EQ/R."
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
# TITAN BUILD SETTINGS
3+
4+
R_HOME=/sw/xk6/r/3.3.2/sles11.3_gnu4.9.3x/lib64/R
5+
R_INCLUDE=$R_HOME/include
6+
R_LIB=$R_HOME/lib
7+
R_INSIDE=$R_HOME/library/RInside
8+
RCPP=$R_HOME/library/Rcpp
9+
10+
#system-wide tcl
11+
TCL=/lustre/atlas2/csc249/proj-shared/sfw/tcl-8.6.2
12+
TCL_INCLUDE=$TCL/include
13+
TCL_LIB=$TCL/lib
14+
TCL_LIBRARY=tcl8.6
15+
16+
CPPFLAGS=""
17+
CPPFLAGS+="-I$TCL_INCLUDE "
18+
CPPFLAGS+="-I$R_INCLUDE "
19+
CPPFLAGS+="-I$RCPP/include "
20+
CPPFLAGS+="-I$R_INSIDE/include "
21+
CXXFLAGS=$CPPFLAGS
22+
23+
LDFLAGS=""
24+
LDFLAGS+="-L$R_INSIDE/lib -lRInside "
25+
LDFLAGS+="-L$R_LIB -lR -lRblas "
26+
LDFLAGS+="-L$TCL_LIB -l$TCL_LIBRARY "
27+
LDFLAGS+="-Wl,-rpath -Wl,$TCL_LIB "
28+
LDFLAGS+="-Wl,-rpath -Wl,$R_LIB "
29+
LDFLAGS+="-Wl,-rpath -Wl,$R_INSIDE/lib"
30+
31+
export CPPFLAGS CXXFLAGS LDFLAGS
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
#! /usr/bin/env bash
2+
set -eu
3+
4+
# TITAN WORKFLOW
5+
# Main entry point for P1B3 mlrMBO workflow
6+
7+
# Autodetect this workflow directory
8+
export EMEWS_PROJECT_ROOT=$( cd $( dirname $0 )/.. ; /bin/pwd )
9+
10+
# USER SETTINGS START
11+
12+
# See README.md for more information
13+
14+
# The directory in the Benchmarks repo containing P1B3
15+
P1B3_DIR=$( cd $EMEWS_PROJECT_ROOT/../../../Benchmarks/Pilot1/P1B3 ; /bin/pwd )
16+
17+
echo $P1B3_DIR ; ls $P1B3_DIR
18+
19+
# The number of MPI processes
20+
# Note that 2 processes are reserved for Swift/EMEMS
21+
# The default of 4 gives you 2 workers, i.e., 2 concurrent Keras runs
22+
export PROCS=${PROCS:-4}
23+
24+
# MPI processes per node
25+
export PPN=${PPN:-4}
26+
27+
export QUEUE=${QUEUE:-debug}
28+
export WALLTIME=${WALLTIME:-00:02:00}
29+
30+
# mlrMBO settings
31+
# How many to runs evaluate per iteration
32+
MAX_CONCURRENT_EVALUATIONS=${MAX_CONCURRENT_EVALUATIONS:-2}
33+
# Total iterations
34+
MAX_ITERATIONS=${MAX_ITERATIONS:-3}
35+
PARAM_SET_FILE=${PARAM_SET_FILE:-$EMEWS_PROJECT_ROOT/data/parameter_set.R}
36+
# pbalabra:
37+
# PARAM_SET_FILE="$EMEWS_PROJECT_ROOT/data/parameter_set1.R"
38+
39+
# USER SETTINGS END
40+
41+
# Source some utility functions used by EMEWS in this script
42+
source "${EMEWS_PROJECT_ROOT}/etc/emews_utils.sh"
43+
44+
if [ "$#" -ne 1 ]; then
45+
script_name=$(basename $0)
46+
echo "Usage: ${script_name} EXPERIMENT_ID (e.g. ${script_name} experiment_1)"
47+
exit 1
48+
fi
49+
50+
# Uncomment to turn on Swift/T logging. Can also set TURBINE_LOG,
51+
# TURBINE_DEBUG, and ADLB_DEBUG to 0 to turn off logging
52+
#export TURBINE_LOG=1 TURBINE_DEBUG=1 ADLB_DEBUG=1
53+
54+
export EXPID=$1
55+
export TURBINE_OUTPUT=$HOME/FS/experiments/$EXPID
56+
check_directory_exists
57+
58+
export TURBINE_JOBNAME="${EXPID}_job"
59+
60+
# if R cannot be found, then these will need to be
61+
# uncommented and set correctly.
62+
# export R_HOME=/path/to/R
63+
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$R_HOME/lib
64+
# export PYTHONHOME=
65+
66+
#P1B3_DIR=$EMEWS_PROJECT_ROOT/../../../Benchmarks/Pilot1/P1B3
67+
68+
export LD_LIBRARY_PATH=/sw/xk6/deeplearning/1.0/sles11.3_gnu4.9.3/lib:/sw/xk6/deeplearning/1.0/sles11.3_gnu4.9.3/cuda/lib64
69+
70+
export PYTHONPATH=$EMEWS_PROJECT_ROOT/python:$P1B3_DIR:$PYTHONPATH
71+
72+
# Resident task workers and ranks
73+
export TURBINE_RESIDENT_WORK_WORKERS=1
74+
export RESIDENT_WORK_RANKS=$(( PROCS - 2 ))
75+
76+
# EQ/R location
77+
EQR=$EMEWS_PROJECT_ROOT/ext/EQ-R
78+
79+
CMD_LINE_ARGS="$* -pp=$MAX_CONCURRENT_EVALUATIONS -it=$MAX_ITERATIONS "
80+
CMD_LINE_ARGS+="-param_set_file=$PARAM_SET_FILE "
81+
82+
# set machine to your scheduler type (e.g. pbs, slurm, cobalt etc.),
83+
# or empty for an immediate non-queued unscheduled run
84+
MACHINE="cray"
85+
if [ -n "$MACHINE" ]; then
86+
MACHINE="-m $MACHINE"
87+
fi
88+
89+
# Add any script variables that you want to log as
90+
# part of the experiment meta data to the USER_VARS array,
91+
# for example, USER_VARS=("VAR_1" "VAR_2")
92+
USER_VARS=($CMD_LINE_ARGS)
93+
# log variables and script to to TURBINE_OUTPUT directory
94+
log_script
95+
96+
R_LIB=/sw/xk6/r/3.3.2/sles11.3_gnu4.9.3x/lib64/R/lib
97+
GCC_LIB=/opt/gcc/4.9.3/snos/lib64
98+
99+
set -x
100+
WORKFLOW_SWIFT=workflow.swift
101+
swift-t -n $PROCS $MACHINE -p -I $EQR -r $EQR \
102+
-e LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$R_LIB:$GCC_LIB \
103+
-e EMEWS_PROJECT_ROOT \
104+
-e TURBINE_RESIDENT_WORK_WORKERS \
105+
-e RESIDENT_WORK_RANKS \
106+
-e PYTHONPATH \
107+
$EMEWS_PROJECT_ROOT/swift/$WORKFLOW_SWIFT $CMD_LINE_ARGS

0 commit comments

Comments
 (0)