built hermes-tutorial devel

51 views
Skip to first unread message

Tomas Svaton

unread,
Oct 10, 2013, 10:13:55 AM10/10/13
to herm...@googlegroups.com
Hello everybody,

I apologise for such a lot of questions. After the installation of hermes (devel), the problems of making hermes-tutorial occurs (CMake.vars enclosed). I see that he misses in some way the recognition of ‘MeshSharedPtr’, which in the hermes2d/test_examples/* are used also and the compilation passes well therein.

Could someone give me a hint where the problem could be?

Thank you very much.

Kind regards,
Tomas.


tomas@tomas-VirtualBox:~/workspace/hermes-tutorial$ cmake .
-- Found UMFPACK: /usr/lib/libumfpack.so;/usr/lib/libamd.so  
-- Found PTHREAD: /usr/lib/i386-linux-gnu/libpthread.so  
-- Found TCMALLOC: /usr/lib/libtcmalloc.so  
-- Found PARALUTION: /home/tomas/workspace/paralution-0.4.0/build/lib/libparalution.a  
-- Looking for Fortran dgemm
-- Looking for Fortran dgemm - found
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- A library with BLAS API found.
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- A library with LAPACK API found.
-- Found HERMES_COMMON: /usr/local/lib/libhermes_common.so  
-- Found HERMES: /usr/local/lib/libhermes2d.so  

Hermes-tutorial Configuration results
---------------------

-------Features-------
Build with OpenMP: YES
Build with TCMalloc: YES
Build with BSON: NO
Build with MATIO: NO
Build with MPI: YES
Build with EXODUSII: NO

-------Solvers-------
Build with UMFPACK: YES
Build with PARALUTION: YES
Build with PETSC: !TO_DO!
Build with MUMPS: NO
Build with SUPERLU: NO
Build with TRILINOS: !TO_DO!
---------------------


-- Configuring done
-- Generating done
-- Build files have been written to: /home/tomas/workspace/hermes-tutorial

=========

tomas@tomas-VirtualBox:~/workspace/hermes-tutorial$ make
[  1%] Building CXX object A-linear/01-mesh/CMakeFiles/A-01-mesh.dir/main.cpp.o
/home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp: In function ‘int main(int, char**)’:
/home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:33:3: error: ‘MeshSharedPtr’ was not declared in this scope
/home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:33:17: error: expected ‘;’ before ‘mesh’
/home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:40:34: error: ‘mesh’ was not declared in this scope
/home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:40:34: note: suggested alternatives:
In file included from /usr/local/include/hermes2d/mesh/mesh_reader_h2d_xml.h:26:0,
                 from /usr/local/include/hermes2d/hermes2d.h:38,
                 from /home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:1:
/usr/local/include/hermes2d/mesh/mesh_h2d_xml.h:2111:9: note:   ‘XMLMesh::mesh’
In file included from /usr/local/include/hermes2d/mesh/mesh_reader_h1d_xml.h:26:0,
                 from /usr/local/include/hermes2d/hermes2d.h:39,
                 from /home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:1:
/usr/local/include/hermes2d/mesh/mesh_h1d_xml.h:804:9: note:   ‘XMLMesh1D::mesh’
/home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:51:33: error: ‘mesh’ was not declared in this scope
/home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:51:33: note: suggested alternatives:
In file included from /usr/local/include/hermes2d/mesh/mesh_reader_h2d_xml.h:26:0,
                 from /usr/local/include/hermes2d/hermes2d.h:38,
                 from /home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:1:
/usr/local/include/hermes2d/mesh/mesh_h2d_xml.h:2111:9: note:   ‘XMLMesh::mesh’
In file included from /usr/local/include/hermes2d/mesh/mesh_reader_h1d_xml.h:26:0,
                 from /usr/local/include/hermes2d/hermes2d.h:39,
                 from /home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:1:
/usr/local/include/hermes2d/mesh/mesh_h1d_xml.h:804:9: note:   ‘XMLMesh1D::mesh’
/home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:55:3: error: ‘mesh’ was not declared in this scope
/home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:55:3: note: suggested alternatives:
In file included from /usr/local/include/hermes2d/mesh/mesh_reader_h2d_xml.h:26:0,
                 from /usr/local/include/hermes2d/hermes2d.h:38,
                 from /home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:1:
/usr/local/include/hermes2d/mesh/mesh_h2d_xml.h:2111:9: note:   ‘XMLMesh::mesh’
In file included from /usr/local/include/hermes2d/mesh/mesh_reader_h1d_xml.h:26:0,
                 from /usr/local/include/hermes2d/hermes2d.h:39,
                 from /home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:1:
/usr/local/include/hermes2d/mesh/mesh_h1d_xml.h:804:9: note:   ‘XMLMesh1D::mesh’
make[2]: *** [A-linear/01-mesh/CMakeFiles/A-01-mesh.dir/main.cpp.o] Error 1
make[1]: *** [A-linear/01-mesh/CMakeFiles/A-01-mesh.dir/all] Error 2
make: *** [all] Error 2

CMake.vars

Lukas Korous

unread,
Oct 11, 2013, 8:32:38 AM10/11/13
to herm...@googlegroups.com
Hi,

all SharedPtrs (MeshSharedPtr, MeshFunctionSharedPtr, SpaceSharedPtr)
are defined in the namespace Hermes::Hermes2D, before they were in the
global namespace, I am working on the update of both tutorial &
examples.

Best,
Lukas
> --
> You received this message because you are subscribed to the Google Groups
> "hermes2d" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hermes2d+u...@googlegroups.com.
> To post to this group, send email to herm...@googlegroups.com.
> Visit this group at http://groups.google.com/group/hermes2d.
> For more options, visit https://groups.google.com/groups/opt_out.



--
Lukáš Korous

Tomas Svaton

unread,
Oct 14, 2013, 6:51:47 PM10/14/13
to herm...@googlegroups.com
Hi Lukas,

Thank you for your response. I looked where the problem could be. Please correct me when I am wrong.
The installation directories are in the /home/user_name/usr/lib and /home/user_name/usr/local, hence I added these lines 

set(HERMES_DIRECTORY "/home/tomas/usr/lib")
set(HERMES_INCLUDE_PATH "/home/tomas/usr/include")
set(DEP_INCLUDE_PATHS "/home/tomas/usr/include")

to CMake.vars file.

then I performed classical
$rm CMakeCache.txt
$cmake .
$make

and the following error appeared:

tomas@tomas-VirtualBox:~/workspace/hermes-tutorial$ make
Scanning dependencies of target A-01-mesh
[  1%] Building CXX object A-linear/01-mesh/CMakeFiles/A-01-mesh.dir/main.cpp.o
In file included from /home/tomas/usr/include/hermes2d/hermes2d.h:39:0,
                 from /home/tomas/workspace/hermes-tutorial/A-linear/01-mesh/main.cpp:1:
/home/tomas/usr/include/hermes2d/mesh/mesh_reader_h2d_xml.h:26:26: fatal error: mesh_h2d_xml.h: No such file or directory
compilation terminated.
make[2]: *** [A-linear/01-mesh/CMakeFiles/A-01-mesh.dir/main.cpp.o] Error 1
make[1]: *** [A-linear/01-mesh/CMakeFiles/A-01-mesh.dir/all] Error 2
make: *** [all] Error 2
tomas@tomas-VirtualBox:~/workspace/hermes-tutorial$

Before I installed hermes as normal user (without sudo). Please let me know whether could be the problem. Thank you.

Kind regards,
Tomas.

Lukas Korous

unread,
Oct 15, 2013, 5:02:21 AM10/15/13
to herm...@googlegroups.com
Hi,

one question, why are you not installing with sudo to the standard
directories /usr/local/lib (/usr/lib), /usr/local/include
(/usr/include)?

Also, did your hermes (library) compilation and installation finish
successfully? Did you set CMAKE_INSTALL_PREFIX?

This looks like there is some problem going on, since there is no
reason why it would find the file mesh_reader_h2d_
xml.h, but not mesh_h2d_xml.h, they are installed together.

Also, some days ago I sent you a personal email, asking if you would
be interested to meet in person in Pilsen, where some of us reside,
maybe we could figure stuff out faster.

Lukas

Tomas Svaton

unread,
Oct 15, 2013, 8:15:45 AM10/15/13
to herm...@googlegroups.com
Hi Lukas,

I am sorry, but I did not received any personal e-mail from you. Could you resend me it, please? This is only possible meaning of communication that I can use now. I apologize about the spam on basic problems to everyone.

I did it as written in the help for install hermes: http://hpfem.org/hermes-doc/hermes/html/src/installation/linux.html
for such purpose I added to CMake.vars the line set(CMAKE_INSTALL_PREFIX "~/usr"). Then it was installed everything to /home/tomas/usr/lib and /home/tomas/usr/include

Now I removed this option from CMake.vars and it installed to /usr/local/lib/ and /usr/local/include/ correctly. I removed also the most of the optionally stuff to understand where the problem could be. Anyway the errors still appear when building hermes-tutorial

tomas@tomas-VirtualBox:~/workspace/hermes-tutorial$ make
Scanning dependencies of target A-01-mesh
[  1%] Building CXX object A-linear/01-mesh/CMakeFiles/A-01-mesh.dir/main.cpp.o
Linking CXX executable A-01-mesh
CMakeFiles/A-01-mesh.dir/main.cpp.o: In function `main':
main.cpp:(.text+0x16d): undefined reference to `Hermes::Hermes2D::MeshReaderH2DXML::load(char const*, std::tr1::shared_ptr<Hermes::Hermes2D::Mesh>)'
main.cpp:(.text+0x34f): undefined reference to `Hermes::Hermes2D::Views::MeshView::show(std::tr1::shared_ptr<Hermes::Hermes2D::Mesh>)'
collect2: error: ld returned 1 exit status
make[2]: *** [A-linear/01-mesh/A-01-mesh] Error 1
make[1]: *** [A-linear/01-mesh/CMakeFiles/A-01-mesh.dir/all] Error 2
make: *** [all] Error 2
Thank you for your response.

Kind regards,
Tomas.
Reply all
Reply to author
Forward
0 new messages