#!/bin/csh -f
##### 
##   Sung-Hoon Ko
##   9/14/99
#####


# Run synthetic test cases
 
set sources = (CFD.java)
          
 
set nprocs  = 3

set mpiJavaHome = ../..

set MPI       = mpich

set MPI_PATH  = /HPS/repository/work/users/hitoshi/sun/local/mpich
set JAVA_PATH = /usr/java1.2

set MPI_RUN  = "${MPI_PATH}/bin/mpirun -np"
set CLASS_PATH = "-classpath .:${mpiJavaHome}/lib/classes:${JAVA_PATH}/lib/classes.zip:${JAVA_PATH}/classes"
set JAVA_C = "${JAVA_PATH}/bin/javac ${CLASS_PATH}"
set JAVA_RUN = "${JAVA_PATH}/bin/java ${CLASS_PATH}"


if ($MPI == mpich) then
  set machineFile = machines
else if ($MPI == sp2) then
  set machineFile = host.list
else if ($MPI == sunhpc) then
  set machineFile = 
else
  echo Not supported yet. ; exit 1
endif
 
#(hostname; hostname; hostname; hostname; hostname ; hostname ; hostname ; hostname ) > $machineFile


set CWD = `pwd`

foreach source ($sources)
	set executable=${source:r}
	if ( -f ./$executable.jig ) then
	    rm -f ./$executable.jig
	endif	
	echo ...Running : {$CWD:t}/${source}

	$mpiJavaHome/src/scripts/prunjava ${nprocs[1]} $executable

end





