batch run


Clicked A Few Times
Hello,

I'm trying to write a bash script to run multiple .nw files one after the other (in Ubuntu), but so far I have not been able to, can anyone help?
my script:
#!/bin/bash
echo "starting batch run"
export nwchem=/mnt/d/nwchem/bin/LINUX64/nwchem$nwchem
PATH=/usr/local/openmpi/bin:$PATH
$PATH/mpirun -np 4 $nwchem /Guanine_K9H/Guanine_K9H.nw >& Guanine_K9H.out
$PATH/mpirun -np 4 $nwchem /Guanine_K7H/Guanine_K7H.nw >& Guanine_K7H.out
$PATH/mpirun -np 4 $nwchem /Guanine_E9H1/Guanine_E9H1.nw >& Guanine_E9H1.out
$PATH/mpirun -np 4 $nwchem /Guanine_E9H2/Guanine_E9H2.nw >& Guanine_E9H2.out
$PATH/mpirun -np 4 $nwchem /Guanine_E7H1/Guanine_E7H1.nw >& Guanine_E7H1.out
$PATH/mpirun -np 4 $nwchem /Guanine_E7H2/Guanine_E7H2.nw >& Guanine_E7H2.out
echo "batch finished"

Forum Vet
error message
You might want to report the error message you are getting. It's pretty hard to understand what it is going wrong without seeing the error message

Clicked A Few Times
I think it might be a linux issue and not nwchem, the error i get is:
: No such file or directory

Clicked A Few Times
You added the path to mpi to your PATH env var
PATH=/usr/local/openmpi/bin:$PATH

then used it like this
$PATH/mpirun

but that's wrong. By adding the path to mpi to $PATH you should be able to just do
mpirun -np etc. etc.

prefixing it with $PATH is un-necessary and won't work.

--
Jason

Forum Vet
This is what I would write

/usr/local/openmpi/bin/mpirun -np 4 /mnt/d/nwchem/bin/LINUX64/nwchem K9H.nw >& Guanine_K9H.out


Forum >> NWChem's corner >> Running NWChem