Skip to content

Commit

Permalink
Merge pull request #48 from eschnett/eschnett/freebsd
Browse files Browse the repository at this point in the history
Support FreeBSD
  • Loading branch information
eschnett authored Sep 25, 2024
2 parents f356ebf + 03089f7 commit 67292e8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
```sh
# -DBUILD_SHARED_LIBS=ON
rm -rf mpitrampoline $HOME/src/c/MPIstuff/mpitrampoline
cmake -S . -B mpitrampoline -G Ninja -DCMAKE_C_COMPILER=gcc-mp-12 -DCMAKE_CXX_COMPILER=g++-mp-12 -DCMAKE_Fortran_COMPILER=gfortran-mp-12 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$HOME/src/c/MPIstuff/mpitrampoline
cmake -B mpitrampoline -G Ninja -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$HOME/src/c/MPIstuff/mpitrampoline
cmake --build mpitrampoline && cmake --install mpitrampoline
```

Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ authors:
given-names: Erik
orcid: https://orcid.org/0000-0002-4518-9017
title: MPItrampoline
version: v5.4.1
version: v5.5.0
doi: 10.5281/zenodo.6174408
date-released: 2024-08-29
date-released: 2024-09-25
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.12...3.20)
project(
MPItrampoline VERSION 5.4.1
MPItrampoline VERSION 5.5.0
DESCRIPTION "MPI trampoline"
HOMEPAGE_URL "https://github.com/eschnett/MPItrampoline"
LANGUAGES NONE
Expand Down
7 changes: 7 additions & 0 deletions src/mpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,13 @@ static void *load_library(const char *const libname) {
assert(0);
}

#elif __FreeBSD__

// dlmopen is not supported, always use dlopen instead
if (verbose)
fprintf(stderr, "[MPItrampoline] Calling dlopen\n");
handle = dlopen(libname, dlopen_flags | RTLD_LOCAL | RTLD_DEEPBIND);

#else
#error "Unsupported operating system"
#endif
Expand Down

0 comments on commit 67292e8

Please sign in to comment.