Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar and cosmetics
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 16 Apr 2017 20:33:33 +0000 (22:33 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 16 Apr 2017 20:33:33 +0000 (22:33 +0200)
src/smpi/smpi_global.cpp

index 0a8da9c..f7df869 100644 (file)
@@ -505,20 +505,17 @@ static int smpi_run_entry_point(smpi_entry_point_type entry_point, std::vector<s
 // TODO, remove the number of functions involved here
 static smpi_entry_point_type smpi_resolve_function(void* handle)
 {
 // TODO, remove the number of functions involved here
 static smpi_entry_point_type smpi_resolve_function(void* handle)
 {
-  smpi_fortran_entry_point_type entry_point2 =
-    (smpi_fortran_entry_point_type) dlsym(handle, "user_main_");
-  if (entry_point2 != nullptr) {
-    // fprintf(stderr, "EP user_main_=%p\n", entry_point2);
-    return [entry_point2](int argc, char** argv) {
+  smpi_fortran_entry_point_type entry_point_fortran = (smpi_fortran_entry_point_type)dlsym(handle, "user_main_");
+  if (entry_point_fortran != nullptr) {
+    return [entry_point_fortran](int argc, char** argv) {
       smpi_process_init(&argc, &argv);
       smpi_process_init(&argc, &argv);
-      entry_point2();
+      entry_point_fortran();
       return 0;
     };
   }
 
       return 0;
     };
   }
 
-  smpi_c_entry_point_type entry_point = (smpi_c_entry_point_type) dlsym(handle, "main");
+  smpi_c_entry_point_type entry_point = (smpi_c_entry_point_type)dlsym(handle, "main");
   if (entry_point != nullptr) {
   if (entry_point != nullptr) {
-    // fprintf(stderr, "EP main=%p\n", entry_point);
     return entry_point;
   }
 
     return entry_point;
   }