Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebuild for openmpi 5 #34

Merged

Conversation

regro-cf-autotick-bot
Copy link
Contributor

This PR has been triggered in an effort to update openmpi5.

Notes and instructions for merging this PR:

  1. Please merge the PR only after the tests have passed.
  2. Feel free to push to the bot's branch to update this PR if needed.

Please note that if you close this PR we presume that the feedstock has been rebuilt, so if you are going to perform the rebuild yourself don't close this PR until the your rebuild has been merged.


If this PR was opened in error or needs to be updated please add the bot-rerun label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase @conda-forge-admin, please rerun bot in a PR comment to have the conda-forge-admin add it for you.

This PR was created by the regro-cf-autotick-bot. The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. Feel free to drop us a line if there are any issues! This PR was generated by https://github.com/regro/cf-scripts/actions/runs/9231606986 - please use this URL for debugging.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@traversaro
Copy link
Contributor

osx failure:

[  2%] Building C object CMakeFiles/scalapack.dir/BLACS/SRC/sgsum2d_.c.o
/Users/runner/miniforge3/conda-bld/scalapack_1716604031901/work/BLACS/SRC/igsum2d_.c:154:7: error: call to undeclared function 'BI_imvcopy'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      BI_imvcopy(Mpval(m), Mpval(n), A, tlda, bp->Buff);
      ^
      ^
/Users/runner/miniforge3/conda-bld/scalapack_1716604031901/work/BLACS/SRC/sgsum2d_.c:167:6: error: call to undeclared function 'BI_svmcopy'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
            BI_svmcopy(Mpval(m), Mpval(n), A, tlda, bp2->Buff);
            ^
/Users/runner/miniforge3/conda-bld/scalapack_1716604031901/work/BLACS/SRC/sgsum2d_.c:173:3: error: call to undeclared function 'BI_svmcopy'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
         BI_svmcopy(Mpval(m), Mpval(n), A, tlda, bp2->Buff);
         ^
/Users/runner/miniforge3/conda-bld/scalapack_1716604031901/work/BLACS/SRC/sgsum2d_.c:227:10: error: call to undeclared function 'BI_svmcopy'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
         BI_svmcopy(Mpval(m), Mpval(n), A, tlda, bp->Buff);
         ^
4 errors generated.
make[2]: *** [CMakeFiles/scalapack.dir/build.make:650: CMakeFiles/scalapack.dir/BLACS/SRC/sgsum2d_.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1234: CMakeFiles/scalapack.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
Traceback (most recent call last):
  File "/Users/runner/miniforge3/bin/conda-build", line 11, in <module>
    sys.exit(execute())
  File "/Users/runner/miniforge3/lib/python3.10/site-packages/conda_build/cli/main_build.py", line 590, in execute
    api.build(
  File "/Users/runner/miniforge3/lib/python3.10/site-packages/conda_build/api.py", line 250, in build
    return build_tree(
  File "/Users/runner/miniforge3/lib/python3.10/site-packages/conda_build/build.py", line 3638, in build_tree
    packages_from_this = build(
  File "/Users/runner/miniforge3/lib/python3.10/site-packages/conda_build/build.py", line 2506, in build
    utils.check_call_env(
  File "/Users/runner/miniforge3/lib/python3.10/site-packages/conda_build/utils.py", line 405, in check_call_env
    return _func_defaulting_env_to_os_environ("call", *popenargs, **kwargs)
  File "/Users/runner/miniforge3/lib/python3.10/site-packages/conda_build/utils.py", line 381, in _func_defaulting_env_to_os_environ
    raise subprocess.CalledProcessError(proc.returncode, _args)
subprocess.CalledProcessError: Command '['/bin/bash', '-o', 'errexit', '/Users/runner/miniforge3/conda-bld/scalapack_1716604031901/work/conda_build.sh']' returned non-zero exit status 2.

@minrk minrk force-pushed the rebuild-openmpi5-0-1_h192f0a branch from 7eb99fe to 31a41be Compare June 4, 2024 13:08
@minrk
Copy link
Member

minrk commented Jun 4, 2024

everything's passing except mac+arm+openmpi, which is failing at Find_MPI_Fortran. No info as to why that fails, of course.

@dalcinl
Copy link
Contributor

dalcinl commented Jun 4, 2024

Could it just be the issue related to MPI constants in common blocks that the new Apple linker broke? Do you remember the related MUMPS issue?

@minrk
Copy link
Member

minrk commented Jun 4, 2024

I think that was this one, which seemed to have been resolved by a mumps-specific -DAVOID_MPI_IN_PLACE.

This one is CMake failing to find MPI_Fortran at all, which I don't understand. Presumably setting the right variable will do it, but FindMPI is so elaborate and CMake's debug output is so unclear, I don't know where to start.

@dalcinl
Copy link
Contributor

dalcinl commented Jun 5, 2024

Something fishy is going on. Notice the following output. I've installed the package locally, and the $PREFIX/lib/mpi_f08.mod file is there.

        $BUILD_PREFIX/bin/mpifort  -I$PREFIX/include -march=armv8.3-a -ftree-vectorize -fPIC -fno-stack-protector -O2 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/scalapack-2.2.0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fallow-argument-mismatch  -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -mmacosx-version-min=11.0 -c $SRC_DIR/build/CMakeFiles/CMakeScratch/TryCompile-Ar0KT6/test_mpi.f90 -o CMakeFiles/cmTC_2821f.dir/test_mpi.f90.o
        $SRC_DIR/build/CMakeFiles/CMakeScratch/TryCompile-Ar0KT6/test_mpi.f90:2:11:
        
            2 |       use mpi_f08
              |           1
        Fatal Error: Cannot open module file ‘mpi_f08.mod’ for reading at (1): No such file or directory

@dalcinl
Copy link
Contributor

dalcinl commented Jun 5, 2024

I tried to reproduce locally (with the build-locally.py script) on native Apple Silicon (M1), and things are failing at basic C compilation.
Also, the build.sh script has a lot of workarounds that may no longer be needed, maybe this is an opportunity for a cleanup.

@minrk
Copy link
Member

minrk commented Jun 5, 2024

@dalcinl it's there, but -L$PREFIX/lib is missing, maybe that's the issue. I added LDFLAGS to OMPI_LDFLAGS (maybe openmpi activate should set these env vars by default.

@dalcinl
Copy link
Contributor

dalcinl commented Jun 5, 2024

@dalcinl it's there, but -L$PREFIX/lib is missing, maybe that's the issue. I added LDFLAGS to OMPI_LDFLAGS (maybe openmpi activate should set these env vars by default.

But running mpifort --show shows that -L$PREFIX/lib is being passed to the backend compiler. Or is this somehow related to cross compilation? Besides, a missing -L flag should not affect the search path for .mod files, or am I wrong?

@dalcinl
Copy link
Contributor

dalcinl commented Jun 5, 2024

@minrk What about passing -I$PREFIX/lib via FCFLAGS ?

@minrk
Copy link
Member

minrk commented Jun 5, 2024

You're right, I realize it's compile-time that's failing, not link, so LDFLAGS wouldn't be relevant. Added -I$PREFIX/lib to OMPI_FCFLAGS.

If that works, the real question is why mac + openmpi + cross-compile is the only combination where this isn't on the default search path. Probably related to the fact that openmpi compiler wrappers are in both the build and host env.

@minrk
Copy link
Member

minrk commented Jun 5, 2024

-I$PREFIX/lib fixed it. I don't know enough about how mpi or fortran compilers are supposed to work to tell where that's wrong, or which if any packages ought to be fixed, but notably mpich puts .mod files in $PREFIX/include, while openmpi puts them in $PREFIX/lib. From my not-at-all-confident understanding, it seems that openmpi installs these files in the wrong subdirectory.

@dalcinl
Copy link
Contributor

dalcinl commented Jun 5, 2024

while openmpi puts them in $PREFIX/lib. From my not-at-all-confident understanding, it seems that openmpi installs these files in the wrong subdirectory.

Looks like this was a deliberate choice in the new v5 release. I also believe the issue is related to cross-compilation and a mismatch between the native vs cross prefixes.

@minrk
Copy link
Member

minrk commented Jun 5, 2024

Looks like this was a deliberate choice in the new v5 release

it's the same in 4.x as well. Something might have changed in the default wrapper arguments to prevent them being found (or it could be a change in cmake FindMPI), but the install location is the same.

I opened open-mpi/ompi#12600 because every fortran package I can find puts .mod files in include, not lib, so it really seems like a mistake to me, just one that doesn't come up very often.

@minrk minrk merged commit 040f507 into conda-forge:main Jun 5, 2024
12 checks passed
@minrk
Copy link
Member

minrk commented Jun 5, 2024

It looks like the install directory hasn't changed in at least 8 years, so I don't think it's a recent choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants