QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: Aadhityan on August 22, 2017, 13:29
-
I want to run batch jobs in command line mode. Any scripts available to run files sequentially without using job manager. I am using parallel computing.
-
The script depends a lot on the environment where you want to run the calculation.
If you run on a cluster with e.g. PBS, you should be able to preview the submission script by clicking on the corresponding machine in the Machine Manager, then on Edit->Preview Script. It should be possible to use the same script also from the terminal.
If it is Linux on your local machine, use the following script "mpi_atkpython".
#!/bin/bash
export OMP_NUM_THREADS=1
export OMP_DYNAMIC=FALSE
MY_MPI=/home/stradi/QuantumWise/VNL-ATK-2017.0/libexec/mpiexec.hydra
MY_PYTHON=/home/stradi/QuantumWise/VNL-ATK-2017.0/bin/atkpython
N="-n $1"
$MY_MPI $N $MY_PYTHON $2
The variables MY_MPI and MY_PYTHON should point at the MPI executable and at the atkpython executable, respectively.
To run the script "calculation.py" on 4 processors, type:
mpi_atkpython 4 calculation.py
Regards,
Daniele.
-
Actually I want to run than one python script(file) serially. currently I am using this command to run one file
mpiexec -n 4 -f /..../machinefile atkpython /.../input1.py > /.../input1.log
I mean I want to give more than one file for input. So if one file calculation over, it should take another file automatically. i.e. input2.py, input3.py etc.
-
Sounds like you could try with a simple shell-script, like explained here: http://www.linfo.org/create_shell_1.html
in your case it would probably just be something like:
mpiexec -n 4 -f /..../machinefile atkpython /.../input1.py > /.../input1.log
mpiexec -n 4 -f /..../machinefile atkpython /.../input2.py > /.../input2.log
etc.