Skip to content

Error message 'Available allocators: ' causes backtrace instead of printing possible allocators #1062

Description

@mattijsjanssens

Describe the bug

Running on Mac. Works fine with 'host'. But when switching to 'DEVICE' memory allocator it prints

terminate called after throwing an instance of 'umpire::runtime_error'
  what():  ! Umpire runtime_error [/Volumes/case_sensitive/OpenFOAM/work/ThirdParty-common/umpire-2025.03.0/src/umpire/ResourceManager.cpp:204]: Allocator "DEVICE" not found. Available allocators: 
    Backtrace: 10 frames
    0 0x1099ec77c No dladdr: 0   libOpenFOAM.dylib                   0x00000001099ec77c _ZNK6umpire13runtime_error7messageB5cxx11Ev + 60
    1 0x109a7455c No dladdr: 1   libOpenFOAM.dylib                   0x0000000109a7455c _ZN6umpire13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i + 212
    2 0x109a0d290 No dladdr: 2   libOpenFOAM.dylib                   0x0000000109a0d290 _ZN6umpire15ResourceManager21getAllocationStrategyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE + 1096
    3 0x109a0d828 No dladdr: 3   libOpenFOAM.dylib                   0x0000000109a0d828 _ZN6umpire15ResourceManager12getAllocatorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE + 636
    4 0x109a0d93c No dladdr: 4   libOpenFOAM.dylib                   0x0000000109a0d93c _ZN6umpire15ResourceManager12getAllocatorEPKc + 112
    5 0x1099d935c No dladdr: 5   libOpenFOAM.dylib                   0x00000001099d935c _ZN4Foam10MemoryPool6createEb + 2416
    6 0x1092093e4 No dladdr: 6   libOpenFOAM.dylib                   0x00000001092093e4 _ZN4Foam7argList5parseEbbb + 5204
    7 0x10920d1e4 No dladdr: 7   libOpenFOAM.dylib                   0x000000010920d1e4 _ZN4Foam7argListC1ERiRPPcbbb + 1060
    8 0x1027208d0 No dladdr: 8   icoFoam                             0x00000001027208d0 main + 3088
    9 0x18517fda4 No dladdr: 9   dyld                                0x000000018517fda4 start + 6992

To Reproduce

Run recent OpenFOAM version with

FOAM_MEMORY_POOL='host; size=1024; incr=1024' icoFoam

Expected behavior

I would expect a list of potential memory allocators being printed, e.g. 'host' or 'managed' or whatever. I would not expect a raw backtrace.

Compilers & Libraries (please complete the following information):

  • Compiler & version: [e.g. GCC 4.9.3]: g++15
  • CUDA version (if applicable):

Additional context

On MacBook Air, OpenFOAM v2512

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions