Skip to content

Commit

Permalink
symlink instead of copy for fortran module includes
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Jun 6, 2024
1 parent 6cb1364 commit f61a0b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions recipe/build-mpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ make -j"${CPU_COUNT:-1}"
make install

# openmpi installs .mod files in the wrong prefix (/lib instead of /include)
ls -l $PREFIX/lib/*.mod
mv -v $PREFIX/lib/*.mod $PREFIX/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
Expand Down
3 changes: 2 additions & 1 deletion recipe/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ if [[ $PKG_NAME == "openmpi" ]]; then
$MPIEXEC -n 4 ./helloworld.sh

test -f $PREFIX/include/mpi.mod
test ! -f $PREFIX/lib/mpi.mod
# keep duplicates in original location for now
test -f $PREFIX/lib/mpi.mod
fi

if [[ $PKG_NAME == "openmpi-mpicc" ]]; then
Expand Down

0 comments on commit f61a0b2

Please sign in to comment.