diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index a5836e8d..ba4b251c 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -72,7 +72,6 @@ else --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" - ( startgroup "Inspecting artifacts" ) 2> /dev/null # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 diff --git a/recipe/build-mpi.sh b/recipe/build-mpi.sh index 5ebf122a..7d8979e9 100755 --- a/recipe/build-mpi.sh +++ b/recipe/build-mpi.sh @@ -14,6 +14,8 @@ unset FFLAGS F77 F90 F95 wrapper_ldflags="-L$PREFIX/lib -Wl,-rpath,$PREFIX/lib" export LIBRARY_PATH="$PREFIX/lib" if [[ "$target_platform" == osx-* ]]; then + # FIXME: remove autogen when autotools patch no longer required + perl autogen.pl --force if [[ -n "$CONDA_BUILD_SYSROOT" ]]; then export CFLAGS="$CFLAGS -isysroot $CONDA_BUILD_SYSROOT" export CXXFLAGS="$CXXFLAGS -isysroot $CONDA_BUILD_SYSROOT" @@ -61,6 +63,7 @@ fi --enable-mpi-fortran \ --disable-wrapper-rpath \ --disable-wrapper-runpath \ + --with-mpi-moduledir="$PREFIX/include" \ --with-wrapper-cflags="-I$PREFIX/include" \ --with-wrapper-cxxflags="-I$PREFIX/include" \ --with-wrapper-fcflags="-I$PREFIX/include" \ @@ -78,13 +81,6 @@ fi make -j"${CPU_COUNT:-1}" make install -# openmpi installs .mod files in the wrong prefix (/lib instead of /include) -# symlink instead of copy to avoid breaking anything (unlikely) -for f in $PREFIX/lib/*.mod; do - modname=$(basename "$f") - ln -sv "../lib/${modname}" "$PREFIX/include/${modname}" -done - POST_LINK=$PREFIX/bin/.openmpi-post-link.sh if [ -n "$build_with_ucx" ]; then echo "setting MCA pml to ^ucx..." diff --git a/recipe/ldflags-mac.patch b/recipe/ldflags-mac.patch new file mode 100644 index 00000000..dcedc7b5 --- /dev/null +++ b/recipe/ldflags-mac.patch @@ -0,0 +1,31 @@ +From e70f0a4afb1277e52389267777d260229b468ec0 Mon Sep 17 00:00:00 2001 +From: Min RK +Date: Mon, 29 Jul 2024 12:50:59 +0200 +Subject: [PATCH] typo in LDFLAGS_save_xcode variable name + +resulted in effectively overriding LDFLAGS='' on mac +--- + config/ompi_setup_fc.m4 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/config/ompi_setup_fc.m4 b/config/ompi_setup_fc.m4 +index 53c3cd96da..c147bf2b60 100644 +--- a/config/ompi_setup_fc.m4 ++++ b/config/ompi_setup_fc.m4 +@@ -212,11 +212,11 @@ end program + AS_IF([test $xcode_happy -eq 1], + [ # Restore LDFLAFGS + the new flags (i.e., get rid of the + # "-L." we added for this test) +- LDFLAGS="$LDFLAGS_xcode_save $1" ++ LDFLAGS="$LDFLAGS_save_xcode $1" + $2], + [ # If we failed the test, reset LDFLAGS back to its + # original value. +- LDFLAGS=$LDFLAGS_xcode_save ++ LDFLAGS=$LDFLAGS_save_xcode + $3]) + + OPAL_VAR_SCOPE_POP +-- +2.45.0 + diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 4578cdd7..f20d95f4 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,7 +1,7 @@ -{% set version = "5.0.3" %} +{% set version = "5.0.5" %} {% set major = version.rpartition('.')[0] %} {% set cuda_major = (cuda_compiler_version|default("11.8")).rpartition('.')[0] %} -{% set build = 10 %} +{% set build = 0 %} # give conda package a higher build number {% if mpi_type == 'conda' %} @@ -16,7 +16,9 @@ package: source: fn: openmpi-{{ version }}.tar.bz2 url: https://www.open-mpi.org/software/ompi/v{{ major }}/downloads/openmpi-{{ version }}.tar.bz2 - sha256: 990582f206b3ab32e938aa31bbf07c639368e4405dca196fabe7f0f76eeda90b + sha256: 6588d57c0a4bd299a24103f4e196051b29e8b55fbda49e11d5b3d32030a32776 + patches: + - ldflags-mac.patch # [osx] build: number: {{ build }} @@ -48,8 +50,9 @@ outputs: - {{ compiler('cuda') }} # [cuda_compiler != "None"] - {{ compiler('fortran') }} - {{ stdlib('c') }} - #- autoconf # [unix] - #- automake # [unix] + # FIXME: autotools required for ldflags-mac.patch + - autoconf # [osx] + - automake # [osx] - libtool # [unix] - make # [unix] host: diff --git a/recipe/run_test.sh b/recipe/run_test.sh index 38c4a0c1..e03f4f6c 100755 --- a/recipe/run_test.sh +++ b/recipe/run_test.sh @@ -28,8 +28,6 @@ if [[ $PKG_NAME == "openmpi" ]]; then $MPIEXEC -n 4 ./helloworld.sh test -f $PREFIX/include/mpi.mod - # keep duplicates in original location for now - test -f $PREFIX/lib/mpi.mod fi if [[ $PKG_NAME == "openmpi-mpicc" ]]; then