From 8097bc93b7f73b123185c5fe978f4704b35342f2 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Wed, 29 Apr 2026 17:09:01 +0000 Subject: [PATCH 1/2] libFortranmpi is using direcly PMPI --- backends/mpi/mpi_model.rb | 62 +++++++++++------------ integration_tests/parallel_execution.bats | 13 +++++ 2 files changed, 44 insertions(+), 31 deletions(-) diff --git a/backends/mpi/mpi_model.rb b/backends/mpi/mpi_model.rb index 3b181dcbc..c8f3cc56c 100644 --- a/backends/mpi/mpi_model.rb +++ b/backends/mpi/mpi_model.rb @@ -22,37 +22,37 @@ mpi_funcs_e = $mpi_api['functions'] INIT_FUNCTIONS = / - \b(?:MPI_Init| - MPI_Init_thread| - MPI_Initialized| - MPI_Finalized| - MPI_Get_version| - MPI_Get_library_version| - MPI_Info_create| - MPI_Info_create_env| - MPI_Info_set| - MPI_Info_delete| - MPI_Info_get_string| - MPI_Info_get_nkeys| - MPI_Info_get_nthkey| - MPI_Info_dup| - MPI_Info_free| - MPI_Info_f2c| - MPI_Info_c2f| - MPI_Session_create_errhandler| - MPI_Session_call_errhandler| - MPI_Errhandler_free| - MPI_Errhandler_f2c| - MPI_Errhandler_c2f| - MPI_Error_string| - MPI_Error_class| - MPI_Add_error_class| - MPI_Remove_error_class| - MPI_Add_error_code| - MPI_Remove_error_code| - MPI_Add_error_string| - MPI_Remove_error_string| - MPI_T_init_thread)\b + \b(?:P?MPI_Init| + P?MPI_Init_thread| + P?MPI_Initialized| + P?MPI_Finalized| + P?MPI_Get_version| + P?MPI_Get_library_version| + P?MPI_Info_create| + P?MPI_Info_create_env| + P?MPI_Info_set| + P?MPI_Info_delete| + P?MPI_Info_get_string| + P?MPI_Info_get_nkeys| + P?MPI_Info_get_nthkey| + P?MPI_Info_dup| + P?MPI_Info_free| + P?MPI_Info_f2c| + P?MPI_Info_c2f| + P?MPI_Session_create_errhandler| + P?MPI_Session_call_errhandler| + P?MPI_Errhandler_free| + P?MPI_Errhandler_f2c| + P?MPI_Errhandler_c2f| + P?MPI_Error_string| + P?MPI_Error_class| + P?MPI_Add_error_class| + P?MPI_Remove_error_class| + P?MPI_Add_error_code| + P?MPI_Remove_error_code| + P?MPI_Add_error_string| + P?MPI_Remove_error_string| + P?MPI_T_init_thread)\b /ix $mpi_meta_parameters = YAML.load_file(File.join(SRC_DIR, 'mpi_meta_parameters.yaml')) diff --git a/integration_tests/parallel_execution.bats b/integration_tests/parallel_execution.bats index 54a95a602..ee91f97a5 100644 --- a/integration_tests/parallel_execution.bats +++ b/integration_tests/parallel_execution.bats @@ -54,3 +54,16 @@ launch_mpi() { run -0 launch_mpi -n 2 iprof --backend cl --traced-ranks 1 -- clinfo [[ "$output" =~ "1 Hostnames | 1 Processes | 1 Threads |" ]] } + +# Regression: launch_usr_bin used to set sync on the read end of the popen +# pipe (a no-op) instead of $stdout, so under mpiexec the per-rank app output +# was buffered inside iprof and printed *after* the aggregated summary. +@test "stdout_ordering_under_mpiexec" { + mpicc ./integration_tests/mpi_helloworld.c -o mpi_helloworld + run -0 launch_mpi -n 12 iprof --backend cl -- ./mpi_helloworld + hello_line=$(echo "$output" | grep -n "Hello world from processor" | tail -1 | cut -d: -f1) + total_line=$(echo "$output" | grep -n "^[[:space:]]*Total" | head -1 | cut -d: -f1) + [ -n "$hello_line" ] + [ -n "$total_line" ] + [ "$hello_line" -lt "$total_line" ] +} From ece071f5cfd2f892d54b21bf6a19f85a4d35a7a7 Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Wed, 29 Apr 2026 12:11:32 -0500 Subject: [PATCH 2/2] Remove obsolete stdout ordering regression test Removed obsolete regression test for stdout ordering under mpiexec. --- integration_tests/parallel_execution.bats | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/integration_tests/parallel_execution.bats b/integration_tests/parallel_execution.bats index ee91f97a5..54a95a602 100644 --- a/integration_tests/parallel_execution.bats +++ b/integration_tests/parallel_execution.bats @@ -54,16 +54,3 @@ launch_mpi() { run -0 launch_mpi -n 2 iprof --backend cl --traced-ranks 1 -- clinfo [[ "$output" =~ "1 Hostnames | 1 Processes | 1 Threads |" ]] } - -# Regression: launch_usr_bin used to set sync on the read end of the popen -# pipe (a no-op) instead of $stdout, so under mpiexec the per-rank app output -# was buffered inside iprof and printed *after* the aggregated summary. -@test "stdout_ordering_under_mpiexec" { - mpicc ./integration_tests/mpi_helloworld.c -o mpi_helloworld - run -0 launch_mpi -n 12 iprof --backend cl -- ./mpi_helloworld - hello_line=$(echo "$output" | grep -n "Hello world from processor" | tail -1 | cut -d: -f1) - total_line=$(echo "$output" | grep -n "^[[:space:]]*Total" | head -1 | cut -d: -f1) - [ -n "$hello_line" ] - [ -n "$total_line" ] - [ "$hello_line" -lt "$total_line" ] -}