Mercurial > hg > cc > cirrus_home
annotate bin/atest.sh @ 101:fbca56fabbac
(none)
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Mon, 19 Apr 2021 13:07:58 +0000 |
| parents | 2fc33145242b |
| children |
| rev | line source |
|---|---|
|
84
2fc33145242b
prepare for real parallel distribution
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
1 #!/bin/bash |
|
2fc33145242b
prepare for real parallel distribution
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
2 # Invoke this as e.g. sbatch -n 8 -c 5 masterJob.sh atest |
|
2fc33145242b
prepare for real parallel distribution
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
3 n=$SLURM_NODEID |
|
2fc33145242b
prepare for real parallel distribution
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
4 id=$SLURM_LOCALID |
|
2fc33145242b
prepare for real parallel distribution
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
5 #printenv | fgrep SLURM |
|
2fc33145242b
prepare for real parallel distribution
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
6 task=$SLURM_PROCID |
|
2fc33145242b
prepare for real parallel distribution
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
7 echo $(date) $(cat atest/$task.txt) start |
|
2fc33145242b
prepare for real parallel distribution
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
8 echo I am host $(hostname) node $n, cpu "$PMI_FD", local $id, task $task |
|
2fc33145242b
prepare for real parallel distribution
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
9 sleep 4 |
|
2fc33145242b
prepare for real parallel distribution
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
10 echo $(date) $(cat atest/$id.txt) end |
|
2fc33145242b
prepare for real parallel distribution
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
11 |
