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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
|
AC_PREREQ([2.60])
AC_INIT([globus_gram_job_manager_slurm],[2.8],[https://github.com/globus/globus-toolkit/issues])
AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}])
AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}])
AC_SUBST([AGE_VERSION], [1])
AC_SUBST([PACKAGE_DEPS], [""])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.11 foreign parallel-tests tar-pax])
m4_include([dirt.sh])
AC_SUBST(DIRT_TIMESTAMP)
AC_SUBST(DIRT_BRANCH_ID)
AC_ARG_WITH(slurm-path,
AC_HELP_STRING(
[--with-slurm-path=SLURMPATH],
[Specify the path of the SLURM installation]),
[if test "$withval" != yes; then
SLURM_PATH=$withval
export PATH=$SLURM_PATH/bin:$PATH
export LD_LIBRARY_PATH=$SLURM_PATH/lib:$LD_LIBRARY_PATH
else
SLURM_PATH=''
fi],
[SLURM_PATH=no])
DEFAULT_MPI_TYPE=""
MPI_TYPES=""
AC_ARG_WITH(default-mpi,
AS_HELP_STRING(
[--with-default-mpi=TYPE]
[Choose default MPI type, either mpich2 or openmpi]),
[
case x"$withval" in
xmpich2)
DEFAULT_MPI_TYPE=mpich2
;;
xopenmpi)
DEFAULT_MPI_TYPE=openmpi
;;
*)
AC_MSG_WARN([Unknown mpi type $withval])
;;
esac])
AC_ARG_WITH(openmpi,
AS_HELP_STRING(
[--with-openmpi=OPENMPIPATH],
[Use OpenMPI located in OPENMPIPATH]),
[if test x"$withval" != xno; then
USEOPENMPI="yes"
if test x"$withval" != xyes; then
OPENMPI_PATH=$withval
export PATH=$OPENMPI_PATH/bin:$PATH
fi
if test x"$DEFAULT_MPI_TYPE" = x; then
DEFAULT_MPI_TYPE="openmpi"
fi
fi],
[USEOPENMPI="no"])
AC_ARG_WITH(mpich2,
AC_HELP_STRING(
[--with-mpich2=MPICH2PATH],
[Use MPICH2 located in MPICH2PATH]),
[if test x"$withval" != xno; then
USEMPICH2="yes"
if test x"$withval" != xyes; then
MPICH2_PATH=$withval
export PATH=$MPICH2_PATH/bin:$PATH
fi
if test x"$DEFAULT_MPI_TYPE" = x; then
DEFAULT_MPI_TYPE="mpich2"
fi
fi],
[USEMPICH2="no"])
AC_PATH_PROGS(IBRUN, ibrun, no)
if test "$IBRUN" = "no" ; then
AC_MSG_WARN([Cannot locate ibrun])
fi
AC_PATH_PROGS(SRUN, srun, no)
if test "$SRUN" = "no" ; then
AC_MSG_WARN([Cannot locate srun])
fi
AC_PATH_PROGS(SBATCH, sbatch, no)
if test "$SBATCH" = "no"; then
AC_MSG_WARN([Cannot locate sbatch])
fi
AC_PATH_PROGS(SALLOC, salloc, no)
if test "$SALLOC" = "no"; then
AC_MSG_WARN([Cannot locate salloc])
fi
AC_PATH_PROGS(SCANCEL, scancel, no)
if test "$SCANCEL" = "no"; then
AC_MSG_WARN([Cannot locate scancel])
fi
AC_PATH_PROGS(SCONTROL, scontrol, no)
if test "$SCONTROL" = "no"; then
AC_MSG_WARN([Cannot locate scontrol])
fi
if test x"${DEFAULT_MPI_TYPE}" != x; then
case $DEFAULT_MPI_TYPE in
openmpi)
mpisearchpath="$OPENMPI_PATH:$PATH"
;;
mpich2)
mpisearchpath="$MPICH2_PATH:$PATH"
;;
esac
else
mpisearchpath="$PATH"
fi
AC_PATH_PROGS(MPIRUN, mpirun, no, $mpisearchpath)
if test "$MPIRUN" = "no"; then
AC_MSG_WARN([Cannot locate mpirun])
fi
AC_ARG_WITH(slurm-config,
AC_HELP_STRING(
[--with-slurm-config=SLURMCONFIG],
[Specify the path of the SLURM configuration file]),
[if test "$withval" != yes; then
SLURM_CONFIG=$withval
else
SLURM_CONFIG='/etc/slurm/slurm.conf'
fi],
[SLURM_CONFIG='/etc/slurm/slurm.conf'])
if test "$SRUN" = "no" -o "$SBATCH" = "no" -o "$SALLOC" = "no" -o "$SCANCEL" = "no" -o "$SCONTROL" = "no" ; then
AC_MSG_WARN([Some SLURM commands were not found.])
else #Try to guess slurm path
SLURM_PATH=$(dirname $SRUN | sed 's/\/bin//')
fi
dnl LOOK FOR MPI TO USE IF NONE SPECIFIED
if test x"$DEFAULT_MPI_TYPE" = x; then
if test "$MPIRUN" = "no" ; then
AC_MSG_WARN([No MPI found])
else
if $MPIRUN --version 2>&1 | grep "Open.*MPI" > /dev/null ; then
USEOPENMPI="yes"
OPENMPI_PATH=$(dirname $MPIRUN | sed 's/\/bin//')
DEFAULT_MPI_TYPE="openmpi"
else
USEMPICH2="yes"
MPICH2_PATH=$(dirname $MPIRUN | sed 's/\/bin//')
DEFAULT_MPI_TYPE="mpich2"
fi
fi
fi
AC_SUBST(SRUN)
AC_SUBST(SBATCH)
AC_SUBST(SALLOC)
AC_SUBST(SCANCEL)
AC_SUBST(SCONTROL)
AC_SUBST(SLURM_PATH)
AC_SUBST(DEFAULT_MPI_TYPE)
AC_SUBST(OPENMPI_PATH)
AC_SUBST(MPICH2_PATH)
if test x$USEOPENMPI = xyes; then
MPI_TYPES="openmpi"
fi
if test x$USEMPICH2 = xyes; then
MPI_TYPES="${MPI_TYPES:+$MPI_TYPES }mpich2"
fi
AC_SUBST(MPI_TYPES)
mpi_type_rvf="mpi_type.rvf"
if test "x$MPI_TYPES" != x; then
cat > "$mpi_type_rvf" <<EOF
Values: $MPI_TYPES
Default: $DEFAULT_MPI_TYPE
DefaultWhen: GLOBUS_GRAM_JOB_SUBMIT"
EOF
else
rm -f "$mpi_type_rvf"
touch "$mpi_type_rvf"
fi
AC_SUBST_FILE(mpi_type_rvf)
AC_ARG_WITH([perlmoduledir],
AC_HELP_STRING([--with-perlmoduledir=DIR],
[perl module directory [[PREFIX/lib/perl]]]),
[
if test x$withval = "xno" -o x$withval = "xyes" ; then
AC_MSG_ERROR([--with-perlmoduledir requires an argument])
fi
perlmoduledir=$withval
],
[
perlmoduledir='${libdir}/perl'
])
AC_SUBST(perlmoduledir)
AC_CONFIG_FILES(
globus-gram-job-manager-slurm-uninstalled.pc
globus-gram-job-manager-slurm.pc
Makefile
jobmanager-slurm
globus-slurm.conf
slurm.rvf)
AC_OUTPUT
|