| 1 | #! /usr/bin/env tcsh
|
|---|
| 2 | #
|
|---|
| 3 | # Builds bmake/remote-$arch/petscrules and petscconf for all the
|
|---|
| 4 | # systems listed in maint/confignightly
|
|---|
| 5 | #
|
|---|
| 6 | set day=`date | cut -f1 -d" "`
|
|---|
| 7 | #
|
|---|
| 8 | # on cygwin - tcsh gives funky paths - so reset it to normal bash one so 'chkpetsc_dir' doesn't complain
|
|---|
| 9 | set nPETSC_DIR=`pwd | sed s~/cygdrive/h~~`
|
|---|
| 10 | if ( ! -f ${nPETSC_DIR}/include/petscsys.h ) then
|
|---|
| 11 | set maintdir=`dirname $0`
|
|---|
| 12 | set bindir=`dirname $maintdir`
|
|---|
| 13 | set nPETSC_DIR=`dirname $bindir`
|
|---|
| 14 | if ( ( ${nPETSC_DIR} !~ /*) || (! -f ${nPETSC_DIR}/include/petscsys.h )) then
|
|---|
| 15 | if (${?PETSC_DIR}) then
|
|---|
| 16 | set nPETSC_DIR=${PETSC_DIR}
|
|---|
| 17 | if ( ! -f ${nPETSC_DIR}/include/petscsys.h ) then
|
|---|
| 18 | echo "Unable to locate PETSc directory, run with full path or in PETSc directory"
|
|---|
| 19 | exit
|
|---|
| 20 | endif
|
|---|
| 21 | else
|
|---|
| 22 | echo "Unable to locate PETSc directory, run with full path or in PETSc directory"
|
|---|
| 23 | exit
|
|---|
| 24 | endif
|
|---|
| 25 | endif
|
|---|
| 26 | endif
|
|---|
| 27 |
|
|---|
| 28 | foreach i (${nPETSC_DIR}/maint/confignightly/*)
|
|---|
| 29 | source $i
|
|---|
| 30 | echo Making configure files for $CONF
|
|---|
| 31 |
|
|---|
| 32 | if ! -d ${nPETSC_DIR}/bmake/remote-${CONF} then
|
|---|
| 33 | mkdir ${nPETSC_DIR}/bmake/remote-${CONF}
|
|---|
| 34 | endif
|
|---|
| 35 |
|
|---|
| 36 | echo "remote: remote_sshrsync" >! ${nPETSC_DIR}/bmake/remote-${CONF}/petscrules
|
|---|
| 37 |
|
|---|
| 38 | echo "WORKMACHINE ="${MACH} >! ${nPETSC_DIR}/bmake/remote-${CONF}/petscconf
|
|---|
| 39 | echo 'WORKSPACE =/sandbox/workspace-${USER}' >> ${nPETSC_DIR}/bmake/remote-${CONF}/petscconf
|
|---|
| 40 | echo "WORKPETSCDIR ="${LOC} >> ${nPETSC_DIR}/bmake/remote-${CONF}/petscconf
|
|---|
| 41 | echo "WORKPETSCARCH ="${CONF} >> ${nPETSC_DIR}/bmake/remote-${CONF}/petscconf
|
|---|
| 42 |
|
|---|
| 43 | echo "RSYNC =rsync -R" >> ${nPETSC_DIR}/bmake/remote-${CONF}/petscconf
|
|---|
| 44 | echo "SSH =ssh" >> ${nPETSC_DIR}/bmake/remote-${CONF}/petscconf
|
|---|
| 45 | echo 'MPIEXEC =${PETSC_DIR}/bin/mpiexec.sshrsync' >> ${nPETSC_DIR}/bmake/remote-${CONF}/petscconf
|
|---|
| 46 | end
|
|---|