5
#PBS -l walltime=1:00:00,size=20
6
## On jaguarpf, you need size=48 (4 nodes * 12cores for 4 apruns)
10
# Number of writers (WPX*WPY = WRITEPROC)
14
# Number of staging processes, if staging is used
16
# Number of readers (RPX*RPY = READPROC)
23
if [ $WP -ne $WRITEPROC ]; then
24
echo "WPX*WPY != WRITEPROC: " $WP and $WRITEPROC
29
if [ $RP -ne $READPROC ]; then
30
echo "RPX*RPY != READPROC: " $RP and $READPROC
36
rm -f log.* draw* core* conf dataspaces.conf srv.lck
37
rm -f writer.bp reader_0*.bp
39
METHOD=`grep "<transport .*method=" coupling_writer_2D.xml | sed -e "s/^.*method=\"\([A-Z]*\).*/\1/"`
40
echo "The selected coupling method in coupling_writer_2D.xml is: $METHOD"
42
if [ "x$METHOD" == "xDATASPACES" ]; then
43
READMETHOD="DATASPACES"
44
let "PROCALL=WRITEPROC+READPROC"
46
# Prepare config file for DataSpaces
47
echo "## Config file for DataSpaces
56
SERVER=/ccs/proj/e2e/dataspaces/sith/pgi/bin/dataspaces_server
57
echo "-- Start DataSpaces server "$SERVER" on $STAGINGPROC PEs, -s$STAGINGPROC -c$PROCALL"
58
mpirun -np $STAGINGPROC $SERVER -s$STAGINGPROC -c$PROCALL &> log.server &
60
## Give some time for the servers to load and startup
62
while [ ! -f conf ]; do
63
echo "-- File conf is not yet available from server. Sleep more"
66
sleep 10s # wait server to fill up the conf file
68
## Export the main server config to the environment
73
echo "-- DataSpaces Portals IDs: P2TNID = $P2TNID P2TPID = $P2TPID"
79
echo "-- Start WRITER on $WRITEPROC PEs"
80
mpirun -np $WRITEPROC ./coupling_writer_2D $WPX $WPY 10 10 5 >& log.writer &
83
echo "-- Start READER on $READPROC PEs."
84
mpirun -np $READPROC ./coupling_reader_2D $RPX $RPY $READMETHOD 1 >& log.reader &
86
echo "-- Wait until all applications exit. Run ./check.sh to see status"