File: mpiexec.sshsync

package info (click to toggle)
petsc 3.1.dfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 131,360 kB
  • ctags: 491,710
  • sloc: ansic: 288,064; cpp: 66,909; python: 28,799; fortran: 19,153; makefile: 13,945; sh: 3,502; f90: 1,655; xml: 620; csh: 230; java: 13
file content (30 lines) | stat: -rwxr-xr-x 1,108 bytes parent folder | download | duplicates (3)
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