diff options
-rw-r--r-- | configure.in | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/configure.in b/configure.in index f725cc3..f3f3f15 100644 --- a/configure.in +++ b/configure.in @@ -1203,7 +1203,7 @@ case "$CC_BASENAME" in else for path in `echo $PATH |tr : ' '`; do if test -x $path/$cmd; then - break; + break fi done fi @@ -1220,6 +1220,41 @@ case "$CC_BASENAME" in fi ;; + hcc) + dnl The LAM compiler. Use mpirun_lam or mpirun from the same directory + dnl if it exists. + PARALLEL=hcc + AC_MSG_CHECKING(for mpirun_lam or mpirun) + + dnl Find the path where hcc is located + cmd=`echo $CC |cut -f1 -d' '` + if (echo $cmd |grep / >/dev/null); then + path="`echo $cmd |sed 's/\(.*\)\/.*$/\1/'`" + else + for path in `echo $PATH |tr : ' '`; do + if test -x $path/$cmd; then + break + fi + done + fi + + dnl Is there an mpirun_lam or mpirun at that path? + if test -x $path/mpirun_lam -o -x $path/mpirun; then + if test -x $path/mpirun_lam; then + cmd=mpirun_lam + else + cmd=mpirun + fi + AC_MSG_RESULT($path/$cmd); + RUNSERIAL="${RUNSERIAL:-none}" + if test -z "$RUNPARALLEL"; then + RUNPARALLEL="$path/$cmd -np \$\${NPROCS:=2}" + fi + else + AC_MSG_RESULT(none) + fi + ;; + mpcc|mpcc_r) dnl The IBM compiler PARALLEL="$CC_BASENAME" |