[Darshan-commits] [Git][darshan/darshan][master] 2 commits: modify cc wrappers to relax dynamic check

Shane Snyder xgitlab at cels.anl.gov
Sun Apr 26 18:36:23 CDT 2020



Shane Snyder pushed to branch master at darshan / darshan


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

- - - - -
c54a8a42 by Shane Snyder at 2020-04-26T18:36:21-05:00
Merge branch 'dev-relax-dyn-cc-wrappers' into 'master'

relax dynamic linker check in compiler wrappers

See merge request darshan/darshan!51
- - - - -


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/compare/2e7a7a003f230fa622ad2c61a0d37ab70d1103f8...c54a8a42158d2354e2ab5e527087d81a39bc2597

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/2e7a7a003f230fa622ad2c61a0d37ab70d1103f8...c54a8a42158d2354e2ab5e527087d81a39bc2597
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/75c11249/attachment-0001.html>


More information about the Darshan-commits mailing list