SPECFEM/specfem3d

๐Ÿ› [BUG] - meshfem3D fails when using tomographic files

eyalshimony opened this issue ยท 2 comments

Description

meshfem3D fails (floating points exception) when the materials section in Mesh_Par_file contain only tomographic materials. As far as I understand, it is caused by VP_MAX being 0 in line 549 in check_mesh_quality.f90. This is caused by lines 150-159 in create_meshfem_mesh.f90, in which VP_MAX is set by inspecting the Vp value in regular materials only, and not in tomographic materials. Therefore, if no regular materials are set, Vp remains 0.

Affected SPECFEM3D version

Current

Your software and hardware environment

CentOS 7 server, gcc version 4.8.5, MPI Library for Linux* OS, Version 2021.1

Reproduction steps

1. In the materials section of Mesh_Par_file, write the only material as a tomographic one, for example:
-1 tomography elastic tomography_model.xyz 0 2
2. Run meshfem3D
3. The resulting error is "Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.", which I believe is caused by division by 0 as explained in the description part.

Screenshots

No response

Logs

No response

OS

Linux

this seems to be fixed since commit c2f639a - can you try again with the most recent devel version?

It works with the latest devel version, thanks!