Commit e30a1aec authored by Philip Carns's avatar Philip Carns

simplify environment configuration

parent d3b6727c
......@@ -42,39 +42,10 @@ if [ ! -d $DARSHAN_TESTDIR/$DARSHAN_PLATFORM ]; then
exit 1
fi
# set up c compiler for this platform
DARSHAN_CC=`$DARSHAN_TESTDIR/$DARSHAN_PLATFORM/setup-cc.sh`
if [ $? -ne 0 ]; then
exit 1
fi
export DARSHAN_CC
# set up c++ compiler for this platform
DARSHAN_CXX=`$DARSHAN_TESTDIR/$DARSHAN_PLATFORM/setup-cxx.sh`
if [ $? -ne 0 ]; then
exit 1
fi
export DARSHAN_CXX
# set up Fortran compilers for this platform
DARSHAN_F77=`$DARSHAN_TESTDIR/$DARSHAN_PLATFORM/setup-f77.sh`
if [ $? -ne 0 ]; then
exit 1
fi
export DARSHAN_F77
DARSHAN_F90=`$DARSHAN_TESTDIR/$DARSHAN_PLATFORM/setup-f90.sh`
if [ $? -ne 0 ]; then
exit 1
fi
export DARSHAN_F90
# set up job execution wrapper for this platform
DARSHAN_RUNJOB=`$DARSHAN_TESTDIR/$DARSHAN_PLATFORM/setup-runjob.sh`
if [ $? -ne 0 ]; then
exit 1
fi
export DARSHAN_RUNJOB
# set up environment for tests according to platform
source $DARSHAN_TESTDIR/$DARSHAN_PLATFORM/env.sh
echo A
for i in `ls $DARSHAN_TESTDIR/test-cases/*.sh`; do
echo Running ${i}...
$i
......
#!/bin/bash
# General notes
#######################
# Script to set up the environment for tests on this platform. Must export
# the following environment variables:
#
# DARSHAN_CC: command to compile C programs
# DARSHAN_CXX: command to compile C++ programs
# DARSHAN_F90: command to compile Fortran90 programs
# DARSHAN_F77: command to compile Fortran77 programs
# DARSHAN_RUNJOB: command to execute a job and wait for its completion
# This script may load optional modules (as in a Cray PE), set LD_PRELOAD
# variables (as in a dynamically linked environment), or generate mpicc
# wrappers (as in a statically linked environment).
# Notes specific to this platform (ws)
########################
# This particular env script assumes that mpicc and its variants for other
# languages are already in the path. The compiler scripts to be used in
# these test cases will be generated using darshan-gen-*.pl scripts.
# The runjob command is just mpiexec, no scheduler
$DARSHAN_PATH/bin/darshan-gen-cc.pl `which mpicc` --output $DARSHAN_TMP/mpicc
if [ $? -ne 0 ]; then
echo "Error: failed to generate c compiler." 1>&2
exit 1
fi
export DARSHAN_CC=$DARSHAN_TMP/mpicc
$DARSHAN_PATH/bin/darshan-gen-cxx.pl `which mpicxx` --output $DARSHAN_TMP/mpicxx
if [ $? -ne 0 ]; then
echo "Error: failed to generate c compiler." 1>&2
exit 1
fi
export DARSHAN_CXX=$DARSHAN_TMP/mpicxx
$DARSHAN_PATH/bin/darshan-gen-fortran.pl `which mpif77` --output $DARSHAN_TMP/mpif77
if [ $? -ne 0 ]; then
echo "Error: failed to generate f77 compiler." 1>&2
exit 1
fi
export DARSHAN_F77=$DARSHAN_TMP/mpif77
$DARSHAN_PATH/bin/darshan-gen-fortran.pl `which mpif90` --output $DARSHAN_TMP/mpif90
if [ $? -ne 0 ]; then
echo "Error: failed to generate f90 compiler." 1>&2
exit 1
fi
export DARSHAN_F90=$DARSHAN_TMP/mpif90
export DARSHAN_RUNJOB="mpiexec -n $DARSHAN_DEFAULT_NPROCS"
#!/bin/bash
# General notes
#######################
# Script to set up the C compiler to use for subsequent test cases. This
# script may load optional modules (as in a Cray PE), set LD_PRELOAD
# variables (as in a dynamically linked environment), or generate mpicc
# wrappers (as in a statically linked environment).
# The script should produce a single string to stdout, which is the command
# line to use for invoking the C compiler
# Notes specific to this platform (ws)
########################
# This particular version of the setup-cc script assumes that mpicc is
# present in the path already, and that the C compiler to use for
# subsequent tests should be generated from this using darshan-gen-cc.pl.
$DARSHAN_PATH/bin/darshan-gen-cc.pl `which mpicc` --output $DARSHAN_TMP/mpicc
if [ $? -ne 0 ]; then
echo "Error: failed to generate c compiler." 1>&2
exit 1
fi
echo $DARSHAN_TMP/mpicc
exit 0
#!/bin/bash
# General notes
#######################
# Script to set up the C++ compiler to use for subsequent test cases. This
# script may load optional modules (as in a Cray PE), set LD_PRELOAD
# variables (as in a dynamically linked environment), or generate mpicxx
# wrappers (as in a statically linked environment).
# The script should produce a single string to stdout, which is the command
# line to use for invoking the C compiler
# Notes specific to this platform (ws)
########################
# This particular version of the setup-cxx script assumes that mpicxx is
# present in the path already, and that the C++ compiler to use for
# subsequent tests should be generated from this using darshan-gen-cxx.pl.
$DARSHAN_PATH/bin/darshan-gen-cxx.pl `which mpicxx` --output $DARSHAN_TMP/mpicxx
if [ $? -ne 0 ]; then
echo "Error: failed to generate c compiler." 1>&2
exit 1
fi
echo $DARSHAN_TMP/mpicxx
exit 0
#!/bin/bash
# General notes
#######################
# Script to set up the F77 compiler to use for subsequent test cases. This
# script may load optional modules (as in a Cray PE), set LD_PRELOAD
# variables (as in a dynamically linked environment), or generate mpicc
# wrappers (as in a statically linked environment).
# The script should produce a single string to stdout, which is the command
# line to use for invoking the F77 compiler
# Notes specific to this platform (ws)
########################
# This particular version of the setup-cc script assumes that mpicc is
# present in the path already, and that the F77 compiler to use for
# subsequent tests should be generated from this using darshan-gen-fortran.pl.
$DARSHAN_PATH/bin/darshan-gen-fortran.pl `which mpif77` --output $DARSHAN_TMP/mpif77
if [ $? -ne 0 ]; then
echo "Error: failed to generate f77 compiler." 1>&2
exit 1
fi
echo $DARSHAN_TMP/mpif77
exit 0
#!/bin/bash
# General notes
#######################
# Script to set up the F90 compiler to use for subsequent test cases. This
# script may load optional modules (as in a Cray PE), set LD_PRELOAD
# variables (as in a dynamically linked environment), or generate mpicc
# wrappers (as in a statically linked environment).
# The script should produce a single string to stdout, which is the command
# line to use for invoking the F90 compiler
# Notes specific to this platform (ws)
########################
# This particular version of the setup-cc script assumes that mpicc is
# present in the path already, and that the F90 compiler to use for
# subsequent tests should be generated from this using darshan-gen-fortran.pl.
$DARSHAN_PATH/bin/darshan-gen-fortran.pl `which mpif90` --output $DARSHAN_TMP/mpif90
if [ $? -ne 0 ]; then
echo "Error: failed to generate f90 compiler." 1>&2
exit 1
fi
echo $DARSHAN_TMP/mpif90
exit 0
#!/bin/bash
# General notes
#######################
# Script to set up whatever is needed to run an MPI job. This script should
# produce the string of the command line prefix to use for job execution.
# This could (for example) point to a wrapper script that will submit a job
# to a scheduler and wait for its completion.
# Notes specific to this platform (ws)
########################
# This particular version of the setup-runjob script just uses mpiexec,
# assuming that is in the path already.
echo mpiexec -n $DARSHAN_DEFAULT_NPROCS
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment