hermes test_examples

64 views
Skip to first unread message

Alexander Lindsay

unread,
Nov 13, 2014, 1:38:31 PM11/13/14
to herm...@googlegroups.com
Hi all,

I am a doctoral student in the chemical engineering department at UC-Berkeley.  I am a new user to hermes and am excited to hopefully transition from proprietary COMSOL to open source hp-adaptivity. 

A question about installation and getting started. I cloned the hermes repository and then successfully ran cmake . , make, and make install.  However, if I go into the test_examples within the hermes directory, I cannot successfully execute the first test example: 00-quickShow.  It complains that it cannot find hermes2d.h.

However, when I clone the hermes-tutorial repository, and then run cmake . and make, I can execute the executables within the hermes-tutorial directory just fine.  I think I might have read somewhere within this group that the test_examples within the hermes directory may no longer be supported? I just want to make sure that I'm not missing something or that I missed an important installation.

Thanks,
Alex
 

Alexander Lindsay

unread,
Nov 13, 2014, 8:56:43 PM11/13/14
to herm...@googlegroups.com
Also wanted to add that it's such a breath of fresh air working with your software after coming from closed source FEM.  I think the work your group is doing is awesome.

Thank you

Lukas Korous

unread,
Nov 18, 2014, 6:33:56 PM11/18/14
to herm...@googlegroups.com
Hi Alex,

sorry for taking so long to answer. It is very weird that you were
able to compile the test example 00-quickShow and were not able to run
it because of a missing header.

Did you try other test examples?

Also where did you install hermes? Could you maybe send me the output
of make, make install, and the error it gives you?

Best Regards,
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/d/optout.



--
Lukáš Korous

Alexander Lindsay

unread,
Nov 19, 2014, 1:57:56 PM11/19/14
to herm...@googlegroups.com
Hi Lukas,

I am installing in my home directory (~)  So I think what I did before when I got the missing header error was: within the hermes directory I typed cmake . then make then make install as described in the documentation.  Then I went into the test example 00-quickshow directory and then also tried running cmake . and make.  That produced the missing header error.  I don't think I was supposed to do this second step though: the cmake and make within the test-example directory.  I believe all I needed to do for installing was cmake . , make, and make install within the base hermes directory.  Correct me if I'm wrong.

When I do cmake . , make, and make install in the base hermes directory, it appears that everything works well.  At the end of my post is the output of make and make install.  Immediately after I run these commands, if I go into the 00-quickshow folder and type ./00-quickshow, I get this terminal output:

Segmentation fault (core dumped)

If I try to execute ./01-poisson, I also get an error:

terminate called after throwing an instance of 'Hermes::Exceptions::MeshLoadFailureException'
  what():  Mesh loading failed: instance document parsing failed
Aborted (core dumped)

However, all the other test_examples seem to execute as they should, i.e. I get visualization output from running all the other test_examples.  For instance, when I run ./02-poisson-newton, I get this beautiful plot:



So please let me know if I'm doing anything wrong, or if these errors with executing the 00 and 01 test_examples are normal.  Thank you for your time!

Alex




P.S.: make and make install output below:

alexlindsay@D106:~/hermes$ make
[ 11%] Built target hermes_common
[ 22%] Built target hermes_common-debug
[ 23%] Built target XSDMesh1D
[ 23%] Built target XSDMesh2D
[ 23%] Built target XSDSolution2D
[ 24%] Built target XSDSpace2D
[ 24%] Built target XSDSubdomains2D
[ 57%] Built target hermes2d
[ 89%] Built target hermes2d-debug
[ 89%] Built target 00-quickShow
[ 90%] Built target 01-poisson
[ 90%] Built target 02-poisson-newton
[ 91%] Built target 03-navier-stokes
[ 91%] Built target 04-complex-adapt
[ 92%] Built target 05-hcurl-adapt
[ 92%] Built target 06-system-adapt
[ 93%] Built target 07-newton-heat-rk
[ 94%] Built target 08-nonlinearity
[ 94%] Built target 10-linear-advection-dg-adapt
[ 95%] Built target 11-transient-adapt
[ 96%] Built target 12-picard
[ 98%] Built target 13-FCT-solid_body_rotation
[ 99%] Built target 14-error-calculation
[100%] Built target 15-adaptivity-matrix-reuse-simple
[100%] Built target 17-adaptivity-matrix-reuse-layer-interior



alexlindsay@D106:~/hermes$  sudo make install
[sudo] password for alexlindsay:
[ 11%] Built target hermes_common
[ 22%] Built target hermes_common-debug
[ 23%] Built target XSDMesh1D
[ 23%] Built target XSDMesh2D
[ 23%] Built target XSDSolution2D
[ 24%] Built target XSDSpace2D
[ 24%] Built target XSDSubdomains2D
[ 57%] Built target hermes2d
[ 89%] Built target hermes2d-debug
[ 89%] Built target 00-quickShow
[ 90%] Built target 01-poisson
[ 90%] Built target 02-poisson-newton
[ 91%] Built target 03-navier-stokes
[ 91%] Built target 04-complex-adapt
[ 92%] Built target 05-hcurl-adapt
[ 92%] Built target 06-system-adapt
[ 93%] Built target 07-newton-heat-rk
[ 94%] Built target 08-nonlinearity
[ 94%] Built target 10-linear-advection-dg-adapt
[ 95%] Built target 11-transient-adapt
[ 96%] Built target 12-picard
[ 98%] Built target 13-FCT-solid_body_rotation
[ 99%] Built target 14-error-calculation
[100%] Built target 15-adaptivity-matrix-reuse-simple
[100%] Built target 17-adaptivity-matrix-reuse-layer-interior
Install the project...
-- Install configuration: ""
-- Up-to-date: /usr/local/lib/libhermes_common-debug.a
-- Up-to-date: /usr/local/lib/libhermes_common.a
-- Up-to-date: /usr/local/include/hermes_common/config.h
-- Up-to-date: /usr/local/include/hermes_common/mixins.h
-- Up-to-date: /usr/local/include/hermes_common/hermes_common.h
-- Up-to-date: /usr/local/include/hermes_common/hermes_function.h
-- Up-to-date: /usr/local/include/hermes_common/api.h
-- Up-to-date: /usr/local/include/hermes_common/exceptions.h
-- Up-to-date: /usr/local/include/hermes_common/ord.h
-- Up-to-date: /usr/local/include/hermes_common/common.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/nonlinear_convergence_measurement.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/precond.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/matrix_solver.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/nonlinear_matrix_solver.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/linear_matrix_solver.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/picard_matrix_solver.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/newton_matrix_solver.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/interfaces/precond_ml.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/interfaces/precond_ifpack.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/interfaces/mumps_solver.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/interfaces/petsc_solver.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/interfaces/paralution_solver.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/interfaces/amesos_solver.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/interfaces/epetra.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/interfaces/superlu_solver.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/interfaces/aztecoo_solver.h
-- Up-to-date: /usr/local/include/hermes_common/solvers/interfaces/umfpack_solver.h
-- Up-to-date: /usr/local/include/hermes_common/data_structures/range.h
-- Up-to-date: /usr/local/include/hermes_common/data_structures/array.h
-- Up-to-date: /usr/local/include/hermes_common/data_structures/table.h
-- Up-to-date: /usr/local/include/hermes_common/algebra/algebra_utilities.h
-- Up-to-date: /usr/local/include/hermes_common/algebra/matrix.h
-- Up-to-date: /usr/local/include/hermes_common/algebra/cs_matrix.h
-- Up-to-date: /usr/local/include/hermes_common/algebra/vector.h
-- Up-to-date: /usr/local/include/hermes_common/algebra/algebra_mixins.h
-- Up-to-date: /usr/local/include/hermes_common/algebra/dense_matrix_operations.h
-- Up-to-date: /usr/local/include/hermes_common/util/compat.h
-- Up-to-date: /usr/local/include/hermes_common/util/qsort.h
-- Up-to-date: /usr/local/include/hermes_common/util/callstack.h
-- Up-to-date: /usr/local/include/hermes_common/util/memory_handling.h
-- Up-to-date: /usr/local/lib/libhermes2d-debug.a
-- Up-to-date: /usr/local/lib/libhermes2d.a
-- Up-to-date: /usr/local/include/hermes2d/config.h
-- Up-to-date: /usr/local/include/hermes2d/norm_form.h
-- Up-to-date: /usr/local/include/hermes2d/global.h
-- Up-to-date: /usr/local/include/hermes2d/neighbor_search.h
-- Up-to-date: /usr/local/include/hermes2d/hermes2d.h
-- Up-to-date: /usr/local/include/hermes2d/graph.h
-- Up-to-date: /usr/local/include/hermes2d/mixins2d.h
-- Up-to-date: /usr/local/include/hermes2d/doxygen_first_page.h
-- Up-to-date: /usr/local/include/hermes2d/asmlist.h
-- Up-to-date: /usr/local/include/hermes2d/forms.h
-- Up-to-date: /usr/local/include/hermes2d/api2d.h
-- Up-to-date: /usr/local/include/hermes2d/spline.h
-- Up-to-date: /usr/local/include/hermes2d/solver/newton_solver.h
-- Up-to-date: /usr/local/include/hermes2d/solver/picard_solver.h
-- Up-to-date: /usr/local/include/hermes2d/solver/linear_solver.h
-- Up-to-date: /usr/local/include/hermes2d/solver/runge_kutta.h
-- Up-to-date: /usr/local/include/hermes2d/solver/nox_solver.h
-- Up-to-date: /usr/local/include/hermes2d/solver/solver.h
-- Up-to-date: /usr/local/include/hermes2d/discrete_problem/discrete_problem.h
-- Up-to-date: /usr/local/include/hermes2d/discrete_problem/discrete_problem_integration_order_calculator.h
-- Up-to-date: /usr/local/include/hermes2d/discrete_problem/discrete_problem_helpers.h
-- Up-to-date: /usr/local/include/hermes2d/discrete_problem/discrete_problem_selective_assembler.h
-- Up-to-date: /usr/local/include/hermes2d/discrete_problem/discrete_problem_thread_assembler.h
-- Up-to-date: /usr/local/include/hermes2d/discrete_problem/dg/discrete_problem_dg_assembler.h
-- Up-to-date: /usr/local/include/hermes2d/discrete_problem/dg/multimesh_dg_neighbor_tree.h
-- Up-to-date: /usr/local/include/hermes2d/discrete_problem/dg/multimesh_dg_neighbor_tree_node.h
-- Up-to-date: /usr/local/include/hermes2d/space/space.h
-- Up-to-date: /usr/local/include/hermes2d/space/space_l2.h
-- Up-to-date: /usr/local/include/hermes2d/space/space_hdiv.h
-- Up-to-date: /usr/local/include/hermes2d/space/space_h2d_xml.h
-- Up-to-date: /usr/local/include/hermes2d/space/space_h1.h
-- Up-to-date: /usr/local/include/hermes2d/space/space_hcurl.h
-- Up-to-date: /usr/local/include/hermes2d/space/space_h2d_xml.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/curved.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/traverse.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/mesh_data.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/mesh_reader_exodusii.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/mesh_reader.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/mesh_reader_h2d_xml.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/mesh_h1d_xml.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/hash.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/mesh.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/mesh_util.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/mesh_reader_h2d_bson.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/element.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/mesh_h2d_xml.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/mesh_reader_h2d.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/refmap.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/mesh_reader_h1d_xml.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/subdomains_h2d_xml.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/mesh_h1d_xml.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/mesh_h2d_xml.h
-- Up-to-date: /usr/local/include/hermes2d/mesh/subdomains_h2d_xml.h
-- Up-to-date: /usr/local/include/hermes2d/boundary_conditions/essential_boundary_conditions.h
-- Up-to-date: /usr/local/include/hermes2d/shapeset/shapeset.h
-- Up-to-date: /usr/local/include/hermes2d/shapeset/shapeset_l2_all.h
-- Up-to-date: /usr/local/include/hermes2d/shapeset/shapeset_h1_quad.h
-- Up-to-date: /usr/local/include/hermes2d/shapeset/shapeset_h1_all.h
-- Up-to-date: /usr/local/include/hermes2d/shapeset/precalc.h
-- Up-to-date: /usr/local/include/hermes2d/shapeset/shapeset_hd_all.h
-- Up-to-date: /usr/local/include/hermes2d/shapeset/shapeset_hc_all.h
-- Up-to-date: /usr/local/include/hermes2d/shapeset/shapeset_common.h
-- Up-to-date: /usr/local/include/hermes2d/function/exact_solution.h
-- Up-to-date: /usr/local/include/hermes2d/function/filter.h
-- Up-to-date: /usr/local/include/hermes2d/function/postprocessing.h
-- Up-to-date: /usr/local/include/hermes2d/function/mesh_function.h
-- Up-to-date: /usr/local/include/hermes2d/function/solution.h
-- Up-to-date: /usr/local/include/hermes2d/function/solution_h2d_xml.h
-- Up-to-date: /usr/local/include/hermes2d/function/function.h
-- Up-to-date: /usr/local/include/hermes2d/function/transformable.h
-- Up-to-date: /usr/local/include/hermes2d/function/solution_h2d_xml.h
-- Up-to-date: /usr/local/include/hermes2d/adapt/adapt.h
-- Up-to-date: /usr/local/include/hermes2d/adapt/kelly_type_adapt.h
-- Up-to-date: /usr/local/include/hermes2d/adapt/error_calculator.h
-- Up-to-date: /usr/local/include/hermes2d/adapt/adapt_solver.h
-- Up-to-date: /usr/local/include/hermes2d/adapt/error_thread_calculator.h
-- Up-to-date: /usr/local/include/hermes2d/projections/ogprojection.h
-- Up-to-date: /usr/local/include/hermes2d/projections/ogprojection_nox.h
-- Up-to-date: /usr/local/include/hermes2d/quadrature/limit_order.h
-- Up-to-date: /usr/local/include/hermes2d/quadrature/quad_all.h
-- Up-to-date: /usr/local/include/hermes2d/quadrature/quad.h
-- Up-to-date: /usr/local/include/hermes2d/refinement_selectors/candidates.h
-- Up-to-date: /usr/local/include/hermes2d/refinement_selectors/h1_proj_based_selector.h
-- Up-to-date: /usr/local/include/hermes2d/refinement_selectors/element_to_refine.h
-- Up-to-date: /usr/local/include/hermes2d/refinement_selectors/hcurl_proj_based_selector.h
-- Up-to-date: /usr/local/include/hermes2d/refinement_selectors/selector.h
-- Up-to-date: /usr/local/include/hermes2d/refinement_selectors/proj_based_selector.h
-- Up-to-date: /usr/local/include/hermes2d/refinement_selectors/l2_proj_based_selector.h
-- Up-to-date: /usr/local/include/hermes2d/refinement_selectors/order_permutator.h
-- Up-to-date: /usr/local/include/hermes2d/refinement_selectors/optimum_selector.h
-- Up-to-date: /usr/local/include/hermes2d/views/orderizer.h
-- Up-to-date: /usr/local/include/hermes2d/views/mesh_view.h
-- Up-to-date: /usr/local/include/hermes2d/views/view.h
-- Up-to-date: /usr/local/include/hermes2d/views/scalar_view.h
-- Up-to-date: /usr/local/include/hermes2d/views/view_support.h
-- Up-to-date: /usr/local/include/hermes2d/views/linearizer.h
-- Up-to-date: /usr/local/include/hermes2d/views/order_view.h
-- Up-to-date: /usr/local/include/hermes2d/views/vector_base_view.h
-- Up-to-date: /usr/local/include/hermes2d/views/vector_view.h
-- Up-to-date: /usr/local/include/hermes2d/views/base_view.h
-- Up-to-date: /usr/local/include/hermes2d/views/linearizer_utils.h
-- Up-to-date: /usr/local/include/hermes2d/views/thread_linearizer.h
-- Up-to-date: /usr/local/include/hermes2d/weakform/weakform.h
-- Up-to-date: /usr/local/include/hermes2d/weakform_library/weakforms_hcurl.h
-- Up-to-date: /usr/local/include/hermes2d/weakform_library/weakforms_h1.h
-- Up-to-date: /usr/local/include/hermes2d/weakform_library/weakforms_maxwell.h
-- Up-to-date: /usr/local/include/hermes2d/weakform_library/weakforms_elasticity.h
-- Up-to-date: /usr/local/include/hermes2d/weakform_library/integrals_h1.h
-- Up-to-date: /usr/local/include/hermes2d/weakform_library/weakforms_neutronics.h

Alexander Lindsay

unread,
Nov 19, 2014, 1:59:53 PM11/19/14
to herm...@googlegroups.com
I don't know why the plot resulting from execution of test_example 02-poisson-newton didn't show up in my post. I have attached it to this one.

Alex
Screenshot from 2014-11-19 10:54:45.png

Lukas Korous

unread,
Nov 21, 2014, 4:27:30 AM11/21/14
to herm...@googlegroups.com
Hi Alexander,

you are right - you do not need to run cmake in individual test examples directories. In fact you shouldn't - because the CMake build system takes care of the paths e.g. for header etc. and it has to be run from a single fixed location (the root of hermes).

About 00 and 01: fact is that 00 I use when presenting Hermes and I do not update it so that it is usable by other users - but 01 should work just fine. Are you using the master branch?

Best,
Lukas

Lukas Korous

unread,
Nov 21, 2014, 4:33:22 AM11/21/14
to herm...@googlegroups.com
Hi,

I just fixed the problem - it is fixed both in master, and master-3.1. You will have to reset in Git, because I had to throw out an older commit that was in there by mistake.

Lukas
--
Lukáš Korous

Alexander Lindsay

unread,
Nov 21, 2014, 1:26:30 PM11/21/14
to herm...@googlegroups.com
I cloned the changes, and 01 works just fine now! Thank you very much for the support!
Reply all
Reply to author
Forward
0 new messages