Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Linking libraries after the libraries added by the mpicxx wrapper linker

Seunghwa_Kang
Beginner
1,481 Views

Hello,

If I use mpicxx to link, it adds a set of libraries at the end. What flags should I provide to mpicxx or what environment variables should I set to link some libraries after the libraries provided by the wrapper?

To be specific, I want to move -ltbb_debug -ltbbmalloc_proxy_debug -ltbbmalloc_debug in the following command (I got this by using mpicxx -v) after -lmpigc4 -lmpigf -lmpi_mt -lmpigi -ldl -lrt -lpthread -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc as I manually did in the last line. Can I do this by providing some flags to mpicxx or setting environment variables?

/pic/apps/gcc/4.8.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.2/collect2 --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o biocellion.DP.SPAGENT.MPI.DEBUG /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o /pic/apps/gcc/4.8.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2/crtbegin.o -L../sim -L../comm -L../chombo/amrelliptic -L../chombo/amrtimedependent -L../chombo/amrtools -L../chombo/boxtools -L../chombo/basetools -L../util -L../../libmodel/interface -L../../librt -L/people/kang697/install/intel_ode/lib/intel64 -L/people/kang697/install/ga-5.2-ofa/lib -L/share/apps/intel/xe/composerxe/lib/intel64 -L/people/kang697/lib64 -L/people/kang697/install/tbb42u3/lib/intel64/gcc4.1 -L/share/apps/intel/impi/4.1.1.036/intel64/lib -L/pic/apps/gcc/4.8.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2 -L/pic/apps/gcc/4.8.2/bin/../lib/gcc -L/pic/apps/gcc/4.8.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/pic/apps/gcc/4.8.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../.. -rpath ../../libmodel/interface -rpath ../../librt biocellion.o -lsim -lcomm -lchomboamrelliptic -lchomboamrtimedependent -lchomboamrtools -lchomboboxtools -lchombobasetools -lutil -lmodel -lrt.DP.SPAGENT.MPI.DEBUG -liode_intel64 --start-group /share/apps/intel/xe/composerxe/mkl/lib/intel64/libmkl_intel_lp64.a /share/apps/intel/xe/composerxe/mkl/lib/intel64/libmkl_sequential.a /share/apps/intel/xe/composerxe/mkl/lib/intel64/libmkl_core.a --end-group -lga -larmci -llapack /share/apps/intel/xe/composerxe/lib/intel64/libifport.a /share/apps/intel/xe/composerxe/lib/intel64/libifcoremt.a /share/apps/intel/xe/composerxe/lib/intel64/libimf.a -lxml2 -lpthread /share/apps/intel/xe/composerxe/lib/intel64/libirc.a /share/apps/intel/xe/composerxe/lib/intel64/libsvml.a -lintlc -libverbs -lnuma -ltbb_debug -ltbbmalloc_proxy_debug -ltbbmalloc_debug --enable-new-dtags -rpath /share/apps/intel/impi/4.1.1.036/intel64/lib -rpath /opt/intel/mpi-rt/4.1 -lmpigc4 -lmpigf -lmpi_mt -lmpigi -ldl -lrt -lpthread -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /pic/apps/gcc/4.8.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2/crtend.o /usr/lib/../lib64/crtn.o

=>

/pic/apps/gcc/4.8.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.2/collect2 --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o biocellion.DP.SPAGENT.MPI.DEBUG /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o /pic/apps/gcc/4.8.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2/crtbegin.o -L../sim -L../comm -L../chombo/amrelliptic -L../chombo/amrtimedependent -L../chombo/amrtools -L../chombo/boxtools -L../chombo/basetools -L../util -L../../libmodel/interface -L../../librt -L/people/kang697/install/intel_ode/lib/intel64 -L/people/kang697/install/ga-5.2-ofa/lib -L/share/apps/intel/xe/composerxe/lib/intel64 -L/people/kang697/lib64 -L/people/kang697/install/tbb42u3/lib/intel64/gcc4.1 -L/share/apps/intel/impi/4.1.1.036/intel64/lib -L/pic/apps/gcc/4.8.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2 -L/pic/apps/gcc/4.8.2/bin/../lib/gcc -L/pic/apps/gcc/4.8.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/pic/apps/gcc/4.8.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../.. -rpath ../../libmodel/interface -rpath ../../librt biocellion.o -lsim -lcomm -lchomboamrelliptic -lchomboamrtimedependent -lchomboamrtools -lchomboboxtools -lchombobasetools -lutil -lmodel -lrt.DP.SPAGENT.MPI.DEBUG -liode_intel64 --start-group /share/apps/intel/xe/composerxe/mkl/lib/intel64/libmkl_intel_lp64.a /share/apps/intel/xe/composerxe/mkl/lib/intel64/libmkl_sequential.a /share/apps/intel/xe/composerxe/mkl/lib/intel64/libmkl_core.a --end-group -lga -larmci -llapack /share/apps/intel/xe/composerxe/lib/intel64/libifport.a /share/apps/intel/xe/composerxe/lib/intel64/libifcoremt.a /share/apps/intel/xe/composerxe/lib/intel64/libimf.a -lxml2 -lpthread /share/apps/intel/xe/composerxe/lib/intel64/libirc.a /share/apps/intel/xe/composerxe/lib/intel64/libsvml.a -lintlc -libverbs -lnuma --enable-new-dtags -rpath /share/apps/intel/impi/4.1.1.036/intel64/lib -rpath /opt/intel/mpi-rt/4.1 -lmpigc4 -lmpigf -lmpi_mt -lmpigi -ldl -lrt -lpthread -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc -ltbb_debug  -ltbbmalloc_proxy_debug -ltbbmalloc_debug /pic/apps/gcc/4.8.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2/crtend.o /usr/lib/../lib64/crtn.o

0 Kudos
1 Solution
James_T_Intel
Moderator
1,481 Views

Hi Seunghwa,

No, we do not provide a method for putting arguments at the end of the compile or link commands.  In order to do this at present, you'll need to use -show to get the compilation/link command and then modify it yourself.  I have put in a feature request to add an option for this.

Sincerely,
James Tullos
Technical Consulting Engineer
Intel® Cluster Tools

View solution in original post

0 Kudos
1 Reply
James_T_Intel
Moderator
1,482 Views

Hi Seunghwa,

No, we do not provide a method for putting arguments at the end of the compile or link commands.  In order to do this at present, you'll need to use -show to get the compilation/link command and then modify it yourself.  I have put in a feature request to add an option for this.

Sincerely,
James Tullos
Technical Consulting Engineer
Intel® Cluster Tools

0 Kudos
Reply