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

trilinos-release-12-6-b (and likely master) fail with Seacas and static libraries #312

Closed
BarrySmith opened this issue Apr 21, 2016 · 4 comments
Labels
pkg: seacas type: bug The primary issue is a bug in Trilinos code or tests

Comments

@BarrySmith
Copy link
Contributor

Inside the guts of Seacas it puts the hdf5 libraries before the netcdf libraries for some links and thus fails with static libraries. For example

[ 24%] /scratch/balay/petsc/arch-linux-xsdk-dbg/bin/mpicxx -g -std=c++11 -g CMakeFiles/aprepro.dir/aprepro.C.o -o aprepro -L/nfs/software/linux-ubuntu_precise_amd64/apps/packages/gcc-4.9.0/lib/gcc/x86_64-unknown-linux-gnu/4.9.0 -L/nfs/software/linux-ubuntu_precise_amd64/apps/packages/gcc-4.9.0/lib/gcc -L/nfs/software/linux-ubuntu_precise_amd64/apps/packages/gcc-4.9.0/lib64 -L/nfs/software/linux-ubuntu_precise_amd64/apps/packages/gcc-4.9.0/lib -rdynamic ../../libraries/suplib/libsuplib.a ../../libraries/aprepro_lib/libaprepro_lib.a ../../../../liblast_lib.a ../../libraries/supes/libsupes.a ../../libraries/exodus_for/forbind/libexodus_for.a ../../libraries/exodus/cbind/libexodus.a -Wl,-rpath,/scratch/balay/petsc/arch-linux-xsdk-dbg/lib -L/scratch/balay/petsc/arch-linux-xsdk-dbg/lib -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5 -lz -Wl,-rpath,/scratch/balay/petsc/arch-linux-xsdk-dbg/lib -L/scratch/balay/petsc/arch-linux-xsdk-dbg/lib -lnetcdf -lm -L/scratch/balay/petsc/arch-linux-xsdk-dbg/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/nfs2/petsc/soft/linux-Ubuntu_12.04-x86_64/clang-3.8.0/lib -lmpifort -lgfortran -lm -L/nfs/software/linux-ubuntu_precise_amd64/apps/packages/gcc-4.9.0/lib/gcc/x86_64-unknown-linux-gnu/4.9.0 -L/nfs/software/linux-ubuntu_precise_amd64/apps/packages/gcc-4.9.0/lib/gcc -L/nfs/software/linux-ubuntu_precise_amd64/apps/packages/gcc-4.9.0/lib64 -L/nfs/software/linux-ubuntu_precise_amd64/apps/packages/gcc-4.9.0/lib -lgfortran -lm -lquadmath -lm -lmpicxx -lstdc++ -L/scratch/balay/petsc/arch-linux-xsdk-dbg/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -L/nfs2/petsc/soft/linux-Ubuntu_12.04-x86_64/clang-3.8.0/lib -ldl -lmpi -lpthread -lrt -L/usr/lib/x86_64-linux-gnu -lgcc_s -ldl -lmpifort -lgfortran -lquadmath

Entire output from build is attached
trilinos.configure.txt

This needs to be fixed for Amanzi xsdk builds.

@bartlettroscoe @jwillenbring @amklinv @jasonsarich

@bartlettroscoe bartlettroscoe added pkg: seacas type: bug The primary issue is a bug in Trilinos code or tests labels Apr 21, 2016
@bartlettroscoe
Copy link
Member

Yea, others have reported a similar problem (see #156). I am not sure where the bug exists yet but the workaround is pretty simple. You just list the HDF5 includes and libraries with the NetCDF includes and libraries like:

-DNetCDF_INCLUDE_DIRS="${NETCDF_ROOT}/include;${HDF5_ROOT}/include"
-DNetCDF_LIBRARY_DIR="${NETCDF_ROOT}/lib;${HDF5_ROOT}/lib"
-DNetCDF_LIBRARY_NAMES="netcdf;hdf5_hl;hdf5_fortran;hdf5;z"

Of course you can directly set these with TPL_NetCDF_INCLUDE_DIRS and TPL_NetCDF_LIBRARIES as well.

I know this is a hack but it is pretty simple to do for now.

This may considered a defect in TriBiTS (see TriBITSPub/TriBITS#115). Likely something I should look into in more detail soon.

@BarrySmith
Copy link
Contributor Author

Thanks, will test this shortly.

@BarrySmith
Copy link
Contributor Author

The hack suggested by Ross works. I have changed Trilinos.py to over list the hdf5 file to make sure the links work with static libraries.

@gsjaardema
Copy link
Contributor

This will probably now work correctly with the addition of the improved NetCDF package find script.
Closing until we hear differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: seacas type: bug The primary issue is a bug in Trilinos code or tests
Projects
None yet
Development

No branches or pull requests

3 participants