1
dnl----------------------------------------------------------------------------
2
dnl This file is part of the Code_Saturne Kernel, element of the
3
dnl Code_Saturne CFD tool.
5
dnl Copyright (C) 2011 EDF S.A., France
7
dnl The Code_Saturne Kernel is free software; you can redistribute it
8
dnl and/or modify it under the terms of the GNU General Public License
9
dnl as published by the Free Software Foundation; either version 2 of
10
dnl the License, or (at your option) any later version.
12
dnl The Code_Saturne Kernel is distributed in the hope that it will be
13
dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14
dnl of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
dnl GNU General Public License for more details.
17
dnl You should have received a copy of the GNU General Public Licence
18
dnl along with the Code_Saturne Preprocessor; if not, write to the
19
dnl Free Software Foundation, Inc.,
20
dnl 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
dnl-----------------------------------------------------------------------------
25
# Tries to determine if a batch system is available
27
AC_DEFUN([CS_AC_TEST_BATCH], [
32
[AS_HELP_STRING([--with-batch=TYPE],
33
[specify batch type or template path])],
34
[with_batch=$withval],
37
# Attempt at auto-detection
39
if test "x$with_batch" = "xcheck" ; then
41
AC_MSG_CHECKING([for batch system])
43
# Check for available batch types
47
for cmd in qsub ccc_msub bsub llsubmit sbatch; do
49
which $cmd > /dev/null 2>&1
52
if test "$cmd_prev" != "no" ; then
54
At least 2 batch submission commands found ($cmd_prev and $cmd);
55
use --with-batch=<value> to specify either batch type (PBS, CCC, LSF,
56
LOADL, SGE, or SLURM), absolute path to batch template file, or "no")])
66
# qsub may be either PBS (PBS-PRO, TORQUE) or Sun Grid Engine
67
# but Sun Grid Engine should have qmon command.
68
which qmon > /dev/null 2>&1
76
ccc_msub) cs_batch_template=CCC ;;
77
bsub) cs_batch_template=LSF ;;
78
llsubmit) cs_batch_template=LOADL ;;
79
sbatch) cs_batch_template=SLURM ;;
80
*) cs_batch_template=no ;;
83
AC_MSG_RESULT($cs_batch_template)
85
elif test "x$with_batch" != "xno" ; then
86
cs_batch_template=$with_batch
89
AC_SUBST(cs_batch_template)