-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost_iter.sh
executable file
·50 lines (39 loc) · 1.56 KB
/
post_iter.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
#!/bin/bash
set -x
umask g+r
cd $WEST_SIM_ROOT || exit 1
rm -f seg_logs/*.log
# Copy up every node's tarball, and put them into one large tarball.
# Afterwards, we'll clean up our presence on the node.
#CURR_ITER_TARBALL=$(printf "%06d" $WEST_CURRENT_ITER).tar
#CURR_ITER_DIR=$(printf "%06d" $WEST_CURRENT_ITER)
#export WEST_JOBID=$PBS_JOBID
#export USER=$PBS_O_LOGNAME
#export TMP=/tmp
#for node in $(scontrol show hostname $SLURM_NODELIST); do
#wait
#for node in $(cat $WEST_SIM_ROOT/PBS_NODELIST.tmp); do
# (CMD=`ssh $node "tar --append --file=$TMP/$USER/$WEST_JOBID/traj_segs.$node.tar $TMP/$USER/$WEST_JOBID/traj_segs/$CURR_ITER_DIR/*"`
# echo $CMD
# rsync -avP $node:$TMP/$USER/$WEST_JOBID/traj_segs.$node.tar $WEST_SIM_ROOT/traj_segs_staging/
# CMD=`ssh $node "rm -v $TMP/$USER/$WEST_JOBID/traj_segs.$node.tar"`
# echo $CMD
# CMD=`ssh $node "rm -v $TMP/$USER/$WEST_JOBID/traj_segs"`
# echo $CMD
# CMD=`ssh $node "tar cvf $TMP/$USER/$WEST_JOBID/traj_segs.$node.tar --files-from /dev/null"`
# echo $CMD
# LAST_NODE=$node) &
#done
#wait
#cd traj_segs_staging/
#mv traj_segs.$LAST_NODE.tar $CURR_ITER_TARBALL
#for node in $(scontrol show hostname $SLURM_NODELIST); do
#for node in $(cat $WEST_SIM_ROOT/PBS_NODELIST.tmp); do
# tar --concatenate --file=$CURR_ITER_TARBALL traj_segs.$node.tar
# rm -vr traj_segs.$node.tar
#done
#tar --append --file=$CURR_ITER_TARBALL $CONFIG/$SYSTEM.prmtop
#tar --append --file=$CURR_ITER_TARBALL $CONFIG/prod.in.annotated
#mv $CURR_ITER_TARBALL $WEST_SIM_ROOT/traj_segs/
cd $WEST_SIM_ROOT || exit 1
rm -f seg_logs/*.log