From 99c9d15d24b6678e0291f5b607604ed9434cdc37 Mon Sep 17 00:00:00 2001 From: Tao He Date: Tue, 6 Jun 2023 12:02:42 +0800 Subject: [PATCH] Fixes the GAE fork issue with openmpi (#2820) ## Related issue number Fixes #2812 Signed-off-by: Tao He --- analytical_engine/core/grape_engine.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/analytical_engine/core/grape_engine.cc b/analytical_engine/core/grape_engine.cc index 173d56c36653..bccc59b099aa 100644 --- a/analytical_engine/core/grape_engine.cc +++ b/analytical_engine/core/grape_engine.cc @@ -199,6 +199,9 @@ class RedirectLogSink : public google::LogSink { }; int main(int argc, char* argv[]) { + // set RDMAV_FORK_SAFE to avoid the openmpi error, see also #2812 + setenv("RDMAV_FORK_SAFE", "1", 0); + int exit_code = 0; // not output any log to stderr by glog. FLAGS_stderrthreshold = std::numeric_limits::max();