1
1
openmpi/config
Jeff Squyres 94922937c2 fortran.m4: disallow when sizeof(int) != sizeof(INTEGER)
NOTE: This is intentionally not a cherry pick from master.  Instead,
this is a cherry-pick from the equivalent commit on the v4.0.x branch.
See below.

There is a problem with the mpi_f08 module when sizeof(int) !=
sizeof(INTEGER): the size of TYPE(MPI_Status) is too small.  This
causes buffer overruns when Open MPI is configured with (for example)
sizeof(int)==4 and sizeof(INTEGER)==8, and then you call the mpi_f08
MPI_RECV subroutine.  This will end up copying the resulting C
MPI_Status to the buffer pointing to the Fortran status, but the code
does not know if the Fortran status is an mpif.h status or a
TYPE(MPI_Status) -- it just blindly copies over as if the Fortran
status is an INTEGER array of length MPI_STATUS_SIZE.  Unfortunately,
TYPE(MPI_Status) is actually smaller than this, so we overrun the
buffer.  Hilarity ensues.

The simple fix for this is to make TYPE(MPI_Status) the same size as
INTEGER(MPI_STATUS_SIZE), but we can't do that here on the release
branch because it will break ABI.

This commit does the following:

- checks to see if we're in a sizeof(int) != sizeof(INTEGER) scenario
- if so, if the user has not specifically excluded building the
  mpi_f08 module, display a Giant Error Message (GEM) and abort
  configure.

This is unusual; we don't usually abort configure when feature XYZ
can't be built -- if the user didn't specifically ask for XYZ, we
just emit a notice that we won't build XYZ and continue.

This situation is a little different because we're on a release
branch: prior releases have built mpi_f08 by default -- even in this
"bad" scenario.  Hence, in this case, we explicitly tell the user that
this is now a known-bad scenario and abort.  In the GEM, we give the
user two options:

1. Change their compiler flags so that sizeof(int) == sizeof(INTEGER)
   and re-run configure, or
2. Explicitly disable the mpi_f08 module via --enable-mpi-fortran=usempi

Thanks to @ahaichen for reporting the issue.

Note: the proper fix has been implemented on master (i.e., what will
become v5.0.0), but since that breaks ABI, we can't cherry pick it
back here to an existing release branch series. Hence, we
cherry-picked this fix from the v4.0.x branch.

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
(cherry picked from commit 27836a614b9c29d7636cdf1a9b838b1532281a8a)
2020-07-10 14:39:34 -07:00
..
c_get_alignment.m4 configury: fix alignment check of bool when cross-compiling 2015-07-07 11:04:07 +09:00
c_weak_symbols.m4 oshmem configury: fix a typo 2014-08-25 04:41:56 +00:00
distscript.sh distscript: hugely simplify 2015-04-27 06:50:40 -07:00
find_common_syms find_common_syms: update for OS X symbol naming 2016-01-20 16:18:43 -05:00
ltmain_nag_pthread.diff configury: Make more robust in finding NAG Fortran Compiler 2018-03-02 10:50:37 -08:00
ltmain_pgi_tp.diff Patch ltmain.sh in autogen.sh per this Libtool thread: 2010-08-25 19:40:17 +00:00
make_manpage.pl Fix script abstraction break: mv make_manpage.pl to config 2018-09-22 15:11:06 -05:00
Makefile.am Fix script abstraction break: mv make_manpage.pl to config 2018-09-22 15:11:06 -05:00
Makefile.options Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
ompi_check_gpfs.m4 fs/gpfs: Support of GPFS file system 2020-06-12 12:57:18 -04:00
ompi_check_ime.m4 fs/ime & fbtl/ime: Support of IME file system 2020-06-26 12:26:51 -04:00
ompi_check_libfca.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_check_libhcoll.m4 Detect hcoll_context_free at config 2016-12-02 22:09:20 +02:00
ompi_check_lustre.m4 rework check lustre config to avoid rpath lib64 2020-04-24 11:19:14 -06:00
ompi_check_mxm.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_check_plfs.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_check_psm2.m4 Add check for PSM2 reference counting to PSM2 MTL #7721 2020-06-16 10:38:22 -06:00
ompi_check_psm.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_check_pvfs2.m4 config/ompi_check_pvfs2.m4: respect the --without-pvfs2 flag 2018-04-25 14:39:18 -05:00
ompi_check_ucx.m4 COMMON/UCX: improved missing events test 2020-06-16 14:27:02 +03:00
ompi_check_udapl.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_config_files.m4 fortran: ensure not to use [AM_]CPPFLAGS 2020-02-04 05:15:40 -08:00
ompi_configure_options.m4 ompi/request: implement MPI Generalized request extensions 2018-06-26 10:52:18 +09:00
ompi_contrib.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_cxx_find_exception_flags.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_cxx_find_template_parameters.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_cxx_find_template_repository.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_cxx_have_exceptions.m4 Misc. trivial typos 2018-04-09 11:45:58 -04:00
ompi_endpoint_tag.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_ext.m4 ompi_ext.m4: ensure ext name <= 26 characters 2018-12-12 09:25:12 +09:00
ompi_find_mpi_aint_count_offset.m4 configury: remove now obsolete reference to OPAL_PTRDIFF_TYPE 2017-04-19 13:42:45 +09:00
ompi_fortran_check_abstract.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_check_asynchronous.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_check_bind_c.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_check_c_funloc.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_check_f08_assumed_rank.m4 Misc. trivial typos 2018-04-09 11:45:58 -04:00
ompi_fortran_check_ignore_tkr.m4 Misc. trivial typos 2018-04-09 11:45:58 -04:00
ompi_fortran_check_interface.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_check_iso_fortran_env.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_check_logical_array.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_check_max_array_rank.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_check_optional_args.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_check_preprocess_f90.m4 Fortran: fix the F90 compiler preprocessor check 2020-04-02 16:51:36 -07:00
ompi_fortran_check_private.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_check_procedure.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_check_protected.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_check_real16_c_equiv.m4 configury: fix OMPI_UNIQUE -> OMPI_FLAGS_UNIQUE 2016-12-27 13:36:53 -08:00
ompi_fortran_check_storage_size.m4 config/fortran: Add note about why we reverted PR #3822 2017-07-11 11:09:27 -05:00
ompi_fortran_check_type.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_check_use_only.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_check.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_find_ext_symbol_convention.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_find_module_include_flag.m4 cray ftn: modify fortran module loc checker 2020-01-08 13:20:02 -06:00
ompi_fortran_get_alignment.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_get_handle_max.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_get_kind_value.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_get_sizeof.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_fortran_get_value_true.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_interix.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_microsoft.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_setup_contrib.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_setup_cxx.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_setup_fc.m4 Fortran: fix the F90 compiler preprocessor check 2020-04-02 16:51:36 -07:00
ompi_setup_java.m4 java: clean up MPI Java configury 2018-05-15 15:15:22 -07:00
ompi_setup_mpi_ext.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
ompi_setup_mpi_fortran.m4 fortran.m4: disallow when sizeof(int) != sizeof(INTEGER) 2020-07-10 14:39:34 -07:00
ompi_setup_mpi_java.m4 java: clean up MPI Java configury 2018-05-15 15:15:22 -07:00
ompi_setup_mpi_profiling.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
opal_case_sensitive_fs_setup.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_check_alps.m4 opal_check_alps: fix configure output 2019-11-19 05:07:32 -07:00
opal_check_attributes.m4 ompi: disable functions removed from MPI-3.0 by default 2018-05-31 09:44:19 -06:00
opal_check_broken_qsort.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_check_cma.m4 cma: restore --with-cma=no configure option 2017-04-03 10:42:34 -06:00
opal_check_compiler_version.m4 The bulk of the remaining renaming changes, in one final glorious "blob". Thanks to Jeff for some help chasing down a few spots. Per chat with Jeff, we decided to cleanup a few things that were historical in nature: 2014-05-07 21:48:53 +00:00
opal_check_compiler_works.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_check_cray_pmi.m4 Misc. trivial typos 2018-04-09 11:45:58 -04:00
opal_check_cuda.m4 m4: rename OMPI_SUMMARY_* macros to OPAL_SUMMARY_* 2016-04-20 08:40:00 -07:00
opal_check_icc.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_check_ident.m4 config/opal_*: portability fixes 2015-02-03 15:19:22 +09:00
opal_check_knem.m4 m4: rename OMPI_SUMMARY_* macros to OPAL_SUMMARY_* 2016-04-20 08:40:00 -07:00
opal_check_libnl.m4 Merge pull request #4016 from jsquyres/pr/libnl-you-win-again 2017-09-25 11:53:38 -04:00
opal_check_offsetof.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_check_ofi.m4 common/ofi: Fixing compilation issue with ofi versions that do not support fi_info.nic 2020-06-17 20:49:19 +00:00
opal_check_openfabrics.m4 Misc. trivial typos 2018-04-09 11:45:58 -04:00
opal_check_os_flavors.m4 Misc. trivial typos 2018-04-09 11:45:58 -04:00
opal_check_package.m4 Misc. trivial typos 2018-04-09 11:45:58 -04:00
opal_check_pmi.m4 Ensure we push/pop local AC vars in the right place 2019-03-01 08:40:35 -08:00
opal_check_portals4.m4 m4: rename OMPI_SUMMARY_* macros to OPAL_SUMMARY_* 2016-04-20 08:40:00 -07:00
opal_check_ps.m4 orte-clean: fix bad username/uid usage, add orte-dvm 2017-02-28 08:00:06 -05:00
opal_check_pthread_pids.m4 Misc. trivial typos 2018-04-09 11:45:58 -04:00
opal_check_singularity.m4 Add support for Singularity containers, including a .m4 file for checking if Singularity is available and an orte/schizo component for setting the proper support if a container was given as the executable 2016-02-13 04:40:22 -08:00
opal_check_ugni.m4 m4: rename OMPI_SUMMARY_* macros to OPAL_SUMMARY_* 2016-04-20 08:40:00 -07:00
opal_check_vendor.m4 Fix pgcc18 support. 2020-02-12 15:11:03 -05:00
opal_check_verbs.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_check_version.m4 Stealing some pieces of Josh Hursey's PR #1583 and modifying a bit, allow the opal/pmix external component to handle both PMIx 1.1.4 and PMIx 2.0 versions. Automatically detect the version of the target external library and adjust the only two APIs that changed (PMIx_Init and PMIx_Finalize) 2016-05-27 08:06:31 -07:00
opal_check_visibility.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_check_withdir.m4 config/withdir: Make case for --without-X more clear 2017-09-12 21:17:07 -04:00
opal_check_xpmem.m4 Fix output of XPMEM detection in configure summary 2018-07-10 15:10:51 +02:00
opal_config_asm.m4 opal_config_asm.m4: replace tabs with spaces 2018-08-28 12:02:21 -07:00
opal_config_files.m4 opal: remove generated asm code 2017-08-03 09:18:58 -06:00
opal_config_pthreads.m4 configury: fix pthread_join() call in OPAL_INTL_PTHREAD_TRY_LINK_FORTRAN 2016-01-07 10:20:20 +09:00
opal_config_subdir_args.m4 Ignore --with-foo=external arguments in subdirs 2018-10-09 03:46:54 -07:00
opal_config_subdir.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_config_threads.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_configure_options.m4 Misc. trivial typos 2018-04-09 11:45:58 -04:00
opal_ensure_contains_optflags.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_find_type.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_functions.m4 opal_functions.m4: minor typo fixes 2018-08-28 12:02:22 -07:00
opal_get_version.m4 configury: fix git describe with VPATH 2014-12-22 15:14:33 +09:00
opal_get_version.m4sh Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_lang_link_with_c.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_load_platform.m4 BUILD: add support for --with-platform-patches-dir=DIR 2015-10-20 17:14:15 +03:00
opal_mca_priority_sort.pl Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_mca.m4 dist: Add infrastructre for prjects to not build 2018-05-25 08:48:50 -07:00
opal_save_version.m4 version configury: make dist now works 2014-10-02 11:32:54 -07:00
opal_search_libs.m4 opal_search_libs: correctly AC_DEFINE results of search 2014-09-13 00:28:30 +00:00
opal_set_lib_prefix.m4 build: Custom libmpi(_FOO) name option in configure 2016-09-29 21:47:24 -05:00
opal_set_mca_prefix.m4 configury: new OPAL_SET_MCA_PREFIX/ORTE_SET_MCA_CMD_LINE_ID macros 2014-10-22 18:57:40 -07:00
opal_setup_cc.m4 configury: enhance C11 detection 2019-01-13 14:19:36 +09:00
opal_setup_cli.m4 configury: capture configury command line 2016-07-29 09:14:09 +09:00
opal_setup_component_package.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_setup_cxx.m4 configury: fix typos in {ompi,opal}_setup_cxx 2016-07-12 10:09:32 +09:00
opal_setup_ft.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_setup_wrappers.m4 Fix a problem with fortran configure test. 2020-01-24 15:42:00 -06:00
opal_setup_zlib.m4 configury: misc fixes in zlib detection 2017-10-30 16:19:37 +09:00
opal_strip_optflags.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
opal_summary.m4 oshmem: disable if no spmls build 2018-05-25 08:48:50 -07:00
opal_try_assemble.m4 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
orte_check_lsf.m4 Fix LSF configure check for libevent conflict 2020-05-18 15:10:46 -04:00
orte_check_moab.m4 Sync to latest PMIx master and PMIx reference server 2017-03-11 12:50:38 -08:00
orte_check_sge.m4 m4: rename OMPI_SUMMARY_* macros to OPAL_SUMMARY_* 2016-04-20 08:40:00 -07:00
orte_check_slurm.m4 Enable full operations under SLURM on Cray systems by co-locating a daemon with mpirun when mpirun is executing on a compute node in that environment. This allows local application procs to inherit their security credential from the daemon as it will have been launched via SLURM 2017-05-06 19:08:50 -07:00
orte_check_tm.m4 configury: fix PBS Pro support 2017-07-12 10:01:56 +09:00
orte_config_files.m4 Remove stale defunct tools 2018-10-30 08:51:25 -07:00
orte_configure_options.m4 Since static ports are only used by ORTE if the runtime option is given, 2016-11-04 05:01:42 -07:00
orte_setup_debugger_flags.m4 Add a compilation flag that adds unwind info to all files that are present in the stack starting from MPI_Init. 2019-04-01 11:10:04 +01:00
oshmem_config_files.m4 oshmem: add C++ wrappers 2017-09-01 13:24:34 +09:00
oshmem_configure_options.m4 oshmem: Update config code to match OMPI usage 2018-05-25 08:48:50 -07:00
oshmem_setup_profiling.m4 Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
pkg.m4 Misc. trivial typos 2018-04-09 11:45:58 -04:00