[Trilinos-Users] CMake: manual NetCDF > HDF5 linking

Nico Schlömer nico.schloemer at ua.ac.be
Mon Feb 28 13:28:49 MST 2011


 > Was there an error saying that HDF5 files could not be found?

Nothing like that. It just doesn't appear in the "enabled TPLs" list and 
eventually I get missing symbol errors.

 > You might want to look into the variable Trilinos_EXTRA_LINK_FLAGS to
 > force HDF5 to be linked.

I'll just go ahead and use this; thanks for the hint.

Cheers,
Nico


On 02/28/2011 08:02 PM, Perschbacher, Brent M wrote:
> Nico,
>    Was there an error saying that HDF5 files could not be found? What you did
> should work to turn on HDF5, but if you aren't configuring any packages that
> use HDF5 then I wouldn't be surprised if it could fail silently. Also I'm
> pretty sure that it won't put HDF5 on the link line like you are expecting.
> If a package does not depend on a TPL then that TPL won't be linked for that
> package even if the TPL is enabled. You might want to look into the variable
> Trilinos_EXTRA_LINK_FLAGS to force HDF5 to be linked. There is some
> information about it in the TrilinosCMakeQuickStart.txt file.
>
> Brent
>
>
> On 2/28/11 11:33 AM, "Nico Schlömer"<nico.schloemer at ua.ac.be>  wrote:
>
>> Hi all,
>>
>> I'm trying to link an executable using Trilinos including NetCDF using HDF5.
>> Unfortunately, the NetCDF library does not incorporate libhdf.a
>> directly, so it needs to be linked against manually. (After all, CMake
>> cannot know it is actually needed.)
>> As a workaround, I reckon the configuration phase of Trilinos is a good
>> spot of enabling general HDF5 support. However,
>>
>>      -D TPL_ENABLE_HDF5:BOOL=ON
>>
>> does not seem to turn HDF5 support on:
>>
>> ================ *snip* ================
>> $ cmake -D TPL_ENABLE_HDF5:BOOL=ON [...]
>> [...]
>>
>> Final set of enabled TPLs:  Pthread BinUtils MPI BLAS LAPACK Boost Netcdf 7
>>
>> Final set of non-enabled TPLs:  Peano CUDA Thrust Cusp TBB ARPREC QD
>> Scotch METIS ParMETIS PaToH CppUnit ADOLC ADIC TVMET MF ExodusII Nemesis
>> XDMF y12m SuperLUDist SuperLU Zlib UMFPACK MA28 AMD PETSC HYPRE BLACS
>> SCALAPACK MUMPS Oski TAUCS ForUQTK Dakota HIPS HDF5 MATLAB CASK SPARSKIT
>> QT gtest BoostLib 43
>>
>> [...]
>> ================ *snap* ================
>>
>> Can HDF5 be pulled in only via EpetraExt maybe?
>>
>> I'd be happy to hear about other suggestions on how to deal with the
>> linking issue, too.
>>
>> Cheers,
>> Nico
>>
>> _______________________________________________
>> Trilinos-Users mailing list
>> Trilinos-Users at software.sandia.gov
>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>
>





More information about the Trilinos-Users mailing list