coolfluid / coolfluid3

COOLFluiD is a collaborative simulation environment focused on complex multi-physics simulations
http://coolfluid.github.com
76 stars 77 forks source link

Fix gmsh reader to read high-order discontinuous fields #209

Closed mparsani closed 12 years ago

mparsani commented 12 years ago

Hi guys, before issuing an issue here I have asked the permission to Willem! :-)

When I try to consolidate a multicore simulation outputs (merge the .msh files in a single file) with coolfluid-mesh-transformer I get a segmantation fault:

matteos-Mac-Pro:11319] * Process received signal * [matteos-Mac-Pro:11319] Signal: Segmentation fault (11) [matteos-Mac-Pro:11319] Signal code: Address not mapped (1) [matteos-Mac-Pro:11319] Failing at address: 0x37c623b800 [matteos-Mac-Pro:11319] [ 0] 2 libSystem.B.dylib 0x00007fff8966a1ba _sigtramp + 26 [matteos-Mac-Pro:11319] * End of error message *

This only happens when I use second-order elements in gmsh, i.e. when I set

Mesh.ElementOrder = 2; Mesh.SecondOrderLinear = 0; //--> ensure curved boundary instead of multiple points on straight faces

wdeconinck commented 12 years ago

Thanks! I will have a look.

tlmquintino commented 12 years ago

Do you have a stack trace? This seems like a dereferenced pointer that was null. Can you post more output?

mparsani commented 12 years ago

Hi Tiago!

Here you go:

matteos-Mac-Pro:init_sol parsanm$ coolfluid-mesh-transformer --input wedge_initP.msh --output wedge_init_consolidated.msh Opening file wedge_init_P0.msh Creating Disontinuous space cpath:/discontinuous_geometry (cf3.mesh.LagrangeP1) for entities

backtrace() returned 16 addresses cf3::common::MacOSX::OSystemLayer::back_trace() const cf3::common::AssertionManager::doassert(bool, char const, char const, int, char const, char const_) cf3::mesh::gmsh::Reader::read_element_node_data() cf3::mesh::gmsh::Reader::do_read_mesh_into(cf3::common::URI const&, cf3::mesh::Mesh&) cf3::mesh::MeshReader::execute() cf3::mesh::LoadMesh::load_mesh_into(cf3::common::URI const&, cf3::mesh::Mesh&) cf3::mesh::LoadMesh::load_multiple_files(std::vector<cf3::common::URI, std::allocator > const&, cf3::mesh::Mesh&) cf3::Tools::mesh_transformer::Transformer::input(std::vector<std::string, std::allocator > const&) boost::function1<void, std::vector<std::string, std::allocator

const&>::operator()(std::vector<std::string, std::allocator const&) const boost::program_options::variables_map::notify() cf3::Tools::Shell::Interpreter::notify(boost::program_options::variables_map&) cf3::Tools::Shell::Interpreter::interpret(int, char**) main start 0x0

exit dumping backtrace ... aborting... [matteos-Mac-Pro:11868] * Process received signal * [matteos-Mac-Pro:11868] Signal: Abort trap (6) [matteos-Mac-Pro:11868] Signal code: (0) [matteos-Mac-Pro:11868] [ 0] 2 libSystem.B.dylib 0x00007fff8966a1ba _sigtramp + 26 [matteos-Mac-Pro:11868] [ 1] 3 ??? 0x0000000000000019 0x0 + 25 [matteos-Mac-Pro:11868] [ 2] 4 libcoolfluid_common.dylib 0x000000010024fc4c _ZN3cf36common16AssertionManager9do_assertEbPKcS3_iS3S3 + 1102 [matteos-Mac-Pro:11868] [ 3] 5 libcoolfluid_mesh_gmsh.dylib 0x00000001013ba270 _ZN3cf34mesh4gmsh6Reader22read_element_node_dataEv + 3228 [matteos-Mac-Pro:11868] [ 4] 6 libcoolfluid_mesh_gmsh.dylib 0x00000001013b5bab _ZN3cf34mesh4gmsh6Reader17do_read_mesh_intoERKNS_6common3URIERNS0_4MeshE + 1591 [matteos-Mac-Pro:11868] [ 5] 7 libcoolfluid_mesh.dylib 0x00000001008f3650 _ZN3cf34mesh10MeshReader7executeEv + 352 [matteos-Mac-Pro:11868] [ 6] 8 libcoolfluid_mesh.dylib 0x000000010096e395 _ZN3cf34mesh8LoadMesh14load_mesh_intoERKNS_6common3URIERNS0_4MeshE + 1935 [matteos-Mac-Pro:11868] [ 7] 9 libcoolfluid_mesh.dylib 0x000000010096e7e4 _ZN3cf34mesh8LoadMesh19load_multiple_filesERKSt6vectorINS_6common3URIESaIS4_EERNS0_4MeshE

On 9 May 2012 14:39, Tiago Quintino < reply@reply.github.com

wrote:

Do you have a stack trace? This seems like a dereferenced pointer that was null. Can you post more output?


Reply to this email directly or view it on GitHub: https://github.com/coolfluid/coolfluid3/issues/209#issuecomment-5597946

Matteo

wdeconinck commented 12 years ago

Thanks, this helps. From this I can immediately see the bug.

The gmsh reader tries to load a P2 discontinuous field in a P1 discontinuous dictionary.

I change title to "Fix gmsh reader to read high-order discontinuous fields"

mparsani commented 12 years ago

Thanks Willem and Tiago!

On 9 May 2012 15:16, Willem Deconinck < reply@reply.github.com

wrote:

Thanks, this helps. From this I can immediately see the bug.

The gmsh reader tries to load a P2 discontinuous field in a P1 discontinuous dictionary.

I change title to "Fix gmsh reader to read high-order discontinuous fields"


Reply to this email directly or view it on GitHub: https://github.com/coolfluid/coolfluid3/issues/209#issuecomment-5598439

Matteo

wdeconinck commented 12 years ago

This bug is fixed in my fork.

Matteo, please pull from my fork if this feature is urgent for you.

mparsani commented 12 years ago

Thanks a lot!

Matteo

On May 9, 2012, at 7:59 PM, Willem Deconinckreply@reply.github.com wrote:

This bug is fixed in my fork.

Matteo, please pull from my fork if this feature is urgent for you.


Reply to this email directly or view it on GitHub: https://github.com/coolfluid/coolfluid3/issues/209#issuecomment-5605325

wdeconinck commented 12 years ago

This is now merged in the main repository