[Darshan-commits] [Git][darshan/darshan][dev-relax-dyn-cc-wrappers] modify cc wrappers to relax dynamic check

Shane Snyder xgitlab at cels.anl.gov
Sun Apr 26 18:35:05 CDT 2020



Shane Snyder pushed to branch dev-relax-dyn-cc-wrappers at darshan / darshan


Commits:
1f6086e1 by Shane Snyder at 2020-04-26T18:33:11-05:00
modify cc wrappers to relax dynamic check

- - - - -


3 changed files:

- darshan-runtime/darshan-gen-cc.pl.in
- darshan-runtime/darshan-gen-cxx.pl.in
- darshan-runtime/darshan-gen-fortran.pl.in


Changes:

=====================================
darshan-runtime/darshan-gen-cc.pl.in
=====================================
@@ -265,7 +265,8 @@ print OUTPUT<<"EOF";
     rc_mpi=\$?
 
     # did the link options produce a dynamic executable?
-    ldd \$binfile >& /dev/null
+    # we look for dynamic MPI_Init symbol to confirm
+    nm --dynamic \$binfile | grep MPI_Init >& /dev/null
     rc_dyn=\$?
 
     rm \$tmpfile >& /dev/null


=====================================
darshan-runtime/darshan-gen-cxx.pl.in
=====================================
@@ -266,7 +266,8 @@ print OUTPUT<<"EOF";
     rc_mpi=\$?
 
     # did the link options produce a dynamic executable?
-    ldd \$binfile >& /dev/null
+    # we look for dynamic MPI::Init symbol to confirm, but we have to be wary of mangling...
+    nm --demangle --dynamic \$binfile | grep "MPI::Init" >& /dev/null
     rc_dyn=\$?
 
     CXXMPICH=-lmpichcxx


=====================================
darshan-runtime/darshan-gen-fortran.pl.in
=====================================
@@ -274,7 +274,8 @@ print OUTPUT<<"EOF";
     rc_mpi=\$?
 
     # did the link options produce a dynamic executable?
-    ldd \$binfile >& /dev/null
+    # we look for dynamic MPI_Init symbol to confirm, but we have to be wary of mangling...
+    nm --dynamic \$binfile | grep mpi_init >& /dev/null
     rc_dyn=\$?
 
     # find appropriate fortran library name for profiling



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/1f6086e1a1c31de30d697e797fd06bfadccf5271

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/1f6086e1a1c31de30d697e797fd06bfadccf5271
You're receiving this email because of your account on xgitlab.cels.anl.gov.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20200426/e78cb1d8/attachment-0001.html>


More information about the Darshan-commits mailing list