1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
#!/bin/sh
#
# mpiexec for use with the PETSC_ARCH remote
#
ssh=`grep SSH ${PETSC_DIR}/${PETSC_ARCH}/conf/petscvariables | cut -f2 -d=`
rsync=`grep RSYNC ${PETSC_DIR}/${PETSC_ARCH}/conf/petscvariables | cut -f2 -d=`
workspace=`grep WORKSPACE ${PETSC_DIR}/${PETSC_ARCH}/conf/petscvariables | cut -f2 -d=`
workmachine=`grep WORKMACHINE ${PETSC_DIR}/${PETSC_ARCH}/conf/petscvariables | cut -f2 -d=`
workpetscdir=`grep WORKPETSCDIR ${PETSC_DIR}/${PETSC_ARCH}/conf/petscvariables | cut -f2 -d=`
workpetscarch=`grep WORKPETSCARCH ${PETSC_DIR}/${PETSC_ARCH}/conf/petscvariables | cut -f2 -d=`
inputdatafiles=`grep INPUTDATAFILES makefile | cut -f2 -d=`
outputdatafiles=`grep OUTPUTDATAFILES makefile | cut -f2 -d=`
progname=$*
if [ ${inputdatafiles}DUMMY != DUMMY ]; then
$rsync $inputdatafiles $workmachine:$workspace
fi
$ssh $workmachine "cd $workspace ; setenv PETSC_DIR $workpetscdir ; setenv PETSC_ARCH $workpetscarch; ${workpetscdir}/bin/petscmpiexec $progname"
if [ ${outputdatafiles}DUMMY != DUMMY ]; then
for i in $outputdatafiles; do
$rsync $workmachine:$workspace/$i . ;
done;
fi
exit 0
|