I am using cmake 3.1.2. Do you know why for target_link_libraries() it is only necessary to link against the libmesh library instead of all the libmesh dependencies as it happens in the examples old Makefile (https://github.com/libMesh/libmesh/blob/master/examples/vector_fe/vector_fe_ex1/Makefile.old) ? ${libmesh_LIBS} comes from ${LIBMESH_DIR}/bin/libmesh-config —libs.
Miguel From: Antonio Cervone <ant.cerv...@gmail.com<mailto:ant.cerv...@gmail.com>> Date: Friday, April 8, 2016 at 3:58 AM To: Miguel Salazar <salazardet...@llnl.gov<mailto:salazardet...@llnl.gov>>, Roy Stogner <royst...@ices.utexas.edu<mailto:royst...@ices.utexas.edu>> Cc: "libmesh-users@lists.sourceforge.net<mailto:libmesh-users@lists.sourceforge.net>" <libmesh-users@lists.sourceforge.net<mailto:libmesh-users@lists.sourceforge.net>> Subject: Re: [Libmesh-users] Linking application to libMesh that is strange... find_package(Pkgconfig QUIET) calls exactly FindPkgConfig. what version of cmake are you using? glad it helped, On Thu, Apr 7, 2016 at 10:27 PM Salazar De Troya, Miguel <salazardet...@llnl.gov<mailto:salazardet...@llnl.gov>> wrote: Thank you, that was really useful. I didn’t know I could use pkg-config to obtain the libmesh dependencies. I had to replace find_package(Pkgconfig QUIET) (could not find it) for include(FindPkgConfig) and also add the petsc library to the rpath with: set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) set(CMAKE_INSTALL_RPATH “path/to/petsc/lib”) Miguel From: Antonio Cervone <ant.cerv...@gmail.com<mailto:ant.cerv...@gmail.com>> Date: Thursday, April 7, 2016 at 3:09 AM To: Miguel Salazar <salazardet...@llnl.gov<mailto:salazardet...@llnl.gov>>, Roy Stogner <royst...@ices.utexas.edu<mailto:royst...@ices.utexas.edu>> Cc: "libmesh-users@lists.sourceforge.net<mailto:libmesh-users@lists.sourceforge.net>" <libmesh-users@lists.sourceforge.net<mailto:libmesh-users@lists.sourceforge.net>> Subject: Re: [Libmesh-users] Linking application to libMesh I have developed this in the past https://github.com/capitalaslash/fsi/blob/master/cmake/FindLIBMESH.cmake it used to work for both opt and debug builds. let me know if it is of help antonio On Wed, Apr 6, 2016 at 7:59 PM Salazar De Troya, Miguel <salazardet...@llnl.gov<mailto:salazardet...@llnl.gov>> wrote: The compiler flags are provided by ${LIBMES_DIR}/bin/libmesh-config ‹cxxflags and ‹cflags right? In that case, I do pass them. This is the object compilation output for the cmake and the Makefile /usr/local/tools/openmpi-intel-1.8.4/bin/mpicxx -std=gnu++11 -std=gnu++11 -fopenmp -g -w1 -g -wd175 -wd1476 -wd1505 -wd1572 -DDEBUG -I/g/g92/miguel/code/libmesh_2D/include -I/usr/include/curl -I/usr/include/glpk -I/usr/local/tools/vtk-6.1.0/include/vtk-6.1 -I/g/g92/miguel/petsc-3.6.2/include -I/g/g92/miguel/petsc-3.6.2/miguel-opt/include -I/usr/local/tools/openmpi-intel-1.8.4/include/openmpi/opal/mca/hwloc/hwloc 191/hwloc/include -I/usr/local/tools/openmpi-intel-1.8.4/include/openmpi/opal/mca/event/libev ent2021/libevent -I/usr/local/tools/openmpi-intel-1.8.4/include/openmpi/opal/mca/event/libev ent2021/libevent/include -I/usr/local/tools/openmpi-intel-1.8.4/include -I/usr/local/tools/openmpi-intel-1.8.4/include/openmpi -I/usr/local/tools/boost-mpi-1.55.0/include -I/g/g92/miguel/code/AMR-vector/include -o CMakeFiles/vector_cmake.dir/src/stress_recovery_error_estimator.C.o -c /g/g92/miguel/code/AMR-vector/src/stress_recovery_error_estimator.C /usr/local/tools/openmpi-intel-1.8.4/bin/mpicxx -DDEBUG -std=gnu++11 -w1 -g -wd175 -wd1476 -wd1505 -wd1572 -fopenmp -I/g/g92/miguel/code/libmesh_2D/include -I/usr/include/curl -I/usr/include/glpk -I/usr/local/tools/vtk-6.1.0/include/vtk-6.1 -I/g/g92/miguel/petsc-3.6.2/include -I/g/g92/miguel/petsc-3.6.2/miguel-opt/include -I/usr/local/tools/openmpi-intel-1.8.4/include/openmpi/opal/mca/hwloc/hwloc 191/hwloc/include -I/usr/local/tools/openmpi-intel-1.8.4/include/openmpi/opal/mca/event/libev ent2021/libevent -I/usr/local/tools/openmpi-intel-1.8.4/include/openmpi/opal/mca/event/libev ent2021/libevent/include -I/usr/local/tools/openmpi-intel-1.8.4/include -I/usr/local/tools/openmpi-intel-1.8.4/include/openmpi -I/usr/local/tools/boost-mpi-1.55.0//include -c stress_recovery_error_estimator.C -o stress_recovery_error_estimator.x86_64-unknown-linux-gnu.dbg.o Where can I find information about the compiler flags: -wd175 -wd1476 -wd1505 -wd1572 ? Miguel On 4/6/16, 10:38 AM, "Roy Stogner" <royst...@ices.utexas.edu<mailto:royst...@ices.utexas.edu>> wrote: > >On Wed, 6 Apr 2016, Salazar De Troya, Miguel wrote: > >> I understand that this error is difficult to diagnose through email, >>but I >> would really appreciate help on how to debug it. The same application >>runs >> perfectly when I compile it with the usual Makefile. > >Are you compiling with the libMesh compiler flags included? If your >objects don't all use the same preprocessor macros for e.g. >_GLIBCXX_DEBUG then you can get ABI incompatibilities. >--- >Roy ------------------------------------------------------------------------------ _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net<mailto:Libmesh-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/libmesh-users ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/ gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532 _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users