-
Notifications
You must be signed in to change notification settings - Fork 3
/
fabtrun.qsub
35 lines (32 loc) · 1014 Bytes
/
fabtrun.qsub
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
#!/bin/sh
##
## Usage: qsub fabtrun.qsub
## Author: Hyokyung Lee (hyoklee@hdfgroup.org)
## Last Update: 2022-09-06
##
#PBS -l select=2:system=polaris
#PBS -l place=scatter
#PBS -l walltime=10:00
#PBS -q debug
#PBS -A CSC250STDM12
PREFIX=/lus/grand/projects/radix-io
# Get all node names first.
mpiexec -n 1 -ppn 1 cat $PBS_NODEFILE >& $PREFIX/nodes.txt
# Run 1 server and (select - 1) client(s).
# The debug queue has only 2 nodes.
# Therefore, this script will run only 1 client.
# The first node in nodes.txt will be the server.
# The rest will be clients.
j=0
for i in `cat $PREFIX/nodes.txt`; do
if [[ "$j" -gt 0 ]]; then
mpiexec -host $i -n 1 -ppn 1 $PREFIX/bin/fabtput.sh
# Alternatively, you can use ssh.
# ssh $i '$PREFIX/bin/fabtput.sh'
else
mpiexec -host $i -n 1 -ppn 1 nohup $PREFIX/bin/fabtget.sh > fabtget.out 2> fabtget.err < /dev/null &
# Alternatively, you can use ssh.
# ssh $i 'nohup $PREFIX/bin/fabtget.sh > fabtget.out 2> fabtget.err < /dev/null &'
fi
((j++))
done