From 441bad9a758d79f1eb0fb85fbe6ee10a6f5e57b7 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Thu, 21 Nov 2019 15:01:28 -0600 Subject: [PATCH 1/2] cray ftn: modify fortran module loc checker to support the Cray Fortran compiler. Cray Fortran compiler does not contain all symbol info in the module file, have to link with the *.o created as part of module file compilation. Signed-off-by: Howard Pritchard --- config/ompi_fortran_find_module_include_flag.m4 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config/ompi_fortran_find_module_include_flag.m4 b/config/ompi_fortran_find_module_include_flag.m4 index 5b6e0debf0..311a10e3ab 100644 --- a/config/ompi_fortran_find_module_include_flag.m4 +++ b/config/ompi_fortran_find_module_include_flag.m4 @@ -11,6 +11,8 @@ dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +dnl Copyright (c) 2019 Triad National Security, LLC. All rights +dnl reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow @@ -67,7 +69,12 @@ EOF if test "$ofi_module_flag" = ""; then OPAL_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 conftest.f90 ${flag}subdir $LDFLAGS $LIBS], [AS_VAR_SET(fortran_inc_var, [$flag]) - ofi_module_flag="$flag"]) + ofi_module_flag="$flag"], +dnl try and see if we need to link in a possible object file + [OPAL_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 conftest.f90 subdir/conftest-module.o \ + ${flag}subdir $LDFLAGS $LIBS], + [AS_VAR_SET(fortran_inc_var, [$flag]) + ofi_module_flag="$flag"],[])]) fi done cd .. From 7bcd5fc13dab6010a9c8f329e800b4cdda4bb125 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Sat, 23 Nov 2019 08:17:50 -0800 Subject: [PATCH 2/2] SQUASHME Minor code de-duplication Signed-off-by: Jeff Squyres --- config/ompi_fortran_find_module_include_flag.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/ompi_fortran_find_module_include_flag.m4 b/config/ompi_fortran_find_module_include_flag.m4 index 311a10e3ab..e6d513fe75 100644 --- a/config/ompi_fortran_find_module_include_flag.m4 +++ b/config/ompi_fortran_find_module_include_flag.m4 @@ -68,15 +68,15 @@ EOF for flag in $ofi_possible_flags; do if test "$ofi_module_flag" = ""; then OPAL_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 conftest.f90 ${flag}subdir $LDFLAGS $LIBS], - [AS_VAR_SET(fortran_inc_var, [$flag]) - ofi_module_flag="$flag"], + [ofi_module_flag=$flag], dnl try and see if we need to link in a possible object file [OPAL_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 conftest.f90 subdir/conftest-module.o \ ${flag}subdir $LDFLAGS $LIBS], - [AS_VAR_SET(fortran_inc_var, [$flag]) - ofi_module_flag="$flag"],[])]) + [ofi_module_flag=$flag])]) fi done + AS_IF([test -n "$ofi_module_flag"], + [AS_VAR_SET(fortran_inc_var, [$ofi_module_flag])]) cd .. rm -rf conftest.$$ ])