File: git-mpi-init

package info (click to toggle)
eztrace 2.0%2Brepack-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,132 kB
  • sloc: ansic: 23,501; perl: 910; sh: 857; cpp: 771; makefile: 696; fortran: 327; f90: 320; python: 57
file content (21 lines) | stat: -rw-r--r-- 712 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
commit ad0f3451b86141ca158f77431af6e36b9404bdba
Author: François Trahay <francois.trahay@telecom-sudparis.eu>
Date:   Tue Aug 23 15:47:08 2022 +0200

    don't rely on the name of the mpi module to check if MPI is enabled

diff --git a/src/eztrace-lib/eztrace_core.c b/src/eztrace-lib/eztrace_core.c
index 1bd9160c..edd9d969 100644
--- a/src/eztrace-lib/eztrace_core.c
+++ b/src/eztrace-lib/eztrace_core.c
@@ -378,9 +378,7 @@ void ezt_init_complete() {
 }
 
 int ezt_is_mpi_mode() {
-  char ezt_mpi_symbol_table[1024];
-  PPTRACE_SYMBOL_ALIAS_STRING(ezt_mpi_symbol_table, "mpi", 1024);
-  if(dlsym(RTLD_DEFAULT, ezt_mpi_symbol_table)) {
+  if(dlsym(RTLD_DEFAULT, "MPI_Init")) {
     return 1;
   }
   return 0;