From b6f05ea918a64cfc34620b86f550659c51705942 Mon Sep 17 00:00:00 2001 From: Antonio Leblanc <56365887+antonio-leblanc@users.noreply.github.com> Date: Thu, 29 Oct 2026 09:12:53 -0300 Subject: [PATCH] rm unused listenMode and include MPI headers as system (#161) --- CMakeLists.txt | 4 ++-- src/Command.cpp | 19 ++----------------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6447e665..f77e37bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,7 +111,7 @@ else() find_package(MPI) if(MPI_FOUND) message(STATUS "MPI found via find_package") - include_directories(${MPI_INCLUDE_PATH}) + include_directories(SYSTEM ${MPI_INCLUDE_PATH}) else() # Try to detect MPI installation from environment variables like MPI_HOME, MPI_ROOT, or any *MPI*ROOT* set(_mpi_env_vars) @@ -141,7 +141,7 @@ else() set(CMAKE_C_COMPILER "${MPI_C_COMPILER}") set(CMAKE_CXX_COMPILER "${MPI_CXX_COMPILER}") link_directories("${HEREMPI}/lib" "${HEREMPI}/lib/release") - include_directories("${MPI_INCLUDE_PATH}") + include_directories(SYSTEM "${MPI_INCLUDE_PATH}") message(STATUS "Set MPI_C_COMPILER: ${MPI_C_COMPILER}") message(STATUS "Set MPI_CXX_COMPILER: ${MPI_CXX_COMPILER}") message(STATUS "Set MPI_C_LIBRARIES: ${MPI_C_LIBRARIES}") diff --git a/src/Command.cpp b/src/Command.cpp index 858e1227..7774e538 100644 --- a/src/Command.cpp +++ b/src/Command.cpp @@ -3457,28 +3457,13 @@ namespace libforefire int Command::listenHTTP(const std::string &arg, size_t &/*numTabs*/) { - // ID 1 is for the Fortran MPI rank 1 - int MPIMODE = 1; - int STANDALONEMODE = 0; - int listenMode = STANDALONEMODE; size_t defaultport = 8000; size_t port = defaultport; std::string defaultHostname = "localhost"; - if (currentSession.fd != 0) + if (currentSession.fd != 0 && getDomain()->getDomainID() != 0) { - if (getDomain()->getDomainID() != 0) - { - return normal; - } - else - { - if (currentSession.fdp != 0) - { - listenMode = MPIMODE; - - } - } + return normal; } // Local only by default; listenHTTP[0.0.0.0:8000] to open it to the network.