Commit 998fda28 authored by kraus's avatar kraus

adding additional RestartTest to check that the hdf5 file we write remains correct

parent 0eda980e
#!/bin/bash
#cp RestartTest-3.h5.bak RestartTest-3.h5
rm -f RestartTest-3.stat
rm -f RestartTest-3.stat RestartTest-3.lbal RestartTest-3.h5
mpirun -np 4 $OPAL_EXE_PATH/opal RestartTest-3.in -restart -1 -restartfn RestartTest-3.h5.bak --commlib mpi --info 0 --warn 0 2>&1
#!/bin/bash
#cp RestartTest-4.h5.bak RestartTest-4.h5
rm -f RestartTest-4.stat
rm -f RestartTest-4.stat RestartTest-4.lbal RestartTest-4.h5
mpirun -np 4 $OPAL_EXE_PATH/opal RestartTest-4.in -restart 0 -restartfn RestartTest-4.h5.bak --commlib mpi --info 0 --warn 0 2>&1
"testing that we can restart from any step in the file basename.h5"
"testing that we can restart from any step in a file other than basename.h5"
stat "rms_x" last 1E-10 #this is a comment
stat "rms_y" last 1E-10 #this is a comment
stat "rms_s" last 1E-10 #this is a comment
\ No newline at end of file
stat "rms_s" last 1E-10 #this is a comment
#!/bin/bash
cp RestartTest-5.h5.bak RestartTest-5.h5
rm -f RestartTest-5.stat
rm -f RestartTest-5.stat RestartTest-5.lbal
mpirun -np 4 $OPAL_EXE_PATH/opal RestartTest-5.in -restart 0 --commlib mpi --info 0 --warn 0 2>&1
"testin that we can restart from any step in a file other than basename.h5"
"testin that we can restart from any step in file basename.h5"
stat "rms_x" last 1E-10 #this is a comment
stat "rms_y" last 1E-10 #this is a comment
stat "rms_s" last 1E-10 #this is a comment
\ No newline at end of file
stat "rms_s" last 1E-10 #this is a comment
This diff is collapsed.
Option, PSDUMPFREQ=50;
Option, STATDUMPFREQ=1;
Option, ECHO=FALSE;
Option, AUTOPHASE=4;
Title, string="Phase 1 of PSI FEL 250 Injector with CTF3 RF Photoinjector";
FINSB01_RACC_phi = 0;
FINSB02_RACC_phi = 0;
REPARTFREQ = 100;
MINSTEPFORREBIN = 600;
QB = 0.2e-9;
BF = 2998.0;
BC = QB*BF;
// Begin: CTF3 /////////////////////////////////////////////////////////////////////////////////////////////////
//
// Definition of CTF3 RF photoinjector.
//
//
// L: physical element length (real in m)
// VOLT: field scaling factor (real)
// FMAPFN: field file name (string)
// ELEMEDGE: physical start of the element on the floor (real in m)
// TYPE: specifies "STANDING" (default), "TRAVELLING" or "SINGLE GAP" structure
// FREQ: RF frequency of cavity (real in MHz).
//
FINSS_RGUN: RFCavity, L = 0.34986, VOLT = 100.0, FMAPFN = "CTF3_Ez_ASTRA.opal",
ELEMEDGE =0.0, TYPE = "STANDING", FREQ = BF,
LAG = -3.5/180.0*PI;
//
// L: physical element length (real in m)
// KS: field scaling factor (real)
// FMAPFN: field file name (string)
// ELEMEDGE: physical start of the element on the floor (real in m)
//
FIND1_MSOL10: Solenoid, L = 0.6, KS = 0.206, FMAPFN = "NEW_SINGLE_SOL_NOFRINGE_ASTRA.opal", ELEMEDGE = 0.3;
//
// L: physical element length (real in m)
// KS: field scaling factor (real)
// ELEMEDGE: physical start of the element on the floor (real in m)
//
FIND1_MQ10: Quadrupole, L=0.1, K1= 0.0, ELEMEDGE=1.38;
FIND1_MQ20: Quadrupole, L=0.1, K1= 0.0, ELEMEDGE=1.56;
FIND1_MQ30: Quadrupole, L=0.1, K1= 0.0, ELEMEDGE=1.74;
//elemento fittizio utilizzato per prolungare la linea del fascio
END: Solenoid, L=0.01, KS = 0.01, ELEMEDGE=100., FMAPFN="NEW_SINGLE_SOL_NOFRINGE_ASTRA.opal";
Injector: Line = (FINSS_RGUN, FIND1_MSOL10, FIND1_MQ10, FIND1_MQ20, FIND1_MQ30, END);
// End: CTF3 //////////////////////////////////////////////////////////////////////////////////////////////////
// Begin: Screen monitors ////////////////////////////////////////////////////////////////////////////////////
//
// Define screen monitors in beam line.
//
// L: physical element length (real in m). Always equal to 1 cm.
// ELEMEDGE: position of screen (real in m). This is where the particle information is taken.
// OUTFN: name of .h5 file to store data. Include ".h5" on end.
//
SCREEN1: Monitor, L = 0.01, ELEMEDGE = 0.902, OUTFN = "Screen1.h5";
SCREEN2: Monitor, L = 0.01, ELEMEDGE = 1.0165, OUTFN = "Screen2.h5";
//previous screen, virtual screen placed in the mid point of RFD
SCREEN3: Monitor, L = 0.01, ELEMEDGE = 1.1295, OUTFN = "Screen3.h5";
SCREEN4: Monitor, L = 0.01, ELEMEDGE = 2.2525, OUTFN = "Screen4.h5";
SCREEN5: Monitor, L = 0.01, ELEMEDGE = 2.735, OUTFN = "Screen5.h5";
SCREEN6: Monitor, L = 0.01, ELEMEDGE = 3.0, OUTFN = "Screen6.h5";
SCREEN7: Monitor, L = 0.01, ELEMEDGE = 3.126, OUTFN = "Screen7.h5";
SCREEN8: Monitor, L = 0.01, ELEMEDGE = 3.252, OUTFN = "Screen8.h5";
SCREEN9: Monitor, L = 0.01, ELEMEDGE = 4.126, OUTFN = "Screen9.h5";
SCREEN10: Monitor, L = 0.01, ELEMEDGE = 5.126, OUTFN = "Screen10.h5";
SCREENS: Line = (SCREEN1,SCREEN2,SCREEN3,SCREEN4,SCREEN5,SCREEN6,SCREEN7,SCREEN8,SCREEN9,SCREEN10);
// End: Screen monitors //////////////////////////////////////////////////////////////////////////////////////
// Begin: Fieldsolver ///////////////////////////////////////////
//
// Definition of first field solver.
//
Fs1:FIELDSOLVER, FSTYPE = FFT, MX = 32, MY = 32, MT = 64,
PARFFTX = true, PARFFTY = true, PARFFTT = true,
BCFFTX = open, BCFFTY = open, BCFFTT = open,
BBOXINCR = 1, GREENSF = INTEGRATED;
// End: Fieldsolver ////////////////////////////////////////////
Dist1:DISTRIBUTION, DISTRIBUTION = "GUNGAUSSFLATTOPTH",
sigmax = 0.000395,
sigmapx = 0.0,
corrx = 0.0,
sigmay = 0.000395,
sigmapy = 0.0,
corry = 0.0,
sigmat = 0.0,
pt = 0.0,
sigmapt = 0.0,
corrt = 0.0,
tRise = 7.45e-12,
tFall = 7.45e-12,
tPulseFWHM = 10.4e-12,
ekin = 0.4,
NBIN = 5,
DEBIN = 30;
beam1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = 20000, BFREQ = BF , BCURRENT = BC, CHARGE = -1;
SELECT, LINE=Injector;
// Simulation of the gun with step size DTGUN
TRACK, LINE= Injector, BEAM=beam1, MAXSTEPS=100, DT=5.0e-12, ZSTOP=0.03;
RUN, METHOD = "PARALLEL-T", BEAM = beam1, FIELDSOLVER = Fs1, DISTRIBUTION = Dist1;
ENDTRACK;
TRACK, LINE= Injector, BEAM= beam1, MAXSTEPS= 30, DT= 5.0e-12, ZSTOP= 0.1;
RUN, METHOD= "PARALLEL-T", BEAM= beam1, FIELDSOLVER= Fs1;
ENDTRACK;
QUIT;
#!/bin/bash
cp RestartTest-6.h5.bak RestartTest-6.h5
rm -f RestartTest-6.stat
mpirun -np 4 $OPAL_EXE_PATH/opal RestartTest-6.in -restart -1 --commlib mpi --info 0 --warn 0 2>&1
"RestartTest-6"
stat "rms_x" last 1E-10 #this is a comment
stat "rms_y" last 1E-10 #this is a comment
stat "rms_s" last 1E-10 #this is a comment
\ No newline at end of file
#!/bin/bash
#$ -cwd
#$ -j y
#$ -pe orte 4
#$ -N RestartTest-6-RT
#$ -v LD_LIBRARY_PATH,OPAL_EXE_PATH,OPENMPI,REG_TEST_DIR
MACHINE_FILE=$TMPDIR/machinefile
awk '/^merlin/ {print $1" slots="$2}' $PE_HOSTFILE > $MACHINE_FILE
cp $MACHINE_FILE machinefile.last
cd $REG_TEST_DIR
cp RestartTest-6.h5.bak RestartTest-6.h5
rm -f RestartTest-6.stat
OPAL="$OPAL_EXE_PATH/opal RestartTest-6.in -restart -1 --commlib mpi --info 0 --warn 0 2>&1"
CMD="$OPENMPI/bin/mpirun -x LD_LIBRARY_PATH -machinefile $MACHINE_FILE -np $NSLOTS $OPAL "
$CMD
# 4
5201 4593 5090 5116
5191 4595 5093 5121
5177 4597 5099 5127
5173 4592 5103 5132
5160 4598 5108 5134
5150 4605 5111 5134
5146 4606 5113 5135
5141 4605 5117 5137
5134 4608 5119 5139
5127 4610 5125 5138
5118 4613 5130 5139
5112 4613 5137 5138
5108 4610 5148 5134
5101 4607 5157 5135
5096 4608 5162 5134
5084 4611 5168 5137
5069 4614 5175 5142
5057 4621 5179 5143
5049 4616 5187 5148
5039 4619 5190 5152
5034 4614 5194 5158
5027 4615 5198 5160
5017 4619 5203 5161
5014 4619 5203 5164
5009 4622 5203 5166
5005 4621 5205 5169
5000 4626 5205 5169
4996 4628 5207 5169
4992 4630 5206 5172
4990 4630 5206 5174
4989 4629 5204 5178
4986 4630 5205 5179
4985 4630 5204 5181
4983 4628 5207 5182
4981 4627 5207 5185
4978 4630 5206 5186
4976 4627 5207 5190
4975 4628 5206 5191
6594b23a0a63f849072b9562fc989c9c RestartTest-6.lbal
This diff is collapsed.
6117d58561c989522a74e3bc0a251163 RestartTest-6.out
This diff is collapsed.
48e8ee43b4eb5d87fcd1df57697174d1 RestartTest-6.stat
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment