Skip to content

Commit 03089f7

Browse files
committed
Support FreeBSD
1 parent f356ebf commit 03089f7

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

BUILD.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
```sh
66
# -DBUILD_SHARED_LIBS=ON
77
rm -rf mpitrampoline $HOME/src/c/MPIstuff/mpitrampoline
8-
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
8+
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
99
cmake --build mpitrampoline && cmake --install mpitrampoline
1010
```
1111

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ authors:
55
given-names: Erik
66
orcid: https://orcid.org/0000-0002-4518-9017
77
title: MPItrampoline
8-
version: v5.4.1
8+
version: v5.5.0
99
doi: 10.5281/zenodo.6174408
10-
date-released: 2024-08-29
10+
date-released: 2024-09-25

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.12...3.20)
22
project(
3-
MPItrampoline VERSION 5.4.1
3+
MPItrampoline VERSION 5.5.0
44
DESCRIPTION "MPI trampoline"
55
HOMEPAGE_URL "https://github.com/eschnett/MPItrampoline"
66
LANGUAGES NONE

src/mpi.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,13 @@ static void *load_library(const char *const libname) {
504504
assert(0);
505505
}
506506

507+
#elif __FreeBSD__
508+
509+
// dlmopen is not supported, always use dlopen instead
510+
if (verbose)
511+
fprintf(stderr, "[MPItrampoline] Calling dlopen\n");
512+
handle = dlopen(libname, dlopen_flags | RTLD_LOCAL | RTLD_DEEPBIND);
513+
507514
#else
508515
#error "Unsupported operating system"
509516
#endif

0 commit comments

Comments
 (0)