Send mn.sh
go back to Main Page, Computational Resources, Clusters, External Resources, Marenostrum
Use this script to submit NWChem calculations to Marenostrum. Copy it in a file send_mn.sh, save it in your bin, and use it by typing: send_mn.sh name_input n XX:XX:XX, where name_input is the name of your input without the .nw, n the number of nodes you want to use and XX:XX:XX the time you will allow the calculation to run one day, 2 minuts and 10 seconds is 24:02:10.
#!/bin/bash
if [ ! -e "$1.nw" ]
then
echo "Input incorrecte!"
echo "Poseu nom input sense .nw, numero de nodes i temps(XX:XX:XX)"
else
echo "#!/bin/bash" > "$1".cmd
echo "# @ job_name = $1" >> "$1".cmd
echo "# @ initialdir = ." >> "$1".cmd
echo "# @ output = $1.out" >> "$1".cmd
echo "# @ error = $1%j.err" >> "$1".cmd
echo "# @ total_tasks = $2" >> "$1".cmd
echo "# @ wall_clock_limit = $3" >> "$1".cmd
echo "export NWCHEM_TOP=/gpfs/apps/NWCHEM/5.1.1/" >> "$1".cmd
echo "export NWCHEM_BASIS_LIBRARY=/gpfs/apps/NWCHEM/5.1.1/data/libraries/" >> "$1".cmd
echo "export NWCHEM_NWPW_LIBRARY=/gpfs/apps/NWCHEM/5.1.1/data/" >> "$1".cmd
echo " " >> "$1".cmd
echo "srun /gpfs/apps/NWCHEM/5.1.1/bin/nwchem.mx $1.nw " >> "$1".cmd
mnsubmit "$1".cmd
fi