From 979cbe7922299ac391c5717743d82482675185d0 Mon Sep 17 00:00:00 2001 From: Florian Stecker Date: Wed, 15 Jun 2022 18:04:42 +0200 Subject: [PATCH] parallelization scripts --- parallelization/check_hostfile | 6 ++++++ parallelization/generate_commands.py | 6 +++--- parallelization/instructions | 19 +++++++++++++++++++ parallelization/run | 7 +++++++ parallelization/sync | 7 +++++++ 5 files changed, 42 insertions(+), 3 deletions(-) create mode 100755 parallelization/check_hostfile create mode 100644 parallelization/instructions create mode 100755 parallelization/run create mode 100755 parallelization/sync diff --git a/parallelization/check_hostfile b/parallelization/check_hostfile new file mode 100755 index 0000000..d6a64f8 --- /dev/null +++ b/parallelization/check_hostfile @@ -0,0 +1,6 @@ +#!/bin/bash + +for a in $(cat $1 | egrep -o '^[^ ]*'); do + echo -n "$a " + ssh -o ConnectTimeout=5 $a "cat /proc/cpuinfo | egrep '^processor' | wc -l" +done diff --git a/parallelization/generate_commands.py b/parallelization/generate_commands.py index 9e8dcd2..781d151 100755 --- a/parallelization/generate_commands.py +++ b/parallelization/generate_commands.py @@ -2,13 +2,13 @@ wordlength = 16 n = 101038 -res = 50 -radius = 1.0 +res = 200 +radius = 1 q = [1,1,1] denom = round(res/radius) -cmd = "IDLIST=./output/idlist_{len} ./complex_anosov summary {n} {q1} {q2} {q3} {rnum}/{rden} {inum}/{iden}" +cmd = "IDLIST=idlist_{len} ../complex_anosov summary {n} {q1} {q2} {q3} {rnum}/{rden} {inum}/{iden}" for i in range(-res,res+1): for j in range(0,res+1): diff --git a/parallelization/instructions b/parallelization/instructions new file mode 100644 index 0000000..760e267 --- /dev/null +++ b/parallelization/instructions @@ -0,0 +1,19 @@ +instructions to run in parallel on a cluster: + +the hostfile should look like this: +host1 slots=2 +host2 slots=4 +host3 slots=4 +host4 slots=8 +... + +- git clone +- fix dependencies +- compile +- ./generate_commands.py > commands +- get hostfile +- check hostfile, delete entries which don't work +- get idlist +- ./sync +- delete old result and done files +- execute ./run on server diff --git a/parallelization/run b/parallelization/run new file mode 100755 index 0000000..6f37771 --- /dev/null +++ b/parallelization/run @@ -0,0 +1,7 @@ +#!/bin/bash + +cd /home/stecker/compute/triangle_reflection_complex/parallelization + +unset DISPLAY + +time mpirun -n 50 -x LD_LIBRARY_PATH=/home/stecker/compute/mps/lib --hostfile hostfile_big python3 runjobs.py diff --git a/parallelization/sync b/parallelization/sync new file mode 100755 index 0000000..6641feb --- /dev/null +++ b/parallelization/sync @@ -0,0 +1,7 @@ +#!/bin/bash + +rsync -rvt * utexas:compute/triangle_reflection_complex/parallelization/ +#rsync -lvt /usr/lib/libmps.so* utexas:compute/mps/lib/ +#rsync -rvt /usr/include/mps utexas:compute/mps/include/ + +# now run it with ssh utexas compute/triangle_reflection_complex/parallelization/run