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

boostlib defines not being respected. #149

Closed
bathmatt opened this issue Feb 19, 2016 · 11 comments
Closed

boostlib defines not being respected. #149

bathmatt opened this issue Feb 19, 2016 · 11 comments
Assignees
Labels
Framework tasks Framework tasks (used internally by Framework team)

Comments

@bathmatt
Copy link
Contributor

On hansen I'm working on building trilinos and I have set every thing I can think of to set the boost library paths.
dir-debug (gcc) 20 $ grep BoostL configure-drekar.sh
-D TPL_ENABLE_BoostLib=ON
-D TPL_BoostLib_INCLUDE_DIRS:FILEPATH="${BOOST_BASE_DIR}/include"
-D TPL_BoostLib_LIBRARY_DIRS:FILEPATH="${BOOST_BASE_DIR}/lib"
-D TPL_BoostLib_LIBRARIES="${BOOST_BASE_DIR}/lib/libboost_program_options.so;${BOOST_BASE_DIR}/lib/libboost_system.so" \

However, cmake ignores this and just uses -lboost_system as shown below. This happens on lots of different systems, hansen, chama are just two I can think of. I have a long email thread with Ross but that hit a dead end.
config.out.txt

/home/projects/x86-64-haswell/openmpi/1.10.0/gnu/4.9.3/bin/mpicxx -std=c++11 -fopenmp -g -O0 CMakeFiles/STKClassic_stk_algsup_unit_tests.dir/UnitTestAlgorithmRunner.cpp.o CMakeFiles/STKClassic_stk_algsup_unit_tests.dir/UnitTestCudaMgr.cpp.o CMakeFiles/STKClassic_stk_algsup_unit_tests.dir/UnitTestMain.cpp.o CMakeFiles/STKClassic_stk_algsup_unit_tests.dir/UnitTest_helpers.cpp.o -o STKClassic_stk_algsup_unit_tests.exe -rdynamic ../stk_algsup/libstkclassic_algsup.a ../../stk_mesh/stk_mesh/fixtures/libstkclassic_mesh_fixtures.a ../../stk_mesh/stk_mesh/fem/libstkclassic_mesh_fem.a ../../stk_mesh/stk_mesh/base/libstkclassic_mesh_base.a ../../stk_util/stk_util/unit_test_support/libstkclassic_util_unit_test_support.a ../../stk_util/stk_util/parallel/libstkclassic_util_parallel.a ../../stk_util/stk_util/diag/libstkclassic_util_diag.a ../../stk_util/stk_util/environment/libstkclassic_util_env.a ../../stk_util/stk_util/util/libstkclassic_util_util.a ../../../../seacas/libraries/exodus/cbind/libexodus.a -lboost_program_options -lboost_system ../../../../fei/support-Trilinos/libfei_trilinos.a ../../../../fei/base/libfei_base.a ../../../../belos/tpetra/src/libbelostpetra.a ../../../../belos/epetra/src/libbelosepetra.a ../../../../belos/src/libbelos.a ../../../../ml/src/libml.a ../../../../galeri/src-epetra/libgaleri-epetra.a ../../../../tpetra/core/ext/libtpetraext.a ../../../../tpetra/core/inout/libtpetrainout.a ../../../../tpetra/core/src/libtpetra.a ../../../../tpetra/kernels/src/libtpetrakernels.a ../../../../kokkos/algorithms/src/libkokkosalgorithms.a ../../../../kokkos/containers/src/libkokkoscontainers.a ../../../../tpetra/classic/LinAlg/libtpetraclassiclinalg.a ../../../../tpetra/classic/NodeAPI/libtpetraclassicnodeapi.a ../../../../tpetra/classic/src/libtpetraclassic.a ../../../../ifpack/src/libifpack.a ../../../../amesos/src/libamesos.a ../../../../epetraext/src/libepetraext.a ../../../../seacas/libraries/ioss/src/init/libIonit.a ../../../../seacas/libraries/ioss/src/transform/libIotr.a ../../../../seacas/libraries/ioss/src/heartbeat/libIohb.a ../../../../seacas/libraries/ioss/src/generated/libIogn.a ../../../../seacas/libraries/ioss/src/pamgen/libIopg.a ../../../../seacas/libraries/ioss/src/exo_fac/libIoexo_fac.a ../../../../seacas/libraries/ioss/src/exo_par/libIopx.a ../../../../seacas/libraries/ioss/src/exo_fpp/libIofx.a ../../../../seacas/libraries/ioss/src/exodus/libIoex.a ../../../../seacas/libraries/ioss/src/libIoss.a ../../../../seacas/libraries/exodus/cbind/libexodus.a -Wl,-Bstatic -lnetcdf -Wl,-Bdynamic -L/home/projects/x86-64-haswell-nvidia/netcdf-exo/4.3.3.1/openmpi/1.10.0/gcc/4.8.4/cuda/7.5.7/lib -lnetcdf -L/home/projects/x86-64-haswell-nvidia/hdf5/1.8.15/openmpi/1.10.0/gcc/4.8.4/cuda/7.5.7/lib -lhdf5_hl -lhdf5 -lz -ldl ../../../../pamgen/src/libpamgen_extras.a ../../../../pamgen/src/libpamgen.a ../../../../aztecoo/src/libaztecoo.a ../../../../triutils/src/libtriutils.a ../../../../epetra/src/libepetra.a ../../../../shards/src/libshards.a ../../../../zoltan/src/libzoltan.a -lm ../../../../sacado/src/libsacado.a ../../../../teuchos/kokkoscomm/src/libteuchoskokkoscomm.a ../../../../teuchos/kokkoscompat/src/libteuchoskokkoscompat.a ../../../../teuchos/remainder/src/libteuchosremainder.a ../../../../teuchos/numerics/src/libteuchosnumerics.a -L/home/projects/x86-64-haswell/lapack/3.5.0/gcc/4.8.4 -llapack -L/home/projects/x86-64-haswell/blas/20150602/gcc/4.8.4 -lblas ../../../../teuchos/comm/src/libteuchoscomm.a ../../../../teuchos/parameterlist/src/libteuchosparameterlist.a ../../../../teuchos/core/src/libteuchoscore.a -lboost_program_options -lboost_system ../../../../kokkos/core/src/libkokkoscore.a -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lgfortran -lquadmath

I even went so far as to edit the cmake dependencies file

-bash-4.1$ git diff
diff --git a/packages/stk/stk_classic/cmake/Dependencies.cmake b/packages/stk/stk_classic/cmake/Dependencies.cmake
index 0c16502..b7cd94d 100644
--- a/packages/stk/stk_classic/cmake/Dependencies.cmake
+++ b/packages/stk/stk_classic/cmake/Dependencies.cmake
@@ -4,5 +4,5 @@ SET(TEST_REQUIRED_DEP_PACKAGES SEACASExodus)
SET(TEST_OPTIONAL_DEP_PACKAGES)
SET(LIB_REQUIRED_DEP_TPLS Boost BoostLib)
SET(LIB_OPTIONAL_DEP_TPLS OpenNURBS)
-SET(TEST_REQUIRED_DEP_TPLS)
+SET(TEST_REQUIRED_DEP_TPLS BoostLib)
SET(TEST_OPTIONAL_DEP_TPLS gtest)
-bash-4.1$

dir-debug (gcc) 23 $ cmake --version
cmake version 3.3.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

@bathmatt bathmatt added the Framework tasks Framework tasks (used internally by Framework team) label Feb 19, 2016
@bathmatt
Copy link
Contributor Author

@bartlettroscoe Adding Ross to this,

@bathmatt
Copy link
Contributor Author

Also, cut-n-pasting the link line and adding -L$BOOST_BASE_DIR/lib allows it to link

@bartlettroscoe
Copy link
Member

Matt,

I will be in ABQ next week (my first week back at SNL). If we can find some time, it would be good to meet and take a look at this. Also, it would be good to discuss ATDM. Once I get my access to SNL systems set up, I should be able to try to reproduce this and take a look at what might be happening.

@bathmatt
Copy link
Contributor Author

OK, I would also like to discus fixing the find hdf5 tpl to include the right set of libs so I don't need to add system specific things. hdf5 should include -lhdf5_hl -lhdf5 -ldl on most systems,

@bartlettroscoe
Copy link
Member

OK, I would also like to discus fixing the find hdf5 tpl to include the right set of libs so I don't need to add system specific things. hdf5 should include -lhdf5_hl -lhdf5 -ldl on most systems,

Can you write a separate Issue for that? @nschloe should really be involved in that conversation as well since he overhauled the FindTPLHDF5.cmake module recently (see TriBITSPub/TriBITS#59). You should actually create that Issue in the TriBITS repo since it has the standard impl of FindTPLHDF5.cmake.

@gsjaardema
Copy link
Contributor

I would also like to be involved in the hdf5 discussion. I have cmake code
in seacas that does the correct thing with hdf5 libraries and am working on
adding it to the trilinos seacas....

On Fri, Feb 19, 2016 at 11:50 AM, Roscoe A. Bartlett <
notifications@github.com> wrote:

OK, I would also like to discus fixing the find hdf5 tpl to include the
right set of libs so I don't need to add system specific things. hdf5
should include -lhdf5_hl -lhdf5 -ldl on most systems,

Can you write a separate Issue for that? @nschloe
https://github.com/nschloe should really be involved in that
conversation as well since he overhauled the FindTPLHDF5.cmake module
recently (see TriBITSPub/TriBITS#59
TriBITSPub/TriBITS#59). You should actually
create that Issue in the TriBITS repo since it has the standard impl of
FindTPLHDF5.cmake.


Reply to this email directly or view it on GitHub
#149 (comment).

@gdsjaar
Copy link
Contributor

gdsjaar commented Feb 20, 2016

This is basically what I was asking for in #99. There may be other live using hdf5 also, but netcdf is a big user needed by exodus.

I do have cake code to automatically add the correct hdf5 libraries including DL when needed.

.. Greg

Sent from my iPhone

On Feb 19, 2016, at 11:51 AM, Roscoe A. Bartlett <notifications@github.commailto:notifications@github.com> wrote:

OK, I would also like to discus fixing the find hdf5 tpl to include the right set of libs so I don't need to add system specific things. hdf5 should include -lhdf5_hl -lhdf5 -ldl on most systems,

Can you write a separate Issue for that? @nschloehttps://github.com/nschloe should really be involved in that conversation as well since he overhauled the FindTPLHDF5.cmake module recently (see TriBITSPub/TriBITS#59TriBITSPub/TriBITS#59). You should actually create that Issue in the TriBITS repo since it has the standard impl of FindTPLHDF5.cmake.

Reply to this email directly or view it on GitHubhttps://github.com//issues/149#issuecomment-186359071.

@bartlettroscoe bartlettroscoe added this to the Clean up configure and build of Trilinos on ATDM machines milestone Feb 26, 2016
@bartlettroscoe bartlettroscoe added the stage: ready The issue is ready to be worked in a Kanban-like process label Feb 26, 2016
@bartlettroscoe
Copy link
Member

@bathmatt, is this currently a show stopper or do you have a hack to address this for now? I think you mentioned that if you hacked the -L onto the link libs for Netcdf, you can get it to work?

Anyway, this is part of the larger milestone/epic that I have created to clean this kind of stuff up.

@bathmatt
Copy link
Contributor Author

I have a working solution right now,

On Fri, Feb 26, 2016 at 8:50 AM, Roscoe A. Bartlett <
notifications@github.com> wrote:

@bathmatt https://github.com/bathmatt, is this currently a show stopper
or do you have a hack to address this for now? I think you mentioned that
if you hacked the -L onto the link libs for Netcdf, you can get it to work?

Anyway, this is part of the larger milestone/epic that I have created to
clean this kind of stuff up.


Reply to this email directly or view it on GitHub
#149 (comment).

@bartlettroscoe
Copy link
Member

I think I know why CMake is not adding the -L link arguments for a bunch of libraries but I need to do some more digging and experimenting to be sure. I am working on this as part of #172.

@jwillenbring jwillenbring removed the ATDM label Mar 9, 2016
@bartlettroscoe bartlettroscoe removed this from the Clean up configure and build of Trilinos on ATDM machines milestone Mar 9, 2016
@bartlettroscoe
Copy link
Member

This has now been resolved with #172. Trilinos now configures automatically on this and other ATTB machines.

I am closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework tasks Framework tasks (used internally by Framework team)
Projects
None yet
Development

No branches or pull requests

6 participants