1#!/bin/bash
2#
3# Copyright (C) 2001 Quantum ESPRESSO
4#
5# This program is free software; you can redistribute it and/or
6# modify it under the terms of the GNU General Public License
7# as published by the Free Software Foundation; either version 2
8# of the License. See the file `License' in the root directory
9# of the present distribution.
10
11if [[ $QE_USE_MPI == 1 ]]; then
12  export PARA_PREFIX="mpirun -np ${TESTCODE_NPROCS}"
13else
14  unset PARA_PREFIX
15fi
16
17echo "Running ZG ..."
18echo "${PARA_PREFIX} ${ESPRESSO_ROOT}/bin/ZG.x -input $1 > $2 2> $3"
19${PARA_PREFIX} ${ESPRESSO_ROOT}/bin/ZG.x -input $1 > $2 2> $3
20if [[ -e CRASH ]]
21then
22    cat $2
23fi
24