File: insttest

package info (click to toggle)
mpich 1.1.0-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 22,116 kB
  • ctags: 27,349
  • sloc: ansic: 193,435; sh: 11,172; fortran: 6,545; makefile: 5,801; cpp: 5,020; tcl: 3,548; asm: 3,536; csh: 1,079; java: 614; perl: 183; awk: 168; sed: 70; f90: 62
file content (60 lines) | stat: -rwxr-xr-x 1,272 bytes parent folder | download | duplicates (8)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#! /bin/sh
#
# This is a simple install test for MPICH.  This assumes that a successful
# build of MPICH has taken place
#
installloc=$HOME/mpitmp
nox=0
for arg in "$@" ; do
    case $arg in 
	-echo) set -x ;;
	
	-prefix=*)
	installloc=`echo A$arg | sed -e 's/A-prefix=//g'`
	;;

	-nox) nox=1 ;;
	-help|-u|-usage)
	echo "insttest [ -prefix=directory ] [ -nox ]"
	echo "Install and perform basic test on MPICH installation"
	echo "Note: this must not run as batch, as it tries to start up"
	echo "the nupshot and upshot programs."
	echo " "
	echo "Set -nox if nupshot/upshot are not to be tested."
	exit 1
	;;

	*)
	echo "Unknown argument ($arg)"
	exit 1
	;;
    esac
done
# Check that DISPLAY is valid first
if [ $nox = 0 -a -z "$DISPLAY" ] ; then 
    echo "Need to set DISPLAY before testing upshot/nupshot"
fi
#
make install PREFIX=$installloc
if [ $? != 0 ] ; then
    echo "Error in installation"
    exit 1
fi
cd $installloc
cd examples
make cpi
mpirun -np 2 cpi
../bin/mpicc -mpilog -o cpilog cpi.c -lm
mpirun -np 4 cpilog
if [ -x ../bin/nupshot ] ; then 
    ../bin/nupshot cpilog_profile.log
else
    echo "Nupshot not available!"
fi
if [ -x ../bin/upshot ] ; then
    ../bin/upshot  cpilog_profile.log
else 
    echo "Upshot not available!"
fi
make clean
exit 0