416 Commits

Autor SHA1 Mensagem Data
Yanfei Guo 643e6064bb mpl: pass MPL's CFLAGS back to MPICH
MPL exports additional CFLAGS as MPL_CFLAGS. Only the ones that added
by the MPL configure will be passed. The PAC_CONFIG_MPL macro will add
them to CFLAGS.
2024-09-26 16:06:44 -05:00
Hui Zhou 2afc14fa0d config: add options to suppress some warnings
PGI compilers, now nvc, spits many warnings by default, some of them
not worth to fix. For an example, the warning,
branch_past_initialization force splitting declaring and initializing
local variables with local scopes.

Suppress them by options instead.
2024-09-24 12:14:16 -05:00
wkliao 6a9299620f fix detection of python version 3
configure errors:
../mpich/configure: line 21398: python: command not found
../mpich/configure: line 21398: test: 3: unary operator expected
2024-05-01 07:53:35 -07:00
wkliao 97107ee539 ROMIO: remove trailing whitespace 2024-04-06 13:29:02 -05:00
Hui Zhou d05af77b9b confdb: fix syntax error in PAC_SET_MPI_TYPE
It is a syntax error when $3 is empty:
    if test -z "" -o = 0 ;
2024-01-18 13:56:32 -06:00
Hui Zhou cea5a2d2d7 configure: check Fortran ISO_C_BINDING
ISO_C_BINDING is an intrisic feature added since Fortran 2003. Check
this feature so we can provide the generic interface using Type(c_ptr),
e.g. in MPI_Alloc_mem.
2023-10-25 16:55:08 -05:00
Hui Zhou 4be0b8f56f cxx: replace HAVE_ROMIO in mpicxx.h.in
The HAVE_ROMIO macro is defined in mpichconf.h, not available in
mpicxx.h. Instead, use autoconf macro HAVE_CXX_IO and do substitution
into "#if 1" or "#if 0" at configure time.

The PAC_HAVE_ROMIO macro is called inside the enable_romio branch, thus
won't work with --disable_romio. It is simple enough to put in
configure.ac directly.
2023-10-20 11:29:00 -05:00
Ken Raffenetti 0cc7d58b1c confdb: Improve f08 support test
Add a call to CFI_is_contiguous, which is needed by the f08
binding. Some compilers provide this prototype, but not the symbol, so
we need to disable f08 if the test fails to link.

Fixes pmodels/mpich#6505
2023-05-26 11:43:43 -05:00
Hui Zhou 2a91b7597d mpl: make cuda memory free hooks visible
The cuda memory free hooks -- cudaFree and cuMemFree -- needs to have
the visibility attribute to be exposed to user linking.
2023-03-31 16:40:17 -05:00
Hui Zhou d7606f6da9 confdb: extract hwloc ldflags on osx
On osx we need add " -framework Foundation -framework IOKit" to ldflags.
Extract that from hwloc's config.status.

This reverts commit 2c1a749fba.
2023-01-03 15:11:59 -06:00
Hui Zhou deb2a2b04d config: allow --with-pmi=path/to/libpmi
Allow linking with an externally installed libpmi.so. We'll assume using
PMIv1, but eventually we may allow runtime selections.
2022-11-17 14:55:01 -06:00
Hui Zhou 164c87af9c build: allow user to set PYTHON
Allow user to manually set environment variable PYTHON to the Python 3
executable in case we are not able to find it.
2022-11-14 10:31:44 -06:00
Ken Raffenetti 8cf5a62c2d confdb: Avoid using unset $builddir
Not all of our configure.ac scripts set $builddir.
2022-10-23 14:50:52 -05:00
Ken Raffenetti 622948bae9 confdb: Fix typo in notice message
Make sure the notice message matches the file being sourced.
2022-10-21 16:29:47 -05:00
Yanfei Guo 24dcaccda9 mpl: fix configure for HIP detection
The pop on CPPFLAGS will cleanup the HIP related flags. Creating
a new macro for supporting extra CPPFLAGS when checking.
2022-09-26 13:19:06 -04:00
Hui Zhou fc726c80e1 mpl: add configure and make rules for cu files
Import the same mechanism of compile cu files from yaksa using the
helper script cudalt.sh. We removed the libtool version check because
the mechanism of directly invoking $(libtool) is not stable and libtool
doesn't really check the exact versions.
2022-08-30 16:45:43 -05:00
Hui Zhou c0c834dc19 hydra: import pmi into hydra
Hydra shares the wire protocol with the pmi client. Importing pmi avoids
duplicating code and adds consistency.
2022-08-23 11:32:10 -05:00
Hui Zhou c3b6232dec config: use AC_LINK_IFELSE to check weak alias
The compiler may support the weak alias attribute but still broken by
the linker. This is the case e.g. on Cygwin. Use AC_LINK_IFELSE for more
robutst check.

Remove the check for just the attribute weak or weak_import, since both
are not used.
2022-07-26 16:03:31 -05:00
Hui Zhou e734d06b85 configure: m4_define MPICH_CONFIGURE
Some of confdb macros are used in both mpich configure and submodules'
configure and they need behave differently. Defining MPICH_CONFIGURE to
reliably identify whether the macros is invoked under mpich's configure.
2022-07-13 14:18:19 -05:00
Hui Zhou 31593d0e52 config: probe multiple libs in PAC_CHECK_HEADER_LIB_OPTIONAL
Some libraries may use different lib names for different forks. Allow
multiple libs to be checked with PAC_CHECK_HEADER_LIB_OPTIONAL. We can't
use AC_SERCH_LIBS because we need know which library actually gets
linked.
2022-06-10 11:08:28 -05:00
Hui Zhou 1b75b499e1 misc: remove izem
We no longer use izem since workq has been removed.
2022-06-07 13:45:32 -05:00
Hui Zhou 2c1a749fba config: remove capturing HWLOC_EMBEDDED_LIBS
Now that we grab dependency_libs from libtool library, we no longer need
to grab HWLOC_EMBEDDED_LIBS.
2022-05-20 08:47:05 -05:00
Hui Zhou ff57f52937 confdb: make datatype configure behave when len is 0
The AC_CHECK_SIZEOF or PAC_PROG_F77_CHECK_SIZEOF_EXT should set the type
len to 0 if the type is missing. But sometime the len may end up empty
due some negligence. Make the configure functions behave in this case
rather than leading to mysterious behaviors.
2022-05-09 23:00:43 -05:00
Hui Zhou bfde250318 config: fix mpl config in pmi
We can't always skip linking libmpl.la when we are install pmi
separately. Use shell variable $pac_skip_mpl_lib instead of m4 macro
PAC_SKIP_MPL_LIB.

Just use PAC_CONFIG_MPL, which should take care of all paths.
2022-03-30 16:04:34 -05:00
Hui Zhou e771846610 configure: use PAC_SKIP_MPL_LIB
When building romio within mpich, we only need set mpl_includedir since
libmpl is included in mpich already. Define and use a specific m4 macro,
PAC_SKIP_MPL_LIB, for this purpose rather than making the exception
based on AC_PACKAGE_NAME. This easily allows additional package, e.g.
pmi, to do the same.
2022-03-28 16:29:58 -05:00
Hui Zhou 27403bf59e config: remove PAC_CC_STRICT from hydra
Hydra is going to inherit the CFLAGS from mpich configure. Meanwhile,
having the extra interaction between MPICH and hydra is easy to bring
forth complications. Thus we remove PAC_CC_STRICT from hydra to keep it
simple.
2022-02-24 13:40:14 -06:00
Hui Zhou 8b023dd3ae config: pass --with-hwloc=embedded to subsys configure
When user has an outdated hwloc installed, the configure will switch to
use the embedded hwloc. This may end up hydra check with embedded hwloc
-- due to inheriting CPPFLAGS from mpich -- and link with external
outdated hwloc. Pass --with-hwloc=embedded option down will prevent such
inconsistency.
2022-02-24 13:40:14 -06:00
Ken Raffenetti c4e999add5 config.rpath: Add support for Intel OneAPI compilers
Add in checks for icx and ifx compilers, which are replacing icc and
ifort.
2022-02-16 08:19:27 -06:00
Hui Zhou da67714145 configure: allow work-around when Python 3 is unavailable
We believe it is uncommon to have a system without Python 3. But in case
it is unavailable, one still can manually run e.g. `python3
maint/gen_binding_f08.py` separately to proceed, with the caveat that
they need know the options if the default doesn't work.

Also rename the variable "cmd" into "cmd_f08" to prevent collision with
other parts of  configure.
2022-02-04 17:32:45 -06:00
Hui Zhou d0485191eb configure: check FC directives to ignore TKR check
This is needed for Fortran interfaces for routines with choice buffers.
2022-02-04 17:32:45 -06:00
Hui Zhou 3d351d49a0 configure: add -fPIE flag when linking with Fortran
While gcc always compile into PIE objects, other compilers may switch
it off, for example, clang under -O2. This prevents linking with
Fortran, which apparently requires PIE objects.
2022-02-01 21:47:46 -06:00
Hui Zhou ba339cf071 mpl: optimize MPL_is_pof2 using __builtin_popcount
Use __builtin_popcount when it is available.
2022-01-27 17:31:20 -06:00
Hui Zhou 63a2b0e431 mpl: add MPL_log2
We need calculate power of 2 or log of 2 often. Add the MPL routine that
may use the builtin instruction when available.
2022-01-27 17:31:19 -06:00
Hui Zhou a684f0fd9c confdb: only add -fno-common on macos
So far, only macos has issues with common symbols when building static
libraries.
2022-01-27 15:09:49 -06:00
Hui Zhou 5b6f05e6e0 confdb: add PAC_C_NO_COMMON
Add macro to check and apply -fno-common. This will fix the static
linking issues on macos due to missing common symbols in static library.
2022-01-27 15:09:49 -06:00
Hui Zhou c29993b350 configure: skip configure submodules if already built
When using embedded modules, check whether the corresponding convenience
library already exists and skip the configure if it does.

Note: the prebuilt module Makefiles contains absolute paths that may be
different from the current working dir. Thus we have to remove the
module subdir from the Makefile as well. This works as long as we do not
need to re-configure the pre-built submodules. If we ever need to
re-configure submodules, simply remove the la files, e.g.
  find modules '*.la' | xargs rm
and rerun configure.
2022-01-17 12:23:41 -06:00
Hui Zhou 4fbb2e2336 configure: FIX - source mpl/localdefs in PAC_CONFIG_MPL
MPL may set additional CPPFLAGS and other variables that need be sourced
into the caller configure script.

Now that romio also calls PAC_CONFIG_MPL, we need make sure it doesn't
link libmpl.la again since mpich already links it.
2021-12-22 17:21:15 -06:00
Hui Zhou bc5d9fc88b confdb: fix mpl_includedir
We need use double quotes because `main_top_builddir` is not a autoconf
variable.
2021-12-21 16:07:14 -06:00
Hui Zhou 1141aa6d05 modules: use --disable-gl to configure embedded hwloc
The extra grphic layer dependency is undesirable.
2021-12-07 17:37:10 -06:00
Hui Zhou 42038c1d4d confdb: move PAC_RESET_ALL_FLAGS etc into aclocal_util.m4
Move the macros that manipulate build flags together since they need be
consistent.
2021-11-30 09:24:54 -06:00
Hui Zhou 9fe7c6acaa configure: pass USER_CFLAGS to hwloc
When we reset flags, we need make sure to pass along user flags.
2021-11-29 22:52:39 -06:00
Hui Zhou 9138152973 config: remove -Wno-unused-label
Since intel compiler (and some other) doesn't support this option and we
need clean for intel compiler anyway, we should clean this warning
rather than exempt from it.
2021-11-11 15:41:07 -06:00
Hui Zhou a4acb83f83 config: fix typo in defining MPIR_INTERGERx_CTYPE
It was mistyped to MPIR_REALx_CTYPE, resulting double definitions and
missing definitions of MPIR_INTERGERx_CTYPE.
2021-11-03 16:01:47 -05:00
Hui Zhou 615e9a512b configure: refactor datatype configurations
Define and use macros such as PAC_SET_MPI_TYPE to make code cleaner.

Organize the code that configures MPI datatypes. Use following order --

* Check Datatype Sizes and Alignment
  * C types using AC_CHECK_SIZEOF
  * Fortran types using PAC_PROG_F77_CHECK_SIZEOF_EXT
* For optional types, if not available or disabled, set sizes to 0
* Set sizes for MPI_AINT, MPI_OFFSET, and MPI_COUNT
* Use PAC_SET_MPI_TYPE set basic datatype values
  * MPI_{TYPE} for hexadecimal values to be replaced in mpi.h.in
  * F77_MPI_{TYPE} for decimal values to be replaced in mpif.h.in
  * F08_MPI_{TYPE} for decimal values to be replaced in
mpi_f08_compile_constants.f90.in
2021-11-02 15:25:01 -05:00
Hui Zhou e9661e28d8 mpl: add visibility flag
The MPL functions are leaking into the mpich dynamic symbol tables. Make
sure to add the visibility cflags to hide the symbols.
2021-11-02 14:40:20 -05:00
Hui Zhou 96bacc826d build: fix parsing hwloc_embedded_libs
The `$4` is eaten by M4 in autoconf. We need play some quoting trick to
pass it to shell.
2021-10-04 20:25:07 -05:00
Hui Zhou ce9dc17d8d config: avoid double build mpl in hydra
Reuse the mpl library build in mpich to avoid build it again in hydra.
2021-09-27 09:39:18 -05:00
Hui Zhou 6b7103e5b3 config: avoid double configure of hwloc
Refactor configure of hwloc into confdb/aclocal_modules.m4. We'll factor
configure of other modules into this file later.

Check that if we are doing sub-configure from MPICH, simply use the main
embedded hwloc rather than build another one.
2021-09-27 09:39:18 -05:00
Wesley Bland 4f5ff4008a confdb: Disable -fno-var-tracking-assignments
There are compilation warnings that come up because this flag is
enabled. Specifically, we see this:

MOD      src/binding/fortran/use_mpi/mpi.mod-stamp
src/mpi/comm/commutil.c: In function ‘MPII_compare_info_hint’:
src/mpi/comm/commutil.c:1139:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
 1139 | int MPII_compare_info_hint(const char *hint_str, MPIR_Comm * comm_ptr, int *info_args_are_equal)
      |     ^~~~~~~~~~~~~~~~~~~~~~
src/mpi/comm/commutil.c:1139:5: note: variable tracking size limit exceeded

However, this warning doesn't provide any useful information and can be
ignored, so disable it.
2021-09-02 13:47:12 -05:00
Wesley Bland df36614ba7 confdb: Add compiler-specific strict warnings
Strict compiler builds need to have some flags that are specific to
certain compilers (e.g., -Wno-unused-label). This copies (and slightly
modifies) the compiler check from the fortran configuration.
2021-09-02 13:47:03 -05:00