From 0fe9cb5d1c145cb219c5c7acd39bf0a3142e922b Mon Sep 17 00:00:00 2001 From: serbanmaerean Date: Tue, 20 Jun 2017 17:47:24 -0400 Subject: FFTW: remove search for IBM XL threaded compiler when compiler is not gcc (#4187) * Added magma package * Incorporated Serban's change * fftw: patch configuration file to remove search for xlc_r compiler when compiler not gcc FFTW assumes there are only 2 compilers: gcc and IBM XL. When building threaded fftw, the configuration file is looking for the threaded IBM XL's xlc_r compiler when the compiler is not gcc. The PGI compiler is not gcc. --- var/spack/repos/builtin/packages/fftw/package.py | 1 + .../builtin/packages/fftw/pgi-3.3.6-pl2.patch | 121 +++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 var/spack/repos/builtin/packages/fftw/pgi-3.3.6-pl2.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index 062b0a0eb0..ce45409581 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -44,6 +44,7 @@ class Fftw(AutotoolsPackage): patch('pfft-3.3.5.patch', when="@3.3.5:+pfft_patches", level=0) patch('pfft-3.3.4.patch', when="@3.3.4+pfft_patches", level=0) + patch('pgi-3.3.6-pl2.patch', when="@3.3.6-pl2%pgi", level=0) variant( 'float', default=True, diff --git a/var/spack/repos/builtin/packages/fftw/pgi-3.3.6-pl2.patch b/var/spack/repos/builtin/packages/fftw/pgi-3.3.6-pl2.patch new file mode 100644 index 0000000000..1822db1231 --- /dev/null +++ b/var/spack/repos/builtin/packages/fftw/pgi-3.3.6-pl2.patch @@ -0,0 +1,121 @@ +--- configure 2017-01-27 16:08:52.000000000 -0500 ++++ configure 2017-05-08 22:34:32.358821182 -0400 +@@ -21744,117 +21744,7 @@ + + # Various other checks: + if test "x$acx_pthread_ok" = xyes; then +- save_LIBS="$LIBS" +- LIBS="$PTHREAD_LIBS $LIBS" +- save_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +- +- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 +-$as_echo_n "checking for joinable pthread attribute... " >&6; } +- attr_name=unknown +- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-#ifdef F77_DUMMY_MAIN +- +-# ifdef __cplusplus +- extern "C" +-# endif +- int F77_DUMMY_MAIN() { return 1; } +- +-#endif +-int +-main () +-{ +-int attr=$attr; return attr; +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- attr_name=$attr; break +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- done +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 +-$as_echo "$attr_name" >&6; } +- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then +- +-cat >>confdefs.h <<_ACEOF +-#define PTHREAD_CREATE_JOINABLE $attr_name +-_ACEOF +- +- fi +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 +-$as_echo_n "checking if more special flags are required for pthreads... " >&6; } +- flag=no +- case "${host_cpu}-${host_os}" in +- *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; +- *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; +- esac +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 +-$as_echo "${flag}" >&6; } +- if test "x$flag" != xno; then +- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" +- fi +- +- LIBS="$save_LIBS" +- CFLAGS="$save_CFLAGS" +- +- # More AIX lossage: must compile with xlc_r or cc_r +- if test x"$GCC" != xyes; then +- for ac_prog in xlc_r cc_r +-do +- # Extract the first word of "$ac_prog", so it can be a program name with args. +-set dummy $ac_prog; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if ${ac_cv_prog_PTHREAD_CC+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- if test -n "$PTHREAD_CC"; then +- ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. +-else +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_PTHREAD_CC="$ac_prog" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +-fi +-fi +-PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +-if test -n "$PTHREAD_CC"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 +-$as_echo "$PTHREAD_CC" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +- test -n "$PTHREAD_CC" && break +-done +-test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" +- +- else +- PTHREAD_CC=$CC +- fi +-else +- PTHREAD_CC="$CC" ++ PTHREAD_CC="$CC" + fi + + -- cgit v1.2.3-70-g09d2