AKT 1/6/19
-
Compiling:
- Set the config data you want to run the batch for in
batch_compile.py
. This includes whether the script should continue from a previous checkpoint. This script uses the config templateconfig_template.hpp
to create temporaryconfig.hpp
files, which are used when compiling each item in the batch, and then deleted. - Run
python batch_compile.py
. - Each of the compiled executables and their config files are stored in the folder
[timestamp]/SimName0
. Any required checkpoint files will also be here.
- Set the config data you want to run the batch for in
-
Running:
- Beware of
screen
: you might get anqsub: could not create/open tmp file /var/tmp/pbsscrptwbKVMy for script
error if you are inside ascreen
window. - Set the wall time, number of nodes and number of CPUs/node you want to give the batch in
batch_run.py
. (Note that the total number of CPUs must divide intoNPTS_X
,NPTS_Y
andNPTS_Z
inconfig.hpp
[check].) This script uses the config templatepbs_job_script_run_template.hpp
to create temporarypbs_job_script_run.hpp
files, which are used when compiling each item in the batch. We could delete them afterwards if we want, but we don't. - Run
python batch_run.py [timestamp]
, using the timestamp from the compiling process. - Check stats:
qstat
. - To view screen output as it runs: look in
[timestamp]/SimName0/pbs_output
folder.
- Beware of
-
Compiling:
- Set the config data you want to run the simulation for in
config.hpp
. - Run
source make_wrapper_cx2.sh
- Set the config data you want to run the simulation for in
-
Running:
- Beware of
screen
: you might get anqsub: could not create/open tmp file /var/tmp/pbsscrptwbKVMy for script
error if you are inside ascreen
window. - Set the wall time, number of nodes and number of CPUs/node you want to give the batch in
pbs_job_script.sh
. (Note that the total number of CPUs must divide intoNPTS_XY
andNPTS_Z
inconfig.hpp
.) - Run
qsub pbs_job_script.sh
. - Check stats:
qstat
. - To view screen output as it runs: look in
pbs_output
folder.
- Beware of
-
Compiling:
- Set the config data you want to run the simulation for in
config.hpp
. - Run
source make_wrapper_cx2.sh
- Set the config data you want to run the simulation for in
-
Running:
- If
source make_wrapper_cx2.sh
hasn't been called this session, runsource run_wrapper_cx2.sh
. - Run
./MPIFilament
- If
-
Compiling:
make MPI_FIL
-
Running:
export OPENBLAS_NUM_THREADS=1
. If you don't do this it will be SLOW. (See below for optimal number)- FOR NON-PARALLEL:
./MPIFilament
- FOR PARALLEL:
mpiexec -np 4 ./MPIFilament
- edit
main.cpp
- Worms with different lengths:
BeadNumbers
- Worms with different KAP:
BendingFactors
- Worms with different lengths:
- config file:
config.hpp
- Number of worms
- (RPY only) Number of nodes: also in
config.hpp
undermyOpenMPthreads
. For FCM, this is controlled automatically by fftw. - Periodic box size: change
NPTS_XY
andNPTS_Z
inconfig.hpp
becauseLfcmBox_xy = NPTS_XY*dx
andLfcmBox_z = NPTS_Z*dx
(inmulti_filament_header.hpp
);
- Swimming? Set
SwimmingHelixBeta=1
OPENBLAS_NUM_THREADS
, set in theexport
statement, is the number of threads used by Armadillo. For short filaments, more than 1 is unlikely to help. For larger filaments, where the filament matrix solve is harder, maybe more will help.myOpenMPthreads
is commented out ofconfig.hpp
, as it is the number of parallel loops for doing RPY. For FCM, it is irrelevant.omp parallel for
onmain.cpp:265
(ish) slows things down on Gehrig, maybe because 30-odd filaments isn't enough to make it worthwhile. Bear in mind!- For FFT code to work best,
NPTS_X
,NPTS_Y
andNPTS_Z
should be 2^N*P for some low prime (or low prime power) P. This is just how FFTW works. It also works best ifNPTS_X
is divisible by the number of nodes, as this is the direction that FFTW splits the domain for parallel processing. None of these things are necessary, however.
- Checkpointing is implemented but naively. It assumes that whatever's in
config.hpp
is also right for the restarted file. It reads innt, X, q, U, Xt, qt, Ut, lam, lam1, lam2
. - Every
plot_steps
timesteps, when the program saves to file, it also saves checkpoint data toSimulationName.bak
. This is more than just current positions: the timestepping scheme needs (e.g.) the last two data points to interpolate forwards. - To restart simulation from checkpoint,
./MPIFilament SimulationName
(whereSimulationName.bak
is the backup file). - If
SimulationName
inconfig.hpp
is the same as the checkpoint file, then the program will add data to the bottom of the existingSimulationName.dat
data file. - To start a simulation from time 0, using checkpoint backup data as position initialisation, use
./MPIFilament SimulationName restart
- Can not cope with filaments of different lengths.
- Can not cope with filaments with different swim phases.