Skip to content

Commit

Permalink
Fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
Iainmon committed Aug 13, 2024
1 parent 96d3575 commit 8e7bdd5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 7 additions & 3 deletions makejob.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
num_nodes = args.num_nodes

job_source = f"""#!/bin/bash
#SBATCH --job-name=ChAI_perf_test_{num_images}x{num_nodes}
#SBATCH --job-name=ChAI_perf_{num_nodes}
#SBATCH --partition=workq
#SBATCH --nodes={num_nodes}
#SBATCH --cpus-per-task=72
#SBATCH --cpus-per-task=96
#SBATCH --time=03:00:00
#SBATCH --mail-type=ALL
#SBATCH [email protected]
python3 times.py measure "./MultiLocaleInference -nl {num_nodes} --numImages={num_images} --numTries=10 --printResults=false" --name "ml_test_{num_nodes}_{num_images}"
for num_images in 1 5 10 50 100 500 1000 5000 10000
do
python3 times.py measure "./MultiLocaleInference -nl {num_nodes} --numImages=$num_images --numTries=10 --printResults=false" --name "ml_test_{num_nodes}_$num_images"
done
"""

with open('tmp_job.sh','w') as f:
Expand Down
8 changes: 4 additions & 4 deletions runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
for num_nodes_ in {1..10}
do
num_nodes=$(( num_nodes_ ** 2 ))
for num_images in 1 5 10 50 100 500 1000 5000 10000
do
# for num_images in 1 5 10 50 100 500 1000 5000 10000
# do

# export CHPL_COMM="gasnet"
# export CHPL_LAUNCHER="slurm_amudprun"
# export GASNET_SSH_SERVERS=$(scontrol show hostnames | xargs echo)

echo "Running on $num_nodes nodes with $num_images images."
python3 makejob.py --num_images=$num_images --num_nodes=$num_nodes
python3 makejob.py --num_images=1 --num_nodes=$num_nodes
sbatch tmp_job.sh
# python3 times.py measure "./MultiLocaleInference -nl $num_nodes --numImages=$num_images --numTries=10 --printResults=false" --name "ml_test_${num_nodes}_${num_images}"
done
# done
done

0 comments on commit 8e7bdd5

Please sign in to comment.