[mvapich-discuss] [PATCH] Initialize libibverbs’s data structures to handle fork
Honggang LI
honli at redhat.com
Tue Dec 15 04:48:56 EST 2020
From: Honggang Li <honli at redhat.com>
The benchmark 'osu_latency_mp.c' uses 'fork()' without calling
ibv_fork_init().
Setting the environment variable RDMAV_FORK_SAFE or
IBV_FORK_SAFE has the same effect as calling ibv_fork_init().
Without this patch, the benchmark hang on when environment
variable not set up.
Signed-off-by: Honggang Li <honli at redhat.com>
---
mpi/pt2pt/osu_latency_mp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mpi/pt2pt/osu_latency_mp.c b/mpi/pt2pt/osu_latency_mp.c
index 008b1a77de40..ab8b48f95b2e 100644
--- a/mpi/pt2pt/osu_latency_mp.c
+++ b/mpi/pt2pt/osu_latency_mp.c
@@ -26,6 +26,9 @@ int main(int argc, char *argv[])
options.bench = PT2PT;
options.subtype = LAT_MP;
+ if (putenv("RDMAV_FORK_SAFE=1") != 0)
+ exit(EXIT_FAILURE);
+
set_header(HEADER);
set_benchmark_name("osu_latency_mp");
--
2.25.4
More information about the mvapich-discuss
mailing list