From a36b5d36179c9357310aa9ec3102819eb66570af Mon Sep 17 00:00:00 2001 From: Shengqi Chen Date: Thu, 11 Sep 2025 22:43:09 +0800 Subject: [PATCH] Fix MPI_Init arguments in LpMumpsSolverInterface to fix SIGSEGV with MPICH >= 4.3.1 MPICH (>= 4.3.1) will dereference `argv` when `argc` is larger than 0. The previous way of passing arguments will cause a SIGSEGV since `argv` is NULL. See: https://github.com/pmodels/mpich/commit/e9560dde891ab1414b9aec02a2e8acc4622d5e1b diff --git a/src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp b/src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp index 14c475ddd..88599dd6e 100644 --- src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp +++ src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp @@ -63,9 +63,7 @@ static void MPIinit(void) MPI_Initialized(&mpi_initialized); if( !mpi_initialized ) { - int argc = 1; - char** argv = NULL; - MPI_Init(&argc, &argv); + MPI_Init(NULL, NULL); } }