[Trilinos-Users] Build questions....

Mark Cartwright mark_cartwright at mac.com
Thu Aug 11 18:44:57 MDT 2011


Brian,

  Thanks for the help -- I am now past my PIC issues.  By setting CXXFLAGS,FFLAGS,a and CFLAGS to "-fPIC", relocation gripes have evaporated 

   I've tried to follow the Trikota README, building teuchos first, and installing, then building Dakota with an install -- no errors -- but the libs and includes did not show up in 
CMAKE_INSTALL_PREFIX.   Lo and behold I get a link failure on libtrikota.so -- as it appears no config propagates from above.

  My tact  now is to treat Dakota as "alien" -- config Dakota as per the readme and set TriKota_ENABLE_DakotaReconfigure to OFF.

  This is a huge body of work, so I am very much so impressed that I have made it this far.  Starting with local builds of Dakota and moving up the tree

  As I mentioned prior my goal is to to get Titan up and running, but with all the complete tool chain  in place.

  Thank you again,

Mark



On Aug 9, 2011, at 7:41 AM, Adams, Brian M wrote:

> That should work for any static archives that might get built in DAKOTA’s tree.  I can’t speak to the details right now, but I believe for some TPLs of DAKOTA it’s necessary to set both:
>  
> set(BUILD_STATIC_LIBS OFF CACHE BOOL "Set to ON to build static libraries" FORCE)
> set(BUILD_SHARED_LIBS ON CACHE BOOL "Set to ON to build DSO libraries" FORCE)
>  
> Also the library list you mention applies to the Trilinos + Autoconf/Dakota interface.  If you’re building both with CMake and HEAD versions of both, it shouldn’t be needed; the library list should propagate from the DAKOTA build to TriKota.
>  
> Brian
>  
> -----
> Brian M. Adams, PhD (briadam at sandia.gov)
> Optimization and Uncertainty Quantification
> Sandia National Laboratories, Albuquerque, NM
> http://www.sandia.gov/~briadam
>  
>  
> From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of Dustin Langewisch
> Sent: Monday, August 08, 2011 1:14 PM
> To: Mark Cartwright
> Cc: trilinos-users at software.sandia.gov
> Subject: Re: [Trilinos-Users] Build questions....
>  
> Mark,
> 
> For the -fpic problem, try adding 
> 
> -DCMAKE_CXX_FLAGS="-fPIC"
> 
> to the configure script. Alternatively, just run
> 
> export CXXFLAGS="-fPIC"
> 
> The latter is what I personally did to overcome the problem, but presumably the former works as well. Also, I'm not sure if your problem is the same, or even related, but I had to change the list of libraries being built within Dakota to get Trikota to build successfully. In the file .../TriKota/src/CMakeLists.txt search for the variable DAKOTA_LIBS and you should find something like:
> 
>         SET(DAKOTA_LIBS
>             dakota pecos lhs surfpack conmin
>             ddace fsudace jega opt
>             psuade newmat ncsuopt sparsegrid coliny colin
>             pebbl utilib 3po nappspack appspack conveyor
>             shared cdd cport amplsolver lhs nidr dl
>           )
> 
> If this is what you have, then it needs to be changed since many of these libraries (namely coliny) do not exist in the newest version of Dakota. You must change this block to read:
> 
>         SET(DAKOTA_LIBS
>             dakota pecos lhs surfpack conmin ddace fsudace jega opt psuade
>             newmat ncsuopt sparsegrid colin interfaces momh scolib pebbl
>             tinyxml utilib 3po hopspack cport amplsolver nidr dl boost_signals
>           )
> 
> Order is important - make sure libraries are listed exactly in order given above.
> 
> Good luck,
> Dustin
> 
> 
> 
> On Mon, Aug 8, 2011 at 11:54 AM, Mark Cartwright <mark_cartwright at mac.com> wrote:
> I am building Trilinos from source on an unbuntu (64bit gcc 4.4.5) box.  Primarily for use with Titan, however I would like to explore some of trilinos itself...
> 
> I've run into an issue with TriKota -- it seems parts of Dakota are not being compiled -fPIC.  And I cant 'seem to find a way to force the Dakota config to stay -fPIC -- finding myself a bit lost with the nested CMake-ness...
> 
> What I get:
> 
> Linking CXX shared library libtrikota.so
> /usr/bin/ld: /home/markc/trilinos-10.6.4-build/packages/TriKota/Dakota/install/lib/libdakota.a(ParallelLibrary.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
> /home/markc/trilinos-10.6.4-build/packages/TriKota/Dakota/install/lib/libdakota.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[3]: *** [packages/TriKota/src/libtrikota.so] Error 1
> make[2]: *** [packages/TriKota/src/CMakeFiles/trikota.dir/all] Error 2
> make[1]: *** [packages/TriKota/src/CMakeFiles/trikota.dir/rule] Error 2
> make: *** [trikota] Error 2
> 
> 
> My "do-configure"
> 
> #!/bin/sh
> 
> export TRILINOS_HOME=/home/markc/trilinos-10.6.4-Source
> 
> 
> EXTRA_ARGS=$@
> 
>        cmake \
>          -D Trilinos_CONFIGURE_OPTIONS_FILE:FILEPATH=MyConfigureOptions.cmake \
>          -D CMAKE_BUILD_TYPE:STRING=DEBUG \
>          -D Trilinos_ENABLE_TESTS:BOOL=ON \
>          $EXTRA_ARGS \
>          ${TRILINOS_HOME}
> 
> 
> And finally -- MyConfigureOptions.cmake
> 
> #SET(CMAKE_BUILD_TYPE DEBUG CACHE STRING "" FORCE)
> SET(Trilinos_ENABLE_CHECKED_STL ON CACHE BOOL "" FORCE)
> SET(BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE)
> 
> 
> It's obviously something very silly that I have overlooked -- but after 8 hours for permutations -- I thought I had better ask...
> 
> Cheers,
> 
> Mark
> 
> 
> 
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
> 
> 
> 
> 
> --

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20110811/561e1802/attachment.html 


More information about the Trilinos-Users mailing list