11Fix MPI in run scripts
22Author: Samuel Moors (Vrije Universiteit Brussel)
3+
34diff -ur utils23.orig/runcry23 utils23/runcry23
4- --- utils23.orig/runcry23 2022-11-07 15:57:24.000000000 +0100
5- +++ utils23/runcry23 2025-05-16 15:32:06.861320036 +0200
5+ --- utils23.orig/runcry23 2026-01-08 15:19:03.718122000 +0100
6+ +++ utils23/runcry23 2026-01-08 17:35:54.349524000 +0100
67@@ -165,9 +165,6 @@
78 set here = $PWD
89 set TMPDIR = $CRY23_SCRDIR/tmp$$_`whoami`
@@ -23,24 +24,9 @@ diff -ur utils23.orig/runcry23 utils23/runcry23
2324 set OUTDIR = $here
2425 #
2526diff -ur utils23.orig/runMPPcry23 utils23/runMPPcry23
26- --- utils23.orig/runMPPcry23 2022-11-07 16:00:04.000000000 +0100
27- +++ utils23/runMPPcry23 2025-05-16 15:41:33.528486399 +0200
28- @@ -1,12 +1,10 @@
29- #!/bin/csh -f
30- ### CRYSTAL23 - running script for MPPcrystal executable
31- - if ( $#argv < 2) then
32- + if ( $#argv < 1) then
33- echo " "
34- echo Usage:
35- echo " "
36- - echo "$0" nproc inpfilename "["filename_restart_data "("r-filename")""]"
37- - echo " "
38- - echo nproc " " number of processors to be used for the calculation
39- + echo "$0" inpfilename "["filename_restart_data "("r-filename")""]"
40- echo " "
41- echo inpfilename.d12 " " CRYSTAL input deck for wave function calculation
42- echo " "
43- @@ -177,9 +175,6 @@
27+ --- utils23.orig/runMPPcry23 2026-01-08 15:19:03.739398000 +0100
28+ +++ utils23/runMPPcry23 2026-01-08 17:43:15.892592526 +0100
29+ @@ -177,9 +177,6 @@
4430 set here = $PWD
4531 set TMPDIR = $CRY23_SCRDIR/tmp_p$$_`whoami`
4632 #
@@ -50,7 +36,7 @@ diff -ur utils23.orig/runMPPcry23 utils23/runMPPcry23
5036 if (! $?CRY23_INP ) then
5137 set CRY23_INP = $here
5238 endif
53- @@ -190,16 +185,13 @@
39+ @@ -190,11 +187,10 @@
5440 set OUTFILE = out
5541 endif
5642 #
@@ -60,17 +46,10 @@ diff -ur utils23.orig/runMPPcry23 utils23/runMPPcry23
6046 set OUTDIR = $here
6147 # Note that the job launching line, later on, is custom too.
6248- set MPIDIR = /replace/this/line/with/your/own/mpibin/directory
63- - set MPIBIN = mpirun
49+ set MPIBIN = mpirun
6450 #
65- - set NPROCS = $1
66- - set FILEPREFIX = $2
67- - set F9PREFIX = $3
68- + set FILEPREFIX = $1
69- + set F9PREFIX = $2
70- #
71- set OUTFILE="$FILEPREFIX".$OUTFILE
72- #
73- @@ -211,14 +203,6 @@
51+ set NPROCS = $1
52+ @@ -211,14 +207,6 @@
7453 echo output data in $OUTDIR/$OUTFILE >>& $OUTDIR/$OUTFILE
7554 echo output data in $OUTDIR/$OUTFILE
7655 #
@@ -85,7 +64,7 @@ diff -ur utils23.orig/runMPPcry23 utils23/runMPPcry23
8564 #
8665 if(-e $XDIR/MPPcrystal && ! -z $XDIR/MPPcrystal ) then
8766 echo MPPcrystal executable in $XDIR >>& $OUTDIR/$OUTFILE
88- @@ -238,15 +222 ,6 @@
67+ @@ -238,15 +226 ,6 @@
8968 exit
9069 endif
9170 #
@@ -101,34 +80,19 @@ diff -ur utils23.orig/runMPPcry23 utils23/runMPPcry23
10180 if (-e $CRY23P_MACH/nodes.par && ! -z $CRY23P_MACH/nodes.par) then
10281 echo list of nodes in $CRY23P_MACH/nodes.par >>& $OUTDIR/$OUTFILE
10382 echo list of nodes in $CRY23P_MACH/nodes.par
104- @@ -453,7 +428 ,7 @@
83+ @@ -453,7 +432 ,7 @@
10584 #
10685 echo MPPcrystal job running in $TMPDIR on each node ...
10786 # Job Launching line:
10887- ${MPIDIR}/${MPIBIN} -machinefile $CRY23P_MACH/machines.LINUX -np $NPROCS $TMPDIR/MPPcrystal < $TMPDIR/INPUT >>& $OUTDIR/$OUTFILE
109- + ${MPIBIN} $TMPDIR/MPPcrystal < $TMPDIR/INPUT >>& $OUTDIR/$OUTFILE
88+ + ${MPIBIN} -np $NPROCS $TMPDIR/MPPcrystal < $TMPDIR/INPUT >>& $OUTDIR/$OUTFILE
11089 date >>& $OUTDIR/$OUTFILE
11190 echo Contents of temporary directory in master node `hostname`: >>& $OUTDIR/$OUTFILE
11291 ls -l >> $OUTDIR/$OUTFILE
11392diff -ur utils23.orig/runPcry23 utils23/runPcry23
114- --- utils23.orig/runPcry23 2022-11-07 16:01:25.000000000 +0100
115- +++ utils23/runPcry23 2025-05-16 15:32:22.316884285 +0200
116- @@ -1,12 +1,10 @@
117- #!/bin/csh -f
118- ### CRYSTAL23 - running script for Pcrystal executable
119- - if ( $#argv < 2) then
120- + if ( $#argv < 1) then
121- echo " "
122- echo Usage:
123- echo " "
124- - echo "$0" nproc inpfilename "["filename_restart_data "("r-filename")""]"
125- - echo " "
126- - echo nproc " " number of processors to be used for the calculation
127- + echo "$0" inpfilename "["filename_restart_data "("r-filename")""]"
128- echo " "
129- echo inpfilename.d12 " " CRYSTAL input deck for wave function calculation
130- echo " "
131- @@ -177,9 +175,6 @@
93+ --- utils23.orig/runPcry23 2026-01-08 15:19:03.783881000 +0100
94+ +++ utils23/runPcry23 2026-01-08 17:42:44.381464880 +0100
95+ @@ -177,9 +177,6 @@
13296 set here = $PWD
13397 set TMPDIR = $CRY23_SCRDIR/tmp_p$$_`whoami`
13498 #
@@ -138,7 +102,7 @@ diff -ur utils23.orig/runPcry23 utils23/runPcry23
138102 if (! $?CRY23_INP ) then
139103 set CRY23_INP = $here
140104 endif
141- @@ -190,17 +185,14 @@
105+ @@ -190,12 +187,11 @@
142106 set OUTFILE = out
143107 endif
144108 #
@@ -149,17 +113,10 @@ diff -ur utils23.orig/runPcry23 utils23/runPcry23
149113 # Note that the job launching line, later on, is custom too.
150114 # The next line defines a varable for the path to the MPI bin directory
151115- set MPIDIR = /replace/this/line/with/your/own/mpibin/directory
152- - set MPIBIN = mpirun
153- #
154- - set NPROCS = $1
155- - set FILEPREFIX = $2
156- - set F9PREFIX = $3
157- + set FILEPREFIX = $1
158- + set F9PREFIX = $2
116+ set MPIBIN = mpirun
159117 #
160- set OUTFILE="$FILEPREFIX".$OUTFILE
161- #
162- @@ -212,14 +204,6 @@
118+ set NPROCS = $1
119+ @@ -212,14 +208,6 @@
163120 echo output data in $OUTDIR/$OUTFILE >>& $OUTDIR/$OUTFILE
164121 echo output data in $OUTDIR/$OUTFILE
165122 #
@@ -174,7 +131,7 @@ diff -ur utils23.orig/runPcry23 utils23/runPcry23
174131 #
175132 if(-e $XDIR/Pcrystal && ! -z $XDIR/Pcrystal ) then
176133 echo Pcrystal executable in $XDIR >>& $OUTDIR/$OUTFILE
177- @@ -239,15 +223 ,6 @@
134+ @@ -239,15 +227 ,6 @@
178135 exit
179136 endif
180137 #
@@ -190,34 +147,19 @@ diff -ur utils23.orig/runPcry23 utils23/runPcry23
190147 if (-e $CRY23P_MACH/nodes.par && ! -z $CRY23P_MACH/nodes.par) then
191148 echo list of nodes in $CRY23P_MACH/nodes.par >>& $OUTDIR/$OUTFILE
192149 echo list of nodes in $CRY23P_MACH/nodes.par
193- @@ -454,7 +429 ,7 @@
150+ @@ -454,7 +433 ,7 @@
194151 #
195152 echo Pcrystal job running in $TMPDIR on each node ...
196153 # Job Launching line:
197154- ${MPIDIR}/${MPIBIN} -machinefile $CRY23P_MACH/machines.LINUX -np $NPROCS $TMPDIR/Pcrystal < $TMPDIR/INPUT >>& $OUTDIR/$OUTFILE
198- + ${MPIBIN} $TMPDIR/Pcrystal < $TMPDIR/INPUT >>& $OUTDIR/$OUTFILE
155+ + ${MPIBIN} -np $NPROCS $TMPDIR/Pcrystal < $TMPDIR/INPUT >>& $OUTDIR/$OUTFILE
199156 date >>& $OUTDIR/$OUTFILE
200157 echo Contents of temporary directory in master node `hostname`: >>& $OUTDIR/$OUTFILE
201158 ls -l >> $OUTDIR/$OUTFILE
202159diff -ur utils23.orig/runPprop23 utils23/runPprop23
203- --- utils23.orig/runPprop23 2022-11-07 16:03:56.000000000 +0100
204- +++ utils23/runPprop23 2025-05-16 16:15:06.555523261 +0200
205- @@ -1,12 +1,10 @@
206- #!/bin/csh -f
207- ### CRYSTAL23 - running script for Pproperties executable
208- - if ( $#argv < 3) then
209- + if ( $#argv < 2) then
210- echo " "
211- echo Usage:
212- echo " "
213- - echo "$0" nproc inpfilename wavefuncfilename ""
214- - echo " "
215- - echo nproc " " number of processors to be used for the calculation
216- + echo "$0" inpfilename wavefuncfilename ""
217- echo " "
218- echo inpfilename.d3 " " CRYSTAL input deck for wave function calculation
219- echo " "
220- @@ -113,7 +111,7 @@
160+ --- utils23.orig/runPprop23 2026-01-08 15:19:03.812290000 +0100
161+ +++ utils23/runPprop23 2026-01-08 17:55:55.089408294 +0100
162+ @@ -113,7 +113,7 @@
221163 echo SEEBECK.DAT " " inpfilename_wf-filename_SEEBECK.DAT " " Seebeck coefficient "("BOLTZAO")"
222164 echo POWER.DAT " " inpfilename_wf-filename_POWER.DAT " " Power factor coefficient "("BOLTZAO")"
223165 echo KAPPA.DAT " " inpfilename_wf-filename_KAPPA.DAT " " electron thermal conductivity "("BOLTZAO")"
@@ -226,7 +168,7 @@ diff -ur utils23.orig/runPprop23 utils23/runPprop23
226168 echo TDF.DAT " " inpfilename_wf-filename_TDF.DAT " " transport distribution function "("BOLTZAO")"
227169 #
228170 echo definablename_numering_Kkindex_real.molden " "definablename_numering_Kkindex_real.molden " "data for Crystalline Orbitals Visualization "("ORBITALS")"
229- @@ -196,9 +194 ,6 @@
171+ @@ -196,9 +196 ,6 @@
230172 set here = $PWD
231173 set TMPDIR = $CRY23_SCRDIR/tmp_p$$_`whoami`
232174 #
@@ -236,7 +178,7 @@ diff -ur utils23.orig/runPprop23 utils23/runPprop23
236178 if (! $?CRY23_INP ) then
237179 set CRY23_INP = $here
238180 endif
239- @@ -209,16 +204,13 @@
181+ @@ -209,11 +206,10 @@
240182 set OUTFILE = outp
241183 endif
242184 #
@@ -246,17 +188,10 @@ diff -ur utils23.orig/runPprop23 utils23/runPprop23
246188 set OUTDIR = $here
247189 # Note that the job launching line, later on, is custom too.
248190- set MPIDIR = /replace/this/line/with/your/own/mpibin/directory
249- - set MPIBIN = mpirun
250- #
251- - set NPROCS = $1
252- - set FILEPREFIX = $2
253- - set F9PREFIX = $3
254- + set FILEPREFIX = $1
255- + set F9PREFIX = $2
191+ set MPIBIN = mpirun
256192 #
257- set OUTFILE="$FILEPREFIX".$OUTFILE
258- #
259- @@ -231,23 +223,6 @@
193+ set NPROCS = $1
194+ @@ -231,24 +227,6 @@
260195 echo output data in $OUTDIR/$OUTFILE >>& $OUTDIR/$OUTFILE
261196 echo output data in $OUTDIR/$OUTFILE
262197 #
@@ -277,21 +212,22 @@ diff -ur utils23.orig/runPprop23 utils23/runPprop23
277212- echo file machines.LINUX in $CRY23P_MACH not found or empty
278213- exit
279214- endif
280- #
215+ - #
281216 if (-e $CRY23P_MACH/nodes.par && ! -z $CRY23P_MACH/nodes.par) then
282217 echo list of nodes in $CRY23P_MACH/nodes.par >>& $OUTDIR/$OUTFILE
283- @@ -340,7 +315,7 @@
218+ echo list of nodes in $CRY23P_MACH/nodes.par
219+ @@ -340,7 +318,7 @@
284220 if (-e fort.9 && ! -z fort.9 ) then
285221 echo Pproperties job running in $TMPDIR ...
286222 # Job Launching line:
287223- ${MPIDIR}/${MPIBIN} -machinefile $CRY23P_MACH/machines.LINUX -np $NPROCS $TMPDIR/Pproperties < $TMPDIR/INPUT >>& $OUTDIR/$OUTFILE
288- + ${MPIBIN} $TMPDIR/Pproperties < $TMPDIR/INPUT >>& $OUTDIR/$OUTFILE
224+ + ${MPIBIN} -np $NPROCS $TMPDIR/Pproperties < $TMPDIR/INPUT >>& $OUTDIR/$OUTFILE
289225 date >>& $OUTDIR/$OUTFILE
290226 echo Contents of temporary directory: >>& $OUTDIR/$OUTFILE
291227 ls -l >>& $OUTDIR/$OUTFILE
292228diff -ur utils23.orig/runprop23 utils23/runprop23
293- --- utils23.orig/runprop23 2022-11-07 16:05:11.000000000 +0100
294- +++ utils23/runprop23 2025-05-16 16:10:42.492081970 +0200
229+ --- utils23.orig/runprop23 2026-01-08 15:19:03.844898000 +0100
230+ +++ utils23/runprop23 2026-01-08 17:40:25.599611000 +0100
295231@@ -89,7 +89,7 @@
296232 echo SEEBECK.DAT " " inpfilename_wf-filename_SEEBECK.DAT " " Seebeck coefficient "("BOLTZAO")"
297233 echo POWER.DAT " " inpfilename_wf-filename_POWER.DAT " " Power factor coefficient "("BOLTZAO")"
0 commit comments