Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excessive library linking when executables are built #48

Open
prckent opened this issue Jan 22, 2020 · 0 comments
Open

Excessive library linking when executables are built #48

prckent opened this issue Jan 22, 2020 · 0 comments

Comments

@prckent
Copy link
Contributor

prckent commented Jan 22, 2020

I noticed that the link line for rmg-cpu repeats the library link information many times over. This slows linking and is presumably unintentional. Presumably the cmake dependencies have the wrong target.

Edit: Scroll to see the full line. Notice e.g. -lfftw3 appears many times, as do all the dependencies.

[100%] Linking CXX executable ../rmg-cpu
cd build/RMG && /usr/bin/cmake3 -E cmake_link_script CMakeFiles/rmg-cpu.dir/link.txt --verbose=1
/opt/intel2020/compilers_and_libraries_2020.0.166/linux/bin/intel64/icpc   -std=c++14 -qopenmp  -O3 -DNDEBUG  -rdynamic CMakeFiles/rmg-cpu.dir/Common/Main.cpp.o  -o ../rmg-cpu -Wl,-rpath,/opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib:/opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/release: /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/libmpicxx.so /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/libmpifort.so /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/release/libmpi.so -ldl -lrt -lpthread /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/libmpifort.so /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/release/libmpi.so -ldl -lrt -lpthread ../InternalPseudo/libInternalPseudo.a -lz -lrt -lm -lrt -lboost_thread -lboost_system -lboost_iostreams -lboost_program_options -lboost_filesystem -lboost_chrono -lboost_date_time -lboost_atomic -lboost_regex /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_core.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_gnu_thread.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_gnu_thread.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_core.a ../scalapack/lib/libscalapack.a -Wl,-Bstatic -lfftw3 -lfftw3f -Wl,-Bdynamic -lhdf5 -lsz -lz -ldl -lm ../RmgLib/libRmgLib.a ../Misc/libMisc.a ../XC/libXC.a ../dftd3/libdftd3.a ../MG/libMG.a ../Force/libForce.a ../Input/libInput.a ../Finite_diff/libFinite_diff.a ../US_PP/libUS_PP.a ../zfp/libzfp.a ../spglib/libsymspg_static.a Common/libRMG_Common.a Spin/libRMG_Spin.a Subdiag/libRMG_Subdiag.a ../zfp/libzfp.a ../spglib/libsymspg_static.a ../TDDFT/RMG_TDDFT/libRmgTddft.a ../TDDFT/IO_TDDFT/libIO_Tddft.a ../TDDFT/ELDYN/libeldyn_mod.a ../TDDFT/ELDYN/libEldyn.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/libmpicxx.so /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/libmpifort.so /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/release/libmpi.so -ldl -lrt -lpthread /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/libmpifort.so /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/release/libmpi.so -ldl -lrt -lpthread ../InternalPseudo/libInternalPseudo.a -lz -lrt -lm -lrt -lboost_thread -lboost_system -lboost_iostreams -lboost_program_options -lboost_filesystem -lboost_chrono -lboost_date_time -lboost_atomic -lboost_regex /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_core.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_gnu_thread.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_gnu_thread.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_core.a ../scalapack/lib/libscalapack.a -Wl,-Bstatic -lfftw3 -lfftw3f -Wl,-Bdynamic -lhdf5 -lsz -lz -ldl -lm ../RmgLib/libRmgLib.a ../Misc/libMisc.a ../XC/libXC.a ../dftd3/libdftd3.a ../MG/libMG.a ../Force/libForce.a ../Input/libInput.a ../Finite_diff/libFinite_diff.a ../US_PP/libUS_PP.a ../zfp/libzfp.a ../spglib/libsymspg_static.a Common/libRMG_Common.a Spin/libRMG_Spin.a Subdiag/libRMG_Subdiag.a ../zfp/libzfp.a ../spglib/libsymspg_static.a ../TDDFT/RMG_TDDFT/libRmgTddft.a ../TDDFT/IO_TDDFT/libIO_Tddft.a ../TDDFT/ELDYN/libeldyn_mod.a ../TDDFT/ELDYN/libEldyn.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/libmpicxx.so /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/libmpifort.so /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/release/libmpi.so -ldl -lrt -lpthread /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/libmpifort.so /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/release/libmpi.so -ldl -lrt -lpthread ../InternalPseudo/libInternalPseudo.a -lz -lrt -lm -lrt -lboost_thread -lboost_system -lboost_iostreams -lboost_program_options -lboost_filesystem -lboost_chrono -lboost_date_time -lboost_atomic -lboost_regex /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_core.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_gnu_thread.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_gnu_thread.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_core.a ../scalapack/lib/libscalapack.a -Wl,-Bstatic -lfftw3 -lfftw3f -Wl,-Bdynamic -lhdf5 -lsz -lz -ldl -lm ../RmgLib/libRmgLib.a ../Misc/libMisc.a ../XC/libXC.a ../dftd3/libdftd3.a ../MG/libMG.a ../Force/libForce.a ../Input/libInput.a ../Finite_diff/libFinite_diff.a ../US_PP/libUS_PP.a ../zfp/libzfp.a ../spglib/libsymspg_static.a Common/libRMG_Common.a Spin/libRMG_Spin.a Subdiag/libRMG_Subdiag.a ../zfp/libzfp.a ../spglib/libsymspg_static.a ../TDDFT/RMG_TDDFT/libRmgTddft.a ../TDDFT/IO_TDDFT/libIO_Tddft.a ../TDDFT/ELDYN/libeldyn_mod.a ../TDDFT/ELDYN/libEldyn.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/libmpicxx.so /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/libmpifort.so /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/release/libmpi.so -ldl -lrt -lpthread /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/libmpifort.so /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mpi/intel64/lib/release/libmpi.so -ldl -lrt -lpthread ../InternalPseudo/libInternalPseudo.a -lz -lrt -lm -lrt -lboost_thread -lboost_system -lboost_iostreams -lboost_program_options -lboost_filesystem -lboost_chrono -lboost_date_time -lboost_atomic -lboost_regex /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_core.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_gnu_thread.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_gnu_thread.a /opt/intel2020/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_core.a ../scalapack/lib/libscalapack.a -Wl,-Bstatic -lfftw3 -lfftw3f -Wl,-Bdynamic -lhdf5 -lsz -lz -ldl -lm ../RmgLib/libRmgLib.a ../Misc/libMisc.a ../XC/libXC.a ../dftd3/libdftd3.a ../MG/libMG.a ../Force/libForce.a ../Input/libInput.a ../Finite_diff/libFinite_diff.a ../US_PP/libUS_PP.a ../zfp/libzfp.a ../spglib/libsymspg_static.a Common/libRMG_Common.a Spin/libRMG_Spin.a Subdiag/libRMG_Subdiag.a ../zfp/libzfp.a ../spglib/libsymspg_static.a ../TDDFT/RMG_TDDFT/libRmgTddft.a ../TDDFT/IO_TDDFT/libIO_Tddft.a ../TDDFT/ELDYN/libeldyn_mod.a ../TDDFT/ELDYN/libEldyn.a -lifport -lifcoremt -lpthread
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant