Commit 15ec9009 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Allow for specification of MPI compilation/library flags.

* This way the MPI parts of CDI can be compiled without introducing
  an artificial MPI dependency for non-MPI parts.
parent 4cf79ef8
......@@ -162,13 +162,23 @@ interfaces/ruby/testObj.rb -text
interfaces/testdata/gridTest.nc -text
interfaces/testdata/mulval.grb -text
interfaces/testdata/mulval.nc -text
m4/ac_lang_program_fortran.m4 -text
m4/acx_assert_lang_is_fortran_variant.m4 -text
m4/acx_c_package.m4 -text
m4/acx_check_strptr_convert.m4 -text
m4/acx_execinfo.m4 -text
m4/acx_fortran_check_include.m4 -text
m4/acx_fortran_package.m4 -text
m4/acx_lang_c_check_include.m4 -text
m4/acx_lang_check_include.m4 -text
m4/acx_lang_fortran_check_include.m4 -text
m4/acx_lang_other_suffix_conftest.m4 -text
m4/acx_lang_package.m4 -text
m4/acx_option_search_libs.m4 -text
m4/acx_options.m4 -text
m4/acx_sl_fc_mod_path_flag.m4 -text
m4/acx_sl_mod_suffix.m4 -text
m4/asx_tr_arg.m4 -text
m4/asx_unset.m4 -text
m4/ax_pthread.m4 -text
m4/libtool.m4 -text
......
......@@ -96,17 +96,26 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = \
$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
$(top_srcdir)/m4/acx_c_package.m4 \
$(top_srcdir)/m4/acx_check_strptr_convert.m4 \
$(top_srcdir)/m4/acx_execinfo.m4 \
$(top_srcdir)/m4/acx_fortran_package.m4 \
$(top_srcdir)/m4/acx_lang_check_include.m4 \
$(top_srcdir)/m4/acx_lang_other_suffix_conftest.m4 \
$(top_srcdir)/m4/acx_lang_package.m4 \
$(top_srcdir)/m4/acx_option_search_libs.m4 \
$(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
$(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/m4/starlink_fpp.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/m4/asx_tr_arg.m4 $(top_srcdir)/m4/asx_unset.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/starlink_fpp.m4 \
$(top_srcdir)/acinclude.m4 \
$(top_srcdir)/m4/ac_lang_program_fortran.m4 \
$(top_srcdir)/m4/acx_lang_fortran_check_include.m4 \
$(top_srcdir)/m4/acx_lang_c_check_include.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
......@@ -296,6 +305,11 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIROOT = @MPIROOT@
MPI_C_INCLUDE = @MPI_C_INCLUDE@
MPI_C_LIB = @MPI_C_LIB@
MPI_FC_INCLUDE = @MPI_FC_INCLUDE@
MPI_FC_LIB = @MPI_FC_LIB@
MPI_LAUNCH = @MPI_LAUNCH@
NC_CONFIG = @NC_CONFIG@
NETCDF_INCLUDE = @NETCDF_INCLUDE@
......
......@@ -14,6 +14,9 @@ AC_DEFUN([ACX_CHECK_CFINT],
[AC_DEFINE(HAVE_CF_INTERFACE, [1],
[Define if C / Fortran interface cfortran.h works])])
])
m4_include([m4/ac_lang_program_fortran.m4])
m4_include([m4/acx_lang_fortran_check_include.m4])
m4_include([m4/acx_lang_c_check_include.m4])
dnl
dnl Local Variables:
dnl mode: autoconf
......
......@@ -1184,12 +1184,18 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/acx_assert_lang_is_fortran_variant.m4])
m4_include([m4/acx_c_package.m4])
m4_include([m4/acx_check_strptr_convert.m4])
m4_include([m4/acx_execinfo.m4])
m4_include([m4/acx_fortran_package.m4])
m4_include([m4/acx_lang_check_include.m4])
m4_include([m4/acx_lang_other_suffix_conftest.m4])
m4_include([m4/acx_lang_package.m4])
m4_include([m4/acx_option_search_libs.m4])
m4_include([m4/acx_options.m4])
m4_include([m4/acx_sl_fc_mod_path_flag.m4])
m4_include([m4/acx_sl_mod_suffix.m4])
m4_include([m4/asx_tr_arg.m4])
m4_include([m4/asx_unset.m4])
m4_include([m4/ax_pthread.m4])
m4_include([m4/libtool.m4])
......
......@@ -89,17 +89,26 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = \
$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
$(top_srcdir)/m4/acx_c_package.m4 \
$(top_srcdir)/m4/acx_check_strptr_convert.m4 \
$(top_srcdir)/m4/acx_execinfo.m4 \
$(top_srcdir)/m4/acx_fortran_package.m4 \
$(top_srcdir)/m4/acx_lang_check_include.m4 \
$(top_srcdir)/m4/acx_lang_other_suffix_conftest.m4 \
$(top_srcdir)/m4/acx_lang_package.m4 \
$(top_srcdir)/m4/acx_option_search_libs.m4 \
$(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
$(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/m4/starlink_fpp.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/m4/asx_tr_arg.m4 $(top_srcdir)/m4/asx_unset.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/starlink_fpp.m4 \
$(top_srcdir)/acinclude.m4 \
$(top_srcdir)/m4/ac_lang_program_fortran.m4 \
$(top_srcdir)/m4/acx_lang_fortran_check_include.m4 \
$(top_srcdir)/m4/acx_lang_c_check_include.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
......@@ -269,6 +278,11 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIROOT = @MPIROOT@
MPI_C_INCLUDE = @MPI_C_INCLUDE@
MPI_C_LIB = @MPI_C_LIB@
MPI_FC_INCLUDE = @MPI_FC_INCLUDE@
MPI_FC_LIB = @MPI_FC_LIB@
MPI_LAUNCH = @MPI_LAUNCH@
NC_CONFIG = @NC_CONFIG@
NETCDF_INCLUDE = @NETCDF_INCLUDE@
......
This diff is collapsed.
......@@ -11,6 +11,8 @@ echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}"
CONFIG_ABORT=yes
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
dnl forbid acx macro names from remaining unexpanded
m4_pattern_forbid([^ACX_])
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
......@@ -129,7 +131,23 @@ ACX_OPTIONS
AM_CONDITIONAL([ENABLE_NETCDF],[test x$ENABLE_NETCDF = xyes])
# ----------------------------------------------------------------------
# Compile with MPI support
AC_ARG_ENABLE(mpi,AS_HELP_STRING([--enable-mpi],[Compile with MPI compiler [default=no]]),enable_mpi=yes,enable_mpi=no)
AC_ARG_ENABLE([mpi],
AS_HELP_STRING([--enable-mpi],
[Compile with MPI compiler @<:@default=no@:>@]),
[enable_mpi=yes
ACX_C_PACKAGE([MPI],[mpi.h],,,
[AC_MSG_FAILURE([Required header mpi.h not found or not compilable.])
enable_MPI=no],[MPI_Waitall],[mpi mpich],,,
[AC_MSG_FAILURE([Cannot link C MPI programs.])
enable_MPI=no])
AS_IF([test -n "$FC" && test "X$FC" != "Xno"],
[ACX_FORTRAN_PACKAGE([MPI], [mpif.h],,,
[AC_MSG_FAILURE([Required include mpif.h not found or not compilable.])
enable_MPI=no],[mpi_waitall],
[mpi mpi_f90 mpi_f77 mpich],[[-lmpi_f77 -lmpi],[-lmpi]],,
[AC_MSG_FAILURE([Cannot link Fortran MPI programs.])
enable_MPI=no],[])])],
[enable_mpi=no])
AS_IF([test x"${enable_mpi}" = x"yes"],
[USE_MPI=yes])
HAVE_PARALLEL_NC4=0
......
......@@ -89,17 +89,26 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = \
$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
$(top_srcdir)/m4/acx_c_package.m4 \
$(top_srcdir)/m4/acx_check_strptr_convert.m4 \
$(top_srcdir)/m4/acx_execinfo.m4 \
$(top_srcdir)/m4/acx_fortran_package.m4 \
$(top_srcdir)/m4/acx_lang_check_include.m4 \
$(top_srcdir)/m4/acx_lang_other_suffix_conftest.m4 \
$(top_srcdir)/m4/acx_lang_package.m4 \
$(top_srcdir)/m4/acx_option_search_libs.m4 \
$(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
$(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/m4/starlink_fpp.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/m4/asx_tr_arg.m4 $(top_srcdir)/m4/asx_unset.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/starlink_fpp.m4 \
$(top_srcdir)/acinclude.m4 \
$(top_srcdir)/m4/ac_lang_program_fortran.m4 \
$(top_srcdir)/m4/acx_lang_fortran_check_include.m4 \
$(top_srcdir)/m4/acx_lang_c_check_include.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
......@@ -317,6 +326,11 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIROOT = @MPIROOT@
MPI_C_INCLUDE = @MPI_C_INCLUDE@
MPI_C_LIB = @MPI_C_LIB@
MPI_FC_INCLUDE = @MPI_FC_INCLUDE@
MPI_FC_LIB = @MPI_FC_LIB@
MPI_LAUNCH = @MPI_LAUNCH@
NC_CONFIG = @NC_CONFIG@
NETCDF_INCLUDE = @NETCDF_INCLUDE@
......
noinst_PROGRAMS=collectData collectDataNStreams
AM_CPPFLAGS = -I$(top_srcdir)/src $(YAXT_CFLAGS)
AM_FCFLAGS = $(FPP_INCOPT)$(top_srcdir)/src
AM_FCFLAGS = $(FPP_INCOPT)$(top_srcdir)/src $(MPI_FC_INCLUDE)
AM_CFLAGS = $(MPI_C_INCLUDE)
if USE_MPI
noinst_PROGRAMS+=compareResourcesArray
......@@ -15,14 +16,15 @@ endif
collectData_SOURCES=collectData.c
if USE_MPI
LDADD=$(top_builddir)/src/libcdipio.la
LDADD=$(top_builddir)/src/libcdipio.la $(MPI_C_LIB)
collectData2003_LDADD=$(top_builddir)/src/libcdipio.la $(MPI_FC_LIB)
else
LDADD=
LDADD=$(top_builddir)/src/libcdi.la
collectData2003_LDADD=$(top_builddir)/src/libcdi.la
endif
LDADD+=$(top_builddir)/src/libcdi.la
collectData2003_SOURCES=collectData2003.F90
collectDataNStreams_SOURCES=collectDataNStreams.c
collectDataNStreams_SOURCES = collectDataNStreams.c
compareResourcesArray_SOURCES=compareResourcesArray.c
compareResourcesArray_SOURCES = compareResourcesArray.c
......@@ -90,17 +90,26 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = \
$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
$(top_srcdir)/m4/acx_c_package.m4 \
$(top_srcdir)/m4/acx_check_strptr_convert.m4 \
$(top_srcdir)/m4/acx_execinfo.m4 \
$(top_srcdir)/m4/acx_fortran_package.m4 \
$(top_srcdir)/m4/acx_lang_check_include.m4 \
$(top_srcdir)/m4/acx_lang_other_suffix_conftest.m4 \
$(top_srcdir)/m4/acx_lang_package.m4 \
$(top_srcdir)/m4/acx_option_search_libs.m4 \
$(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
$(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/m4/starlink_fpp.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/m4/asx_tr_arg.m4 $(top_srcdir)/m4/asx_unset.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/starlink_fpp.m4 \
$(top_srcdir)/acinclude.m4 \
$(top_srcdir)/m4/ac_lang_program_fortran.m4 \
$(top_srcdir)/m4/acx_lang_fortran_check_include.m4 \
$(top_srcdir)/m4/acx_lang_c_check_include.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
......@@ -114,23 +123,23 @@ PROGRAMS = $(noinst_PROGRAMS)
am_collectData_OBJECTS = collectData.$(OBJEXT)
collectData_OBJECTS = $(am_collectData_OBJECTS)
collectData_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
@USE_MPI_FALSE@collectData_DEPENDENCIES = \
@USE_MPI_FALSE@ $(top_builddir)/src/libcdi.la
@USE_MPI_TRUE@collectData_DEPENDENCIES = \
@USE_MPI_TRUE@ $(top_builddir)/src/libcdipio.la \
@USE_MPI_TRUE@ $(top_builddir)/src/libcdi.la
@USE_MPI_TRUE@ $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
am_collectData2003_OBJECTS = collectData2003.$(OBJEXT)
collectData2003_OBJECTS = $(am_collectData2003_OBJECTS)
collectData2003_LDADD = $(LDADD)
@USE_MPI_FALSE@collectData2003_DEPENDENCIES = \
@USE_MPI_FALSE@ $(top_builddir)/src/libcdi.la
@USE_MPI_TRUE@collectData2003_DEPENDENCIES = \
@USE_MPI_TRUE@ $(top_builddir)/src/libcdipio.la \
@USE_MPI_TRUE@ $(top_builddir)/src/libcdi.la
@USE_MPI_TRUE@ $(am__DEPENDENCIES_1)
am_collectDataNStreams_OBJECTS = collectDataNStreams.$(OBJEXT)
collectDataNStreams_OBJECTS = $(am_collectDataNStreams_OBJECTS)
collectDataNStreams_LDADD = $(LDADD)
......@@ -138,7 +147,7 @@ collectDataNStreams_LDADD = $(LDADD)
@USE_MPI_FALSE@ $(top_builddir)/src/libcdi.la
@USE_MPI_TRUE@collectDataNStreams_DEPENDENCIES = \
@USE_MPI_TRUE@ $(top_builddir)/src/libcdipio.la \
@USE_MPI_TRUE@ $(top_builddir)/src/libcdi.la
@USE_MPI_TRUE@ $(am__DEPENDENCIES_1)
am_compareResourcesArray_OBJECTS = compareResourcesArray.$(OBJEXT)
compareResourcesArray_OBJECTS = $(am_compareResourcesArray_OBJECTS)
compareResourcesArray_LDADD = $(LDADD)
......@@ -146,7 +155,7 @@ compareResourcesArray_LDADD = $(LDADD)
@USE_MPI_FALSE@ $(top_builddir)/src/libcdi.la
@USE_MPI_TRUE@compareResourcesArray_DEPENDENCIES = \
@USE_MPI_TRUE@ $(top_builddir)/src/libcdipio.la \
@USE_MPI_TRUE@ $(top_builddir)/src/libcdi.la
@USE_MPI_TRUE@ $(am__DEPENDENCIES_1)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
......@@ -311,6 +320,11 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIROOT = @MPIROOT@
MPI_C_INCLUDE = @MPI_C_INCLUDE@
MPI_C_LIB = @MPI_C_LIB@
MPI_FC_INCLUDE = @MPI_FC_INCLUDE@
MPI_FC_LIB = @MPI_FC_LIB@
MPI_LAUNCH = @MPI_LAUNCH@
NC_CONFIG = @NC_CONFIG@
NETCDF_INCLUDE = @NETCDF_INCLUDE@
......@@ -418,11 +432,14 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I$(top_srcdir)/src $(YAXT_CFLAGS)
AM_FCFLAGS = $(FPP_INCOPT)$(top_srcdir)/src $(am__append_2)
AM_FCFLAGS = $(FPP_INCOPT)$(top_srcdir)/src $(MPI_FC_INCLUDE) \
$(am__append_2)
AM_CFLAGS = $(MPI_C_INCLUDE)
collectData_SOURCES = collectData.c
@USE_MPI_FALSE@LDADD = $(top_builddir)/src/libcdi.la
@USE_MPI_TRUE@LDADD = $(top_builddir)/src/libcdipio.la \
@USE_MPI_TRUE@ $(top_builddir)/src/libcdi.la
@USE_MPI_TRUE@LDADD = $(top_builddir)/src/libcdipio.la $(MPI_C_LIB)
@USE_MPI_FALSE@collectData2003_LDADD = $(top_builddir)/src/libcdi.la
@USE_MPI_TRUE@collectData2003_LDADD = $(top_builddir)/src/libcdipio.la $(MPI_FC_LIB)
collectData2003_SOURCES = collectData2003.F90
collectDataNStreams_SOURCES = collectDataNStreams.c
compareResourcesArray_SOURCES = compareResourcesArray.c
......
......@@ -4,7 +4,6 @@
#include <stdio.h>
#ifdef USE_MPI
#include <mpi.h>
#include <yaxt.h>
#include "cdi.h"
......@@ -223,23 +222,20 @@ static void modelRun ( MPI_Comm comm )
return;
}
#endif
int main (int argc, char *argv[])
int main (int argc, char *argv[])
{
#ifdef USE_MPI
int sizeGlob, pioNamespace;
MPI_Comm commGlob, commModel;
MPI_Init(&argc, &argv);
MPI_Init(&argc, &argv);
commGlob = MPI_COMM_WORLD;
xt_initialize(commGlob);
xmpi ( MPI_Comm_set_errhandler ( commGlob, MPI_ERRORS_RETURN ));
xmpi ( MPI_Comm_size ( commGlob, &sizeGlob ));
xmpi ( MPI_Comm_size ( commGlob, &sizeGlob ));
if ( sizeGlob != 1 )
if ( sizeGlob != 1 )
xabort ( "test transition of resource array only with 1 PE." );
if ( nProcsIO != 1 )
xabort ( "bad distribution of tasks on PEs" );
......@@ -250,10 +246,7 @@ int main (int argc, char *argv[])
modelRun ( commModel );
xt_finalize();
MPI_Finalize ();
#else
printf ( "Use MPI for this testprogram.\n" );
#endif
MPI_Finalize ();
return 0;
}
......
......@@ -96,17 +96,26 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = \
$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
$(top_srcdir)/m4/acx_c_package.m4 \
$(top_srcdir)/m4/acx_check_strptr_convert.m4 \
$(top_srcdir)/m4/acx_execinfo.m4 \
$(top_srcdir)/m4/acx_fortran_package.m4 \
$(top_srcdir)/m4/acx_lang_check_include.m4 \
$(top_srcdir)/m4/acx_lang_other_suffix_conftest.m4 \
$(top_srcdir)/m4/acx_lang_package.m4 \
$(top_srcdir)/m4/acx_option_search_libs.m4 \
$(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
$(top_srcdir)/m4/asx_unset.m4 $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/m4/starlink_fpp.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/m4/asx_tr_arg.m4 $(top_srcdir)/m4/asx_unset.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/starlink_fpp.m4 \
$(top_srcdir)/acinclude.m4 \
$(top_srcdir)/m4/ac_lang_program_fortran.m4 \
$(top_srcdir)/m4/acx_lang_fortran_check_include.m4 \
$(top_srcdir)/m4/acx_lang_c_check_include.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
......@@ -295,6 +304,11 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIROOT = @MPIROOT@
MPI_C_INCLUDE = @MPI_C_INCLUDE@
MPI_C_LIB = @MPI_C_LIB@
MPI_FC_INCLUDE = @MPI_FC_INCLUDE@
MPI_FC_LIB = @MPI_FC_LIB@
MPI_LAUNCH = @MPI_LAUNCH@
NC_CONFIG = @NC_CONFIG@
NETCDF_INCLUDE = @NETCDF_INCLUDE@
......
dnl we override the AC_LANG_PROGRAM macro here so we can portably
dnl include a Fortran header
dnl
dnl it's meant to stay only as long as 2.64 is still reasonably current
dnl the original Copyright notice is as follows:
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# As a special exception, the Free Software Foundation gives unlimited
# permission to copy, distribute and modify the configure scripts that
# are the output of Autoconf. You need not follow the terms of the GNU
# General Public License when using or distributing such scripts, even
# though portions of the text of Autoconf appear in them. The GNU
# General Public License (GPL) does govern all other use of the material
# that constitutes the Autoconf program.
#
# Certain portions of the Autoconf source text are designed to be copied
# (in certain cases, depending on the input) into the output of
# Autoconf. We call these the "data" portions. The rest of the Autoconf
# source text consists of comments plus executable code that decides which
# of the data portions to output in any given case. We call these
# comments and executable code the "non-data" portions. Autoconf never
# copies any of the non-data portions into its output.
#
# This special exception to the GPL applies to versions of Autoconf
# released by the Free Software Foundation. When you make and
# distribute a modified version of Autoconf, you may extend this special
# exception to the GPL to apply to your modified version as well, *unless*
# your modified version has the potential to copy into its output some
# of the text that was the non-data portion of the version that you started
# with. (In other words, unless your change moves or copies text from
# the non-data portions to the data portions.) If your modification has
# such potential, you must delete any notice of this special exception
# to the GPL from your modified version.
#
# AC_LANG_PROGRAM(Fortran)([PROLOGUE], [BODY])
# -----------------------------------------------
# FIXME: can the PROLOGUE be used?
# Yes, override AC_LANG_PROGRAM(Fortran)([PROLOGUE], [BODY]) with a version
# that uses prologue
m4_define([AC_LANG_PROGRAM(Fortran)],dnl
[ program conftest
m4_ifval([$1],[$1
])$2
end])
dnl
dnl Copyright (C) 2010 Thomas Jahns <jahns@dkrz.de>
dnl
dnl Version: 1.0
dnl Keywords: configure configure.ac autotools
dnl Author: Thomas Jahns <jahns@dkrz.de>
dnl Maintainer: Thomas Jahns <jahns@dkrz.de>
dnl URL: https://www.dkrz.de/redmine/projects/show/scales-ppm
dnl
dnl Redistribution and use in source and binary forms, with or without
dnl modification, are permitted provided that the following conditions are
dnl met:
dnl
dnl Redistributions of source code must retain the above copyright notice,
dnl this list of conditions and the following disclaimer.
dnl
dnl Redistributions in binary form must reproduce the above copyright
dnl notice, this list of conditions and the following disclaimer in the
dnl documentation and/or other materials provided with the distribution.
dnl
dnl Neither the name of the DKRZ GmbH nor the names of its contributors
dnl may be used to endorse or promote products derived from this software
dnl without specific prior written permission.
dnl
dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
dnl IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
dnl TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
dnl PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
dnl OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
dnl EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
dnl PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
dnl PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
dnl LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
dnl NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
dnl SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
dnl
dnl Commentary:
dnl
dnl
dnl
dnl Code:
dnl
dnl
dnl ACX_C_PACKAGE(PACKAGE,
dnl [INCLUDE], [EXTRA-INCLUDES], [EXTRA-INCLUDEFLAGS],
dnl [ACTION-IF_HEADER-NOT-FOUND],
dnl [FUNCTION], [LIB-CANDIDATES], [EXTRA-LIBS], [EXTRA-LIBFLAGS],
dnl [ACTION-IF-LIB-NOT-FOUND],
dnl [DEFAULT-ROOT])
dnl -------------------------------------------------------------------
dnl Check wether INCLUDE can be compiled and FUNCTION is found in
dnl LIB-CANDIDATES. Sets PACKAGE_C_LIB and PACKAGE_C_INCLUDE variables to
dnl necessary C compiler switches and arguments such that
dnl inclusion/compilation succeed for program using INCLUDE or
dnl FUNCTION respectively.
dnl Also defines configure --with arguments for PACKAGEROOT,
dnl PACKAGE-LIB and PACKAGE-INCLUDE.
AC_DEFUN([ACX_C_PACKAGE],
[AC_LANG_PUSH([C])
ACX_GENERIC_PACKAGE([$1],[$2],[-I],[$3],[$4],[$5],[$6],[-L],[$7],[$8],[$9],[$10],[$11],[$12])
AC_LANG_POP([C])dnl
])
dnl
dnl Local Variables:
dnl mode: autoconf
dnl End:
dnl acx_fortran_check_include.m4 --- check module inclusion in compilation
dnl
dnl Copyright (C) 2012 Thomas Jahns <jahns@dkrz.de>
dnl
dnl Version: 1.0
dnl Keywords:
dnl Author: Thomas Jahns <jahns@dkrz.de>
dnl Maintainer: Thomas Jahns <jahns@dkrz.de>
dnl URL: https://www.dkrz.de/redmine/projects/show/scales-ppm
dnl
dnl Redistribution and use in source and binary forms, with or without
dnl modification, are permitted provided that the following conditions are
dnl met:
dnl
dnl Redistributions of source code must retain the above copyright notice,
dnl this list of conditions and the following disclaimer.
dnl
dnl Redistributions in binary form must reproduce the above copyright
dnl notice, this list of conditions and the following disclaimer in the
dnl documentation and/or other materials provided with the distribution.
dnl
dnl Neither the name of the DKRZ GmbH nor the names of its contributors
dnl may be used to endorse or promote products derived from this software
dnl without specific prior written permission.
dnl
dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
dnl IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
dnl TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
dnl PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
dnl OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
dnl EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
dnl PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
dnl PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
dnl LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
dnl NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
dnl SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
dnl
dnl
# _ACX_FORTRAN_CHECK_MOD_IFELSE(MOD-FILE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
# [PREAMBLE])
# ------------------------------------------------------------------
# Check the compiler accepts MOD-FILE. The PREAMBLE might be defaulted.
m4_defun([_ACX_FORTRAN_CHECK_MOD_IFELSE],
[AC_LANG_PUSH([Fortran])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,m4_ifval([$4],
[ $4
])[ use $1])],
[AS_VAR_SET([acx_Mod], [yes])])
AC_LANG_POP([Fortran])
AS_VAR_SET_IF([acx_Mod],[$2],[$3])dnl
])# _ACX_FORTRAN_CHECK_MOD_IFELSE
# ACX_FORTRAN_CHECK_MOD_PATHS_IFELSE(MOD-FILE, PATH...
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
# [MODS], [MOD-FLAGS], [TAG])
# ------------------------------------------------------------------
# Check the compiler loads MOD-FILE. The MODS might be defaulted.
# TAG defaults to extra
AC_DEFUN([ACX_FORTRAN_CHECK_MOD_PATHS_IFELSE],