Mercurial > hg > cc > cirrus_home
annotate bin/cdx_tab.sh @ 195:5f3c36e4fd6d default tip
add target test-core which (dangerously) avoids (we hope pointless) recompilation of all the plugins
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Thu, 26 Sep 2024 17:55:56 +0100 |
parents | ef961d91eea5 |
children |
rev | line source |
---|---|
163
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
1 #!/bin/bash |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
2 # Invoke this as e.g. sbatch -n 30 -c 10 masterJob.sh cdx_segment CC-MAIN-2019-35 |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
3 # run cdx_segment.py in parallel |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
4 n=$SLURM_NTASKS |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
5 c=$SLURM_CPUS_PER_TASK |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
6 node=$SLURMD_NODENAME |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
7 local=$SLURM_LOCALID |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
8 proc=$SLURM_PROCID |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
9 echo $(date) $node:$proc start |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
10 |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
11 type parallel |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
12 #module load gnu-parallel |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
13 |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
14 PYTHONPATH=$PYTHONPATH:$HOME/lib/python |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
15 parallel --will-cite -j $c doC2T.sh "$1" '{}' < cdx_tab/$proc.txt |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
16 |
ef961d91eea5
previous approach to lang/field extraction
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
17 echo $(date) $proc end |