GEOS icon indicating copy to clipboard operation
GEOS copied to clipboard

add early check for invalid `toMetricPrefixString` input

Open tbeltzun opened this issue 1 year ago • 3 comments

Fix https://github.com/GEOS-DEV/GEOS/issues/2651.

Use fpclassify to avoid -Werror=float-equal.

tbeltzun avatar Sep 05 '23 12:09 tbeltzun

@tbeltzun can you post what the output looks like with the zero case?

rrsettgast avatar Sep 07 '23 04:09 rrsettgast

Hi @rrsettgast sorry I realized I missed your message.

Here is the output with the floating point exception:

Num ranks: 1
Max threads: 1
GEOSX version: 0.2.0 (bugfix/tbeltzun/ndebug, sha1: edd78c2297)
  - c++ compiler: clang 14.0.6
  - openmp version: 201811
  - MPI version: Open MPI v4.1.5, package: Open MPI tb@p7670 Distribution, ident: 4.1.5, repo rev: v4.1.5, Feb 23, 2023
  - HDF5 version: 1.12.1
  - Conduit version: 0.8.2
  - VTK version: 9.2.6
  - RAJA version: 2023.6.1
  - umpire version: 2023.6.0
  -  adiak version: ..
  - caliper version: 2.10.0
  - METIS version: 5.1.0
  - PARAMETIS version: 4.0.3
  - scotch version: 7.0.3
  - superlu_dist version: 6.3.0
  - suitesparse version: 5.7.9
  - Python3 version: 3.8.17
  - hypre release version: 2.29.0
Started at 2023-10-10 11:25:45.483143525
Adding Mesh: InternalMesh, mesh
Adding Solver of type AcousticSEM, named acousticSolver
Adding Event: PeriodicEvent, solverApplications
Adding Event: PeriodicEvent, timeHistoryCollection
Adding Event: PeriodicEvent, timeHistoryOutput
Adding Event: PeriodicEvent, restarts
Adding Output: TimeHistory, timeHistoryOutput
Adding Output: Restart, restartOutput
Adding Object CellElementRegion named Region from ObjectManager::Catalog.
mesh: total number of nodes = 216
mesh: total number of elems = 125
regionQuadrature: meshBodyName, meshLevelName, regionName, subRegionName = mesh, Level0, Region, cb
mesh/Level0/Region/cb/nullModel allocated 8 quadrature points
mesh: importing field data from mesh dataset
************************************************************************************************************************
 Data repository memory allocations 
                                                                                       min          max          sum    
                                                                                   -----------  -----------  -----------
|
Received signal 8: Floating point exception
Floating point exception:

** StackTrace of 9 frames **
Frame 0: /lib/x86_64-linux-gnu/libc.so.6 
Frame 1: feraiseexcept 
Frame 2: log10f64 
Frame 3: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > geos::stringutilities::toMetricPrefixString<unsigned long>(unsigned long const&) 
Frame 4: geos::dataRepository::printMemoryAllocation(geos::dataRepository::Group const&, int, double) 
Frame 5: geos::GeosxState::initializeDataRepository() 
Frame 6: main 
Frame 7: /lib/x86_64-linux-gnu/libc.so.6 
Frame 8: __libc_start_main 
Frame 9: _start 
=====

--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

tbeltzun avatar Oct 10 '23 11:10 tbeltzun

Is this ready to be merged? It seems quite a minor fix

castelletto1 avatar Apr 01 '24 22:04 castelletto1