Darshan undefined compilation error
Hi, I am trying to statically instrument my application with darshan. I am using mpich 3.2 and darshan 3.1.4. I have also tried 3.1.3 and 3.0.0 all which give the same errors as this post: https://lists.mcs.anl.gov/mailman/htdig/darshan-users/2017-July/000448.html Maybe I am not compiling mpich with the correct flags? ( I am not changing the defaults). I get these errors for the example IO_simple.c as well as a very simple piece of MPI code. Also nm libdarshan.a does show the functions that are coming up as undefined, same as the post I linked to. Any help would be greatly appreciated.
Can you provide the output of the linking stage with the generated mpicc. So if you named your mpicc, mpicc.darshan: mpicc.darshan -show -o binary *.o The previous post you mentioned has some type of error in the generated script where one of the compiler arguments was not being added properly. kevin ________________________________________ From: Darshan-users <[email protected]> on behalf of Adnan Haider <[email protected]> Sent: Wednesday, October 18, 2017 4:28:23 PM To: [email protected] Subject: [Darshan-users] Darshan undefined compilation error Hi, I am trying to statically instrument my application with darshan. I am using mpich 3.2 and darshan 3.1.4. I have also tried 3.1.3 and 3.0.0 all which give the same errors as this post: https://lists.mcs.anl.gov/mailman/htdig/darshan-users/2017-July/000448.html Maybe I am not compiling mpich with the correct flags? ( I am not changing the defaults). I get these errors for the example IO_simple.c as well as a very simple piece of MPI code. Also nm libdarshan.a does show the functions that are coming up as undefined, same as the post I linked to. Any help would be greatly appreciated.
I have been trying the mpicxx -profile=/path/to/mpicxx-cxx.conf option since I have gotten further with this method, but here is the output for both: when using mpicxx.darshan method: g++ -o binary *.o darshan/simple.cc -I/home/adhaider/apps/mpich_install/include -L/home/adhaider/apps/mpich_install/lib -lmpicxx -Wl,-rpath -Wl,/home/adhaider/apps/mpich_install/lib -Wl, --enable-new-dtags -lmpi * notice the above doesn't even have the darshan libs. Now when using mpicxx -profile=/path/to/conf g++ -o binary *.o darshan/simple.cc -I/home/adhaider/apps/mpich_install/include -L/home/adhaider/apps/mpich_install/lib -lmpicxx -lmpicxx -L/home/adhaider/apps/darshan_install/lib -ldarshan -lz -Wl,@/home/adhaider/apps/darshan_install/share/ld-opts/darshan-base-ld-opts -Wl,-rpath -Wl,/home/adhaider/apps/mpich_install/lib -Wl,--enable-new-dtags -lmpi -L/home/adhaider/apps/darshan_install/lib -Wl,--start-group -ldarshan -ldarshan-stubs -Wl,--end-group -lz -lrt -lpthread Thanks in advance! Thanks, Adnan Haider B.S Candidate, Computer Science Illinois Institute of Technology www.adnanhaider.com On Wed, Oct 18, 2017 at 6:19 PM, Harms, Kevin <[email protected]> wrote:
Can you provide the output of the linking stage with the generated mpicc. So if you named your mpicc, mpicc.darshan:
mpicc.darshan -show -o binary *.o
The previous post you mentioned has some type of error in the generated script where one of the compiler arguments was not being added properly.
kevin ________________________________________ From: Darshan-users <[email protected]> on behalf of Adnan Haider <[email protected]> Sent: Wednesday, October 18, 2017 4:28:23 PM To: [email protected] Subject: [Darshan-users] Darshan undefined compilation error
Hi,
I am trying to statically instrument my application with darshan. I am using mpich 3.2 and darshan 3.1.4. I have also tried 3.1.3 and 3.0.0 all which give the same errors as this post: https://lists.mcs.anl.gov/ mailman/htdig/darshan-users/2017-July/000448.html
Maybe I am not compiling mpich with the correct flags? ( I am not changing the defaults).
I get these errors for the example IO_simple.c as well as a very simple piece of MPI code.
Also nm libdarshan.a does show the functions that are coming up as undefined, same as the post I linked to.
Any help would be greatly appreciated.
Any update on this? On Oct 18, 2017 6:10 PM, "Adnan Haider" <[email protected]> wrote:
I have been trying the mpicxx -profile=/path/to/mpicxx-cxx.conf option since I have gotten further with this method, but here is the output for both:
when using mpicxx.darshan method:
g++ -o binary *.o darshan/simple.cc -I/home/adhaider/apps/mpich_install/include -L/home/adhaider/apps/mpich_install/lib -lmpicxx -Wl,-rpath -Wl,/home/adhaider/apps/mpich_install/lib -Wl, --enable-new-dtags -lmpi
* notice the above doesn't even have the darshan libs.
Now when using mpicxx -profile=/path/to/conf
g++ -o binary *.o darshan/simple.cc -I/home/adhaider/apps/mpich_install/include -L/home/adhaider/apps/mpich_install/lib -lmpicxx -lmpicxx -L/home/adhaider/apps/darshan_install/lib -ldarshan -lz -Wl,@/home/adhaider/apps/darshan_install/share/ld-opts/darshan-base-ld-opts -Wl,-rpath -Wl,/home/adhaider/apps/mpich_install/lib -Wl,--enable-new-dtags -lmpi -L/home/adhaider/apps/darshan_install/lib -Wl,--start-group -ldarshan -ldarshan-stubs -Wl,--end-group -lz -lrt -lpthread
Thanks in advance!
Thanks, Adnan Haider B.S Candidate, Computer Science Illinois Institute of Technology www.adnanhaider.com
On Wed, Oct 18, 2017 at 6:19 PM, Harms, Kevin <[email protected]> wrote:
Can you provide the output of the linking stage with the generated mpicc. So if you named your mpicc, mpicc.darshan:
mpicc.darshan -show -o binary *.o
The previous post you mentioned has some type of error in the generated script where one of the compiler arguments was not being added properly.
kevin ________________________________________ From: Darshan-users <[email protected]> on behalf of Adnan Haider <[email protected]> Sent: Wednesday, October 18, 2017 4:28:23 PM To: [email protected] Subject: [Darshan-users] Darshan undefined compilation error
Hi,
I am trying to statically instrument my application with darshan. I am using mpich 3.2 and darshan 3.1.4. I have also tried 3.1.3 and 3.0.0 all which give the same errors as this post: https://lists.mcs.anl.gov/mail man/htdig/darshan-users/2017-July/000448.html
Maybe I am not compiling mpich with the correct flags? ( I am not changing the defaults).
I get these errors for the example IO_simple.c as well as a very simple piece of MPI code.
Also nm libdarshan.a does show the functions that are coming up as undefined, same as the post I linked to.
Any help would be greatly appreciated.
Thank you! I appreciate the help. I believe you are right. The static darshan libs were in the same folder as libdarshan.so. Moving libdarshan.so to a different directory allowed for static compilation to complete successfully. Thanks, Adnan Haider B.S Candidate, Computer Science Illinois Institute of Technology www.adnanhaider.com On Mon, Oct 23, 2017 at 6:42 PM, Adnan Haider <[email protected]> wrote:
Any update on this? On Oct 18, 2017 6:10 PM, "Adnan Haider" <[email protected]> wrote:
I have been trying the mpicxx -profile=/path/to/mpicxx-cxx.conf option since I have gotten further with this method, but here is the output for both:
when using mpicxx.darshan method:
g++ -o binary *.o darshan/simple.cc -I/home/adhaider/apps/mpich_install/include -L/home/adhaider/apps/mpich_install/lib -lmpicxx -Wl,-rpath -Wl,/home/adhaider/apps/mpich_install/lib -Wl, --enable-new-dtags -lmpi
* notice the above doesn't even have the darshan libs.
Now when using mpicxx -profile=/path/to/conf
g++ -o binary *.o darshan/simple.cc -I/home/adhaider/apps/mpich_install/include -L/home/adhaider/apps/mpich_install/lib -lmpicxx -lmpicxx -L/home/adhaider/apps/darshan_install/lib -ldarshan -lz -Wl,@/home/adhaider/apps/darshan_install/share/ld-opts/darshan-base-ld-opts -Wl,-rpath -Wl,/home/adhaider/apps/mpich_install/lib -Wl,--enable-new-dtags -lmpi -L/home/adhaider/apps/darshan_install/lib -Wl,--start-group -ldarshan -ldarshan-stubs -Wl,--end-group -lz -lrt -lpthread
Thanks in advance!
Thanks, Adnan Haider B.S Candidate, Computer Science Illinois Institute of Technology www.adnanhaider.com
On Wed, Oct 18, 2017 at 6:19 PM, Harms, Kevin <[email protected]> wrote:
Can you provide the output of the linking stage with the generated mpicc. So if you named your mpicc, mpicc.darshan:
mpicc.darshan -show -o binary *.o
The previous post you mentioned has some type of error in the generated script where one of the compiler arguments was not being added properly.
kevin ________________________________________ From: Darshan-users <[email protected]> on behalf of Adnan Haider <[email protected]> Sent: Wednesday, October 18, 2017 4:28:23 PM To: [email protected] Subject: [Darshan-users] Darshan undefined compilation error
Hi,
I am trying to statically instrument my application with darshan. I am using mpich 3.2 and darshan 3.1.4. I have also tried 3.1.3 and 3.0.0 all which give the same errors as this post: https://lists.mcs.anl.gov/mail man/htdig/darshan-users/2017-July/000448.html
Maybe I am not compiling mpich with the correct flags? ( I am not changing the defaults).
I get these errors for the example IO_simple.c as well as a very simple piece of MPI code.
Also nm libdarshan.a does show the functions that are coming up as undefined, same as the post I linked to.
Any help would be greatly appreciated.
Hi Adnan, Do you get the same types of errors (undefined reference to __wrap_fprintf, etc.) when using the MPI profile configuration method (that is, exporting MPICXX_PROFILE)? Let's troubleshoot that method first since it looks like you are getting further along with it. It at least seems to have the link line right, at first glance. FWIW, we typically "encourage" users to configure MPICH libraries to be built corresponding to the link method they want to use. So, in your case (static linking), it might simplify things to configure MPICH to only build its static libraries (using '--enable-static --disable-shared' on the configure line). That's not to say we can't get the static linking working using default configure options, just appears to be more difficult to get right. I can try playing around with my local MPICH build and darshan builds to see if I can get it working, and will let you know how if I do. Thanks, --Shane On 10/18/2017 06:10 PM, Adnan Haider wrote:
I have been trying the mpicxx -profile=/path/to/mpicxx-cxx.conf option since I have gotten further with this method, but here is the output for both:
when using mpicxx.darshan method:
g++ -o binary *.o darshan/simple.cc -I/home/adhaider/apps/mpich_install/include -L/home/adhaider/apps/mpich_install/lib -lmpicxx -Wl,-rpath -Wl,/home/adhaider/apps/mpich_install/lib -Wl, --enable-new-dtags -lmpi
* notice the above doesn't even have the darshan libs.
Now when using mpicxx -profile=/path/to/conf
g++ -o binary *.o darshan/simple.cc -I/home/adhaider/apps/mpich_install/include -L/home/adhaider/apps/mpich_install/lib -lmpicxx -lmpicxx -L/home/adhaider/apps/darshan_install/lib -ldarshan -lz -Wl,@/home/adhaider/apps/darshan_install/share/ld-opts/darshan-base-ld-opts -Wl,-rpath -Wl,/home/adhaider/apps/mpich_install/lib -Wl,--enable-new-dtags -lmpi -L/home/adhaider/apps/darshan_install/lib -Wl,--start-group -ldarshan -ldarshan-stubs -Wl,--end-group -lz -lrt -lpthread
Thanks in advance!
Thanks, Adnan Haider B.S Candidate, Computer Science Illinois Institute of Technology www.adnanhaider.com <http://www.adnanhaider.com>
On Wed, Oct 18, 2017 at 6:19 PM, Harms, Kevin <[email protected] <mailto:[email protected]>> wrote:
Can you provide the output of the linking stage with the generated mpicc. So if you named your mpicc, mpicc.darshan:
mpicc.darshan -show -o binary *.o
The previous post you mentioned has some type of error in the generated script where one of the compiler arguments was not being added properly.
kevin ________________________________________ From: Darshan-users <[email protected] <mailto:[email protected]>> on behalf of Adnan Haider <[email protected] <mailto:[email protected]>> Sent: Wednesday, October 18, 2017 4:28:23 PM To: [email protected] <mailto:[email protected]> Subject: [Darshan-users] Darshan undefined compilation error
Hi,
I am trying to statically instrument my application with darshan. I am using mpich 3.2 and darshan 3.1.4. I have also tried 3.1.3 and 3.0.0 all which give the same errors as this post: https://lists.mcs.anl.gov/mailman/htdig/darshan-users/2017-July/000448.html <https://lists.mcs.anl.gov/mailman/htdig/darshan-users/2017-July/000448.html>
Maybe I am not compiling mpich with the correct flags? ( I am not changing the defaults).
I get these errors for the example IO_simple.c as well as a very simple piece of MPI code.
Also nm libdarshan.a does show the functions that are coming up as undefined, same as the post I linked to.
Any help would be greatly appreciated.
_______________________________________________ Darshan-users mailing list [email protected] https://lists.mcs.anl.gov/mailman/listinfo/darshan-users
I'm confirming the same type of behavior you are seeing when using both the Darshan generated compiler wrapper as well as the MPICH profiling hooks. In my MPICH build, I did not set any specific flags to enable or disable shared/static libs, so MPICH will prefer dynamic libs by default (at least on my laptop). In the case of using Darshan generated compiler wrappers, they actually back out and do not insert any Darshan link flags when using dynamic linking, so this is expected behavior. In the case of the profiling configuration method, the linking is again thrown off by the use of dynamic MPICH libs which causes the undefined reference errors you are seeing. As for possible workarounds, you have a couple of options: 1.) Just keep using your current MPICH build, but use the LD_PRELOAD method for instrumentation that works with dynamic executables. You just need to export LD_PRELOAD to point at your libdarshan.so before running your application (which you just compile using MPICH's stock mpicc). 2.) As I mentioned in the previous email, you could rebuild MPICH to disable shared libs and only build static libs. After that, either of the above static linking methods should work. Thanks, --Shane On 10/24/2017 10:06 AM, Shane Snyder wrote:
Hi Adnan,
Do you get the same types of errors (undefined reference to __wrap_fprintf, etc.) when using the MPI profile configuration method (that is, exporting MPICXX_PROFILE)?
Let's troubleshoot that method first since it looks like you are getting further along with it. It at least seems to have the link line right, at first glance.
FWIW, we typically "encourage" users to configure MPICH libraries to be built corresponding to the link method they want to use. So, in your case (static linking), it might simplify things to configure MPICH to only build its static libraries (using '--enable-static --disable-shared' on the configure line). That's not to say we can't get the static linking working using default configure options, just appears to be more difficult to get right. I can try playing around with my local MPICH build and darshan builds to see if I can get it working, and will let you know how if I do.
Thanks, --Shane
On 10/18/2017 06:10 PM, Adnan Haider wrote:
I have been trying the mpicxx -profile=/path/to/mpicxx-cxx.conf option since I have gotten further with this method, but here is the output for both:
when using mpicxx.darshan method:
g++ -o binary *.o darshan/simple.cc -I/home/adhaider/apps/mpich_install/include -L/home/adhaider/apps/mpich_install/lib -lmpicxx -Wl,-rpath -Wl,/home/adhaider/apps/mpich_install/lib -Wl, --enable-new-dtags -lmpi
* notice the above doesn't even have the darshan libs.
Now when using mpicxx -profile=/path/to/conf
g++ -o binary *.o darshan/simple.cc -I/home/adhaider/apps/mpich_install/include -L/home/adhaider/apps/mpich_install/lib -lmpicxx -lmpicxx -L/home/adhaider/apps/darshan_install/lib -ldarshan -lz -Wl,@/home/adhaider/apps/darshan_install/share/ld-opts/darshan-base-ld-opts -Wl,-rpath -Wl,/home/adhaider/apps/mpich_install/lib -Wl,--enable-new-dtags -lmpi -L/home/adhaider/apps/darshan_install/lib -Wl,--start-group -ldarshan -ldarshan-stubs -Wl,--end-group -lz -lrt -lpthread
Thanks in advance!
Thanks, Adnan Haider B.S Candidate, Computer Science Illinois Institute of Technology www.adnanhaider.com <http://www.adnanhaider.com>
On Wed, Oct 18, 2017 at 6:19 PM, Harms, Kevin <[email protected] <mailto:[email protected]>> wrote:
Can you provide the output of the linking stage with the generated mpicc. So if you named your mpicc, mpicc.darshan:
mpicc.darshan -show -o binary *.o
The previous post you mentioned has some type of error in the generated script where one of the compiler arguments was not being added properly.
kevin ________________________________________ From: Darshan-users <[email protected] <mailto:[email protected]>> on behalf of Adnan Haider <[email protected] <mailto:[email protected]>> Sent: Wednesday, October 18, 2017 4:28:23 PM To: [email protected] <mailto:[email protected]> Subject: [Darshan-users] Darshan undefined compilation error
Hi,
I am trying to statically instrument my application with darshan. I am using mpich 3.2 and darshan 3.1.4. I have also tried 3.1.3 and 3.0.0 all which give the same errors as this post: https://lists.mcs.anl.gov/mailman/htdig/darshan-users/2017-July/000448.html <https://lists.mcs.anl.gov/mailman/htdig/darshan-users/2017-July/000448.html>
Maybe I am not compiling mpich with the correct flags? ( I am not changing the defaults).
I get these errors for the example IO_simple.c as well as a very simple piece of MPI code.
Also nm libdarshan.a does show the functions that are coming up as undefined, same as the post I linked to.
Any help would be greatly appreciated.
_______________________________________________ Darshan-users mailing list [email protected] https://lists.mcs.anl.gov/mailman/listinfo/darshan-users
_______________________________________________ Darshan-users mailing list [email protected] https://lists.mcs.anl.gov/mailman/listinfo/darshan-users
participants (3)
-
Adnan Haider -
Harms, Kevin -
Shane Snyder