1#!/bin/sh 2 3# 4# Select the appropriate run below (at the end). 5# 6# Take care to use the appropriate (e.g., parallel or serial) copy 7# of siesta. To run parallel jobs, you have to figure out how to 8# set the MPI environment. For a simple single-node interactive calculation 9# (where possible, such as in a Rocks cluster), you can use the parallel.sh 10# script. 11# 12# Make sure that you are using the right version of Siesta. 13# The SIESTA setting below is quite naive and might not work 14# in all cases. You can call this script as: 15# 16# SIESTA=/path/to/siesta test.sh 17# 18# 19 20ROOT="../../../.." 21PSEUDOS=${ROOT}/Tests/Pseudos 22# 23if [ -z "$SIESTA" ] ; then 24 SIESTA=${ROOT}/Obj/siesta 25fi 26echo "Using Siesta executable: $SIESTA" 27# 28 29#rm -r work 30if [ -d work ] ; then 31 echo "Work directory 'work' exists. Please delete it" 32 exit 33fi 34 35# 36mkdir work 37cd work 38cp -p ../*.fdf . 39cp ${PSEUDOS}/H.psf . 40cp ${PSEUDOS}/O.psf . 41ln -sf ${SIESTA} ./siesta 42# 43 44echo ""; echo "simple_pipes_serial" 45../Src/simple_pipes_serial | tee simple_pipes_serial.out 46mv h2o.out siesta_pipes_serial.out 47 48echo ""; echo "simple_pipes_parallel" 49../Src/simple_pipes_parallel | tee simple_pipes_parallel.out 50mv h2o.out siesta_pipes_parallel.out 51 52echo ""; echo "simple_mpi_serial" 53../Src/simple_mpi_serial | tee simple_mpi_serial.out 54mv h2o.out siesta_mpi_serial.out 55 56echo ""; echo "simple_mpi_parallel" 57mpirun -np 2 -output-filename simple_mpi_parallel.out ../Src/simple_mpi_parallel 58mv h2o.out siesta_mpi_parallel.out 59 60cat socket.fdf >> h2o.fdf 61 62echo ""; echo "simple_sockets_serial" 63../Src/simple_sockets_serial | tee simple_sockets_serial.out 64mv h2o.out siesta_sockets_serial.out 65 66echo ""; echo "simple_sockets_parallel" 67../Src/simple_sockets_parallel | tee simple_sockets_parallel.out 68mv h2o.out siesta_sockets_parallel.out 69 70