Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
398 commits
Select commit Hold shift + click to select a range
5f9c74c
Merge remote-tracking branch 'origin/develop' into refactor/dudes/err…
arng40 Nov 20, 2025
95f631e
uncrust
arng40 Nov 21, 2025
df926d5
remove unecessary var
arng40 Nov 21, 2025
07b649a
doxygen
arng40 Nov 21, 2025
2fee6bf
clean
arng40 Nov 21, 2025
93594af
output only once
arng40 Nov 24, 2025
e430ae8
add "__" prefix
arng40 Nov 24, 2025
d5408c9
doxygen
arng40 Nov 24, 2025
17a394a
remove var duplication
arng40 Nov 24, 2025
061f502
fix format
arng40 Nov 24, 2025
450c3b0
add line number
arng40 Nov 24, 2025
d0ff49d
add stream to errorlogger + rename macro in logger
arng40 Nov 25, 2025
628e49c
reove debug log
arng40 Nov 25, 2025
f09d45f
fix test & cleanup
arng40 Nov 25, 2025
ec1feab
remove unecassery dep
arng40 Nov 25, 2025
419ba18
Merge branch 'develop' into refactor/dudes/error-context
arng40 Nov 26, 2025
9d5db85
fix test
arng40 Nov 27, 2025
2c9d6ce
Merge branch 'refactor/dudes/error-context' of https://github.com/GEO…
arng40 Nov 27, 2025
8708f2d
add geos::exception + refacto flushErrorMsg
arng40 Nov 28, 2025
3842caa
update exception inGEOS_THROW to geos::Exception
arng40 Nov 28, 2025
ae0b73c
update what() method
arng40 Nov 28, 2025
96bab37
remove unecessary cond
arng40 Dec 1, 2025
f47e62e
renaming and remove try catch from main
arng40 Dec 1, 2025
9289b82
add GeosExceptions
arng40 Dec 1, 2025
694e64e
clean up
arng40 Dec 1, 2025
b083853
remove unecessary include + some doc
arng40 Dec 1, 2025
b13149d
Merge remote-tracking branch 'origin/develop' into refactor/dudes/err…
arng40 Dec 1, 2025
e1b45f4
missong doc for GeosException
arng40 Dec 1, 2025
976aab5
include error
arng40 Dec 4, 2025
42c53b9
doxygen
arng40 Dec 4, 2025
16c9e77
update doxy
arng40 Dec 4, 2025
30baf23
remove include, + some clean
arng40 Dec 5, 2025
0aeddcf
fix cuda compil
arng40 Dec 8, 2025
ae60c25
move writeToAscii to cpp
arng40 Dec 8, 2025
5a52a75
doxygen
arng40 Dec 8, 2025
c48c52d
add log test
arng40 Dec 10, 2025
bbb72ff
fix log wrong formatting
arng40 Dec 10, 2025
855cf80
update log formatting & output
arng40 Dec 10, 2025
daec006
fix test
arng40 Dec 10, 2025
ab9895b
Uncrustify
arng40 Dec 10, 2025
60a1f3a
Merge branch 'develop' into refactor/dudes/error-context
arng40 Dec 10, 2025
4e74b00
Merge branch 'develop' into refactor/dudes/error-context
arng40 Dec 17, 2025
08973a3
reorder function + add constructor to ErrorContext
arng40 Dec 19, 2025
cee0059
uncrustify & doxygen
arng40 Dec 19, 2025
2a639a7
Merge branch 'develop' into refactor/dudes/error-context
arng40 Dec 19, 2025
a2b31d1
Merge branch 'develop' into refactor/dudes/error-context
arng40 Dec 22, 2025
d4db78b
improve writeToAscii
arng40 Dec 22, 2025
7df78ff
add context to std::exception
arng40 Dec 22, 2025
ac46643
add loggerReport + separate EnumString
arng40 Dec 23, 2025
745c883
first output still draft
arng40 Dec 23, 2025
ce6a7dd
simplify toString
arng40 Dec 23, 2025
abc6d2a
fix encapsulation in ErrorLogger by adding BuilderPattern + improve c…
arng40 Dec 24, 2025
ec7ddc1
uncrustify
arng40 Dec 24, 2025
dd60826
clean and remove write access to private variable
arng40 Dec 24, 2025
d511e16
Squashed commit of the following:
arng40 Dec 24, 2025
417f3b3
fix after merge
arng40 Dec 24, 2025
4a5b4fe
remove redundant lmsg in case of multiple rank
arng40 Dec 24, 2025
35d8707
missing const
arng40 Dec 24, 2025
aa22991
Squashed commit of the following:
arng40 Dec 24, 2025
dfb0c81
Merge remote-tracking branch 'origin/develop' into feat/dudes/warning…
arng40 Dec 24, 2025
38023c2
delete ErrorMsg method & remove unecessary method in Builder
arng40 Jan 5, 2026
62fcf31
extract inerclass & refacto ErrorBuilder
arng40 Jan 7, 2026
1495a68
rename ErrorMsg & adapt errorLogger function called in catch
arng40 Jan 7, 2026
a4e69cd
modify yaml & renaming & fix
arng40 Jan 8, 2026
16057c1
remove debug log
arng40 Jan 8, 2026
3ed52be
update prepareWhat
arng40 Jan 9, 2026
e40167f
update builder
arng40 Jan 9, 2026
b529d7a
rename get method & sort errorContext
arng40 Jan 9, 2026
ec4703c
remove debug
arng40 Jan 9, 2026
fbed3ed
update format
arng40 Jan 9, 2026
e8682c7
add signal test
arng40 Jan 14, 2026
cf1c00f
update initCurrentExcep + add GeosExcp msg + update test
arng40 Jan 14, 2026
aa9d539
add signal test + last remarks
arng40 Jan 15, 2026
6adbae1
Merge remote-tracking branch 'origin/develop' into refactor/dudes/err…
arng40 Jan 15, 2026
b351784
doxygen
arng40 Jan 15, 2026
588084d
uncristify
arng40 Jan 15, 2026
535e87f
small refacto
arng40 Jan 15, 2026
ff2f3fa
alignment
arng40 Jan 15, 2026
359f256
fix review
arng40 Jan 15, 2026
a942101
relocation
arng40 Jan 15, 2026
b528427
fix signal test
arng40 Jan 15, 2026
5eb71ce
format
arng40 Jan 15, 2026
0a5af00
add mutex
arng40 Jan 16, 2026
048b141
Merge remote-tracking branch 'origin/develop' into feat/dudes/warning…
arng40 Jan 16, 2026
a8e9633
Squashed commit of the following:
arng40 Jan 16, 2026
05e8a6a
revert enum string
arng40 Jan 16, 2026
8e112aa
add log part enum string
arng40 Jan 16, 2026
9a1f1b1
switch row/column
arng40 Jan 19, 2026
ea56eb8
doxygen
arng40 Jan 19, 2026
da560e1
🎨 formating consistency
MelReyCG Jan 19, 2026
456e767
add yaml mutex
arng40 Jan 20, 2026
44a54d8
doxygen
arng40 Jan 20, 2026
6f444d6
thread_local put back + renaming
arng40 Jan 20, 2026
7015589
renaming
arng40 Jan 20, 2026
2a377ea
add logHistory
arng40 Jan 21, 2026
fc43a98
clean up header
arng40 Jan 21, 2026
e15f3d9
fix test for now
arng40 Jan 21, 2026
55e2f96
Merge remote-tracking branch 'origin/refactor/dudes/error-context' in…
arng40 Jan 21, 2026
686a73f
Fix test
arng40 Jan 21, 2026
9f63f96
logHistory doxygen
arng40 Jan 21, 2026
0b0ef4d
doxygen
arng40 Jan 21, 2026
9296d6d
update table reporting test
arng40 Jan 22, 2026
c886b9e
Merge branch 'develop' into refactor/dudes/error-context
MelReyCG Jan 26, 2026
99849aa
🐛simple compil fix
MelReyCG Jan 26, 2026
dd11209
💄adding forgotten space line at end of message
MelReyCG Jan 26, 2026
f3c4bc7
💄small layout proposal
MelReyCG Jan 26, 2026
1cda08b
Merge branch 'develop' into refactor/dudes/error-context
arng40 Jan 27, 2026
d8ef456
uncrustify
arng40 Jan 27, 2026
d6f00ac
Merge branch 'refactor/dudes/error-context' of https://github.com/GEO…
arng40 Jan 27, 2026
3a1983b
Merge branch 'develop' into refactor/dudes/error-context
arng40 Jan 28, 2026
59ad659
attempt clang bug
arng40 Jan 28, 2026
c9d8e44
update rv
arng40 Jan 28, 2026
57fb5bd
structure for getting total errormsg
arng40 Jan 28, 2026
18bf539
add MPI (draft)
arng40 Jan 28, 2026
e6843d8
remove function
arng40 Jan 28, 2026
4298b30
uncr
arng40 Jan 28, 2026
fec93ac
temporary log
arng40 Jan 28, 2026
5932b5c
Merge remote-tracking branch 'origin/refactor/dudes/error-context' in…
arng40 Jan 28, 2026
feaf4c0
1st part packing
arng40 Feb 2, 2026
d764bca
Merge remote-tracking branch 'origin/develop' into feat/dudes/perfora…
arng40 Feb 2, 2026
aa925c7
Merge remote-tracking branch 'origin/develop' into feat/dudes/warning…
arng40 Feb 3, 2026
87a4eec
first attempt new version of log table perforation
arng40 Feb 6, 2026
5638062
doxygen + add const
arng40 Feb 6, 2026
3b7ade4
remove logPerfo header
arng40 Feb 6, 2026
dbee251
revert modif on wellElementSubRegion
arng40 Feb 10, 2026
b6f5ca6
new method to get cell id & region / subregion
arng40 Feb 10, 2026
f10caa5
wip MPI for table perfo
arng40 Feb 10, 2026
7dcac44
Merge remote-tracking branch 'origin/develop' into feat/dudes/perfora…
arng40 Feb 10, 2026
f29df71
MPI gather string - code MPI duplicate with negative pressure cell
arng40 Feb 13, 2026
673eae7
Merge remote-tracking branch 'origin/develop' into feat/dudes/perfora…
arng40 Feb 13, 2026
c09f8bf
Squashed commit of the following:
arng40 Feb 13, 2026
66863a1
1st version mpi table
arng40 Feb 18, 2026
d6128ee
new version mpi table : sorted
arng40 Feb 18, 2026
254f20e
add sorting method
arng40 Feb 20, 2026
4600be3
extract outputLine function
arng40 Feb 20, 2026
bbae597
sorted mpi table
arng40 Feb 20, 2026
77b28da
use sorting method
arng40 Feb 20, 2026
863e969
add test in invert comparator
arng40 Feb 20, 2026
2b80760
fix sort method + doxygen + add rank column
arng40 Feb 20, 2026
012c5a8
setup MPI (draft)
arng40 Feb 23, 2026
5abd889
Merge remote-tracking branch 'origin/develop' into feat/dudes/warning…
arng40 Feb 23, 2026
ea9cd5f
displaying correctly
arng40 Feb 23, 2026
09ceacc
update to unique_ptr
arng40 Feb 24, 2026
e002df7
update smart_ptr buffer to vector< buffer_unit_type >
arng40 Feb 26, 2026
5faba4c
Merge remote-tracking branch 'origin/develop' into feat/dudes/warning…
arng40 Feb 26, 2026
f0efb2a
fix bug
arng40 Feb 27, 2026
8747eb4
gather by tuple
arng40 Feb 27, 2026
e157689
MPI batched by tuple
arng40 Feb 27, 2026
84fab9b
remove unecessary code / include
arng40 Feb 27, 2026
3133435
remove enumString from logPart
arng40 Feb 27, 2026
28eedf4
clean up & doxygen
arng40 Mar 2, 2026
054bef0
add log part and remove import
arng40 Mar 2, 2026
c72cd76
errorContext => diagnosticContext
arng40 Mar 2, 2026
3bd0dfc
Merge remote-tracking branch 'origin/develop' into feat/dudes/warning…
arng40 Mar 2, 2026
ff38be6
uncrustify + doxygen
arng40 Mar 2, 2026
e55a445
remove uneccesary ";"
arng40 Mar 2, 2026
c32d8eb
uniformize default allocator
arng40 Mar 2, 2026
a923dfd
fix logHistory hash + revert stdContainer default bound checking
arng40 Mar 2, 2026
10df7ad
uniformize test
arng40 Mar 2, 2026
45753f0
setbounds checking to off for realease
arng40 Mar 2, 2026
1ee6c7b
revert ci and let realease to false
arng40 Mar 2, 2026
0cfb65e
test debbuging
arng40 Mar 3, 2026
7c4a220
Merge remote-tracking branch 'origin/develop' into feat/dudes/warning…
arng40 Mar 3, 2026
00865f4
include manually
arng40 Mar 3, 2026
c0343fa
same for fixedsizequeue
arng40 Mar 3, 2026
fa00c7d
comment geos
arng40 Mar 3, 2026
aed8db1
remove files
arng40 Mar 3, 2026
3020d1b
addRow template
arng40 Mar 3, 2026
d563192
revert on stdVectorWrapper
arng40 Mar 3, 2026
edd7100
reset default allocator
arng40 Mar 3, 2026
73ccf6a
comment suspect line
arng40 Mar 3, 2026
c7332ee
function def
arng40 Mar 3, 2026
f851adc
remove using fromm cpp
arng40 Mar 3, 2026
1b724b1
test
arng40 Mar 3, 2026
564b8dc
add assert
arng40 Mar 3, 2026
d112ef6
remove default value from useboundchecking
arng40 Mar 3, 2026
872c04e
remove static_assart
arng40 Mar 3, 2026
21ddd3b
revert modif
arng40 Mar 3, 2026
fe76e62
remove circular dep
arng40 Mar 4, 2026
98762f0
comment file
arng40 Mar 4, 2026
440beca
make add row template
arng40 Mar 4, 2026
0481762
remove pack functions
arng40 Mar 4, 2026
aad10c4
wip create a logRecord
arng40 Mar 6, 2026
f9d2501
some renaming and logical update
arng40 Mar 9, 2026
edcf4f8
address comment
arng40 Mar 9, 2026
f966ebb
improve readability
arng40 Mar 9, 2026
9f31612
fix desrialization
arng40 Mar 9, 2026
d458668
doxygen + some renaming
arng40 Mar 9, 2026
171b278
fix reinterpret_cast
arng40 Mar 9, 2026
c6177ab
log record private & removed log part from argument
arng40 Mar 11, 2026
115a23e
set logPart to diagnosticMsg
arng40 Mar 11, 2026
7c89805
Merge remote-tracking branch 'origin/develop' into feat/dudes/warning…
arng40 Mar 11, 2026
72c0bc7
update addRow<CellData>
arng40 Mar 11, 2026
1027ff2
adress review ( doc + logic )
arng40 Mar 12, 2026
ff7e66d
remove mpi code
arng40 Mar 12, 2026
183e0fe
add operator and missing doc
arng40 Mar 12, 2026
ef3e09c
Merge remote-tracking branch 'origin/develop' into feat/dudes/perfora…
arng40 Mar 12, 2026
de4c9e7
doc
arng40 Mar 12, 2026
6a010ae
add gatherBuffer to MPIWrapper
arng40 Mar 13, 2026
db2ac84
Merge remote-tracking branch 'origin/develop' into feat/dudes/warning…
arng40 Mar 13, 2026
0261d8f
refactor gatherString using gatherBuffer
arng40 Mar 13, 2026
86e5cd7
fix test
arng40 Mar 13, 2026
6d1a918
fix typo remove unused header
arng40 Mar 13, 2026
9c9fdd1
minor clean
arng40 Mar 13, 2026
805c7b1
ranaming, reorg variable first step
arng40 Mar 13, 2026
7400922
some cleanup
arng40 Mar 13, 2026
d2925fb
doxygen
arng40 Mar 16, 2026
ebdadd8
Improve structure 🎨
arng40 Mar 16, 2026
b0eb0f6
Remove code :fire:
arng40 Mar 16, 2026
57d5802
Fix a bug. :bug:
arng40 Mar 16, 2026
ec41004
Merge remote-tracking branch 'origin/develop' into feat/dudes/perfora…
arng40 Mar 16, 2026
556b5e5
Merge remote-tracking branch 'origin/develop' into feat/dudes/warning…
arng40 Mar 17, 2026
ccdcad5
:rewind: default allocator stdWrapper
arng40 Mar 17, 2026
ca1c677
:rewind: revert logger
arng40 Mar 17, 2026
16a662b
:heavy_plus_sign: add logger to scotch
arng40 Mar 17, 2026
a06b548
Merge branch 'develop' into feat/dudes/perforations-table-detail
arng40 Mar 17, 2026
bf74177
:green_heart: doxygen & uncrustify
arng40 Mar 17, 2026
763103a
:green_heart: uncrustify
arng40 Mar 17, 2026
94f4209
:green_heart: uncrustify
arng40 Mar 17, 2026
bfdf8c5
:lipstick: set rank column to the right
arng40 Mar 18, 2026
d15042d
:label: renaming & cde style
arng40 Mar 19, 2026
44ac609
Squashed commit of the following:
arng40 Mar 19, 2026
824deb6
Squashed commit of the following:
arng40 Mar 19, 2026
d340530
:construction: serialization/deserialisation cellData
arng40 Mar 20, 2026
78db217
:construction: remove packing function and set custom function
arng40 Mar 20, 2026
6f3c199
:art: add tableData serialization
arng40 Mar 25, 2026
bd75852
:hammer: update tableData gathering
arng40 Mar 25, 2026
d47c187
:hammer: update reservoirElementGlobalIndex default value
arng40 Mar 25, 2026
642c3b5
:fire: remove log
arng40 Mar 25, 2026
17deec4
:sparkles: add sorted function to tableData
arng40 Mar 25, 2026
341ad11
:label: namespace renaming
arng40 Mar 25, 2026
ff68563
:lock: add control for table
arng40 Mar 26, 2026
ccfbccf
:hammer: fix testMPI after merge conflict
arng40 Mar 26, 2026
52cc123
:bug: Use MPI for tableData control
arng40 Mar 26, 2026
1eb61c0
:rewind: revert outputLines
arng40 Mar 26, 2026
d79852f
:green_heart: uncrustfy
arng40 Mar 26, 2026
b045e50
:art: move gatherString to hpp
arng40 Mar 26, 2026
552229b
:coffin: include
arng40 Mar 26, 2026
47013b2
:recycle: simplify MPI guard
arng40 Mar 26, 2026
e7f1439
:art: remove template
arng40 Mar 26, 2026
ae56cb4
:building_construction: create namespace for serialization
arng40 Mar 26, 2026
632edd7
:art: Improve struct
arng40 Mar 26, 2026
73c7a37
:coffin: remove dead code
arng40 Mar 26, 2026
49d72e0
:coffin: rmove serial from tableData
arng40 Mar 26, 2026
c567f23
:art: format doxy
arng40 Mar 26, 2026
79c9ee2
:bug: fix deserialisation string bug
arng40 Mar 26, 2026
2940af6
:construction: serialization ( will be removed )
arng40 Mar 27, 2026
cdc533c
:memo: update doc
arng40 Mar 27, 2026
89110c9
Merge remote-tracking branch 'origin/feat/dudes/perforations-table-de…
arng40 Mar 27, 2026
35a7d76
:fire: remove logHistory serialization & duplication from merging
arng40 Mar 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 41 additions & 41 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,47 +150,47 @@ jobs:
fail-fast : false
matrix:
include:
- name: Ubuntu (20.04, gcc 9.4.0, open-mpi 4.0.3)
CMAKE_BUILD_TYPE: Release
DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9
BUILD_SHARED_LIBS: ON
ENABLE_HYPRE: OFF
ENABLE_TRILINOS: ON
GEOS_ENABLE_BOUNDS_CHECK: ON
HOST_CONFIG: /spack-generated.cmake

- name: Ubuntu debug (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces
BUILD_AND_TEST_CLI_ARGS: "--no-run-unit-tests"
CMAKE_BUILD_TYPE: Debug
DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10
BUILD_SHARED_LIBS: ON
ENABLE_HYPRE: OFF
ENABLE_TRILINOS: ON
GEOS_ENABLE_BOUNDS_CHECK: ON
RUNS_ON: streak2
NPROC: 8
DOCKER_RUN_ARGS: "--cpus=8 --memory=256g --runtime=nvidia -v /etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro -v /etc/pki/tls/certs/ca-bundle.crt:/certs/ca-bundle.crt:ro"

HOST_CONFIG: /spack-generated.cmake

- name: Ubuntu (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces
CMAKE_BUILD_TYPE: Release
DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10
BUILD_SHARED_LIBS: ON
ENABLE_HYPRE: OFF
ENABLE_TRILINOS: ON
GEOS_ENABLE_BOUNDS_CHECK: ON
HOST_CONFIG: /spack-generated.cmake

- name: Ubuntu (22.04, gcc 11.4.0, open-mpi 4.1.2)
CMAKE_BUILD_TYPE: Release
DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc11
ENABLE_HYPRE: ON
ENABLE_TRILINOS: OFF
BUILD_SHARED_LIBS: ON
GEOS_ENABLE_BOUNDS_CHECK: OFF
GCP_BUCKET: geosx/ubuntu22.04-gcc11
HOST_CONFIG: /spack-generated.cmake
# - name: Ubuntu (20.04, gcc 9.4.0, open-mpi 4.0.3)
# CMAKE_BUILD_TYPE: Release
# DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9
# BUILD_SHARED_LIBS: ON
# ENABLE_HYPRE: OFF
# ENABLE_TRILINOS: ON
# GEOS_ENABLE_BOUNDS_CHECK: ON
# HOST_CONFIG: /spack-generated.cmake

# - name: Ubuntu debug (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces
# BUILD_AND_TEST_CLI_ARGS: "--no-run-unit-tests"
# CMAKE_BUILD_TYPE: Debug
# DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10
# BUILD_SHARED_LIBS: ON
# ENABLE_HYPRE: OFF
# ENABLE_TRILINOS: ON
# GEOS_ENABLE_BOUNDS_CHECK: ON
# RUNS_ON: streak2
# NPROC: 8
# DOCKER_RUN_ARGS: "--cpus=8 --memory=256g --runtime=nvidia -v /etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro -v /etc/pki/tls/certs/ca-bundle.crt:/certs/ca-bundle.crt:ro"

# HOST_CONFIG: /spack-generated.cmake

# - name: Ubuntu (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces
# CMAKE_BUILD_TYPE: Release
# DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10
# BUILD_SHARED_LIBS: ON
# ENABLE_HYPRE: OFF
# ENABLE_TRILINOS: ON
# GEOS_ENABLE_BOUNDS_CHECK: OFF
# HOST_CONFIG: /spack-generated.cmake

# - name: Ubuntu (22.04, gcc 11.4.0, open-mpi 4.1.2)
# CMAKE_BUILD_TYPE: Release
# DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc11
# ENABLE_HYPRE: ON
# ENABLE_TRILINOS: OFF
# BUILD_SHARED_LIBS: ON
# GEOS_ENABLE_BOUNDS_CHECK: OFF
# GCP_BUCKET: geosx/ubuntu22.04-gcc11
# HOST_CONFIG: /spack-generated.cmake

- name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2)
CMAKE_BUILD_TYPE: Release
Expand Down
5 changes: 5 additions & 0 deletions src/coreComponents/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ set( common_headers
GEOS_RAJA_Interface.hpp
GeosxMacros.hpp
MemoryInfos.hpp
logger/DiagnosticMessage.hpp
logger/GeosExceptions.hpp
logger/GeosExceptions.hpp
logger/Logger.hpp
logger/ErrorHandling.hpp
logger/ExternalErrorHandler.hpp
logger/LogHistory.hpp
MpiWrapper.hpp
Path.hpp
Span.hpp
Expand Down Expand Up @@ -72,6 +75,7 @@ endif( )
# Specify all sources
#
set( common_sources
format/EnumStrings.cpp
format/table/TableData.cpp
format/table/TableFormatter.cpp
format/table/TableLayout.cpp
Expand All @@ -82,6 +86,7 @@ set( common_sources
logger/Logger.cpp
logger/ErrorHandling.cpp
logger/ExternalErrorHandler.cpp
logger/LogHistory.cpp
BufferAllocator.cpp
MemoryInfos.cpp
MpiWrapper.cpp
Expand Down
20 changes: 20 additions & 0 deletions src/coreComponents/common/MpiWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,26 @@ int MpiWrapper::nodeCommSize()
return nodeCommSize;
}

void MpiWrapper::gatherStringOnRank0( string_view rankStr, std::function< void(string_view) > && func )
{
std::vector< buffer_unit_type > localbuffer;
localbuffer.reserve( rankStr.size());
localbuffer.insert( localbuffer.end(), rankStr.begin(), rankStr.end());
auto [globalLogRecords, counts, offsets] =
MpiWrapper::gatherBufferRank0< std::vector< buffer_unit_type > >( localbuffer );
if( MpiWrapper::commRank() == 0 )
{
for( integer rankId = 0; rankId < MpiWrapper::commSize(); ++rankId )
{
if( counts[rankId] > 0 )
{
func( string( globalLogRecords.begin() + offsets[rankId],
globalLogRecords.begin() + offsets[rankId]+ counts[rankId] ) );
}
}
}
}

namespace internal
{

Expand Down
82 changes: 82 additions & 0 deletions src/coreComponents/common/MpiWrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,88 @@ struct MpiWrapper
*/
static int nodeCommSize();

/**
* @brief Structure holding the result from all the gather operation
* @tparam CONTAINER The container type holding the data.
* The underlying storage in CONTAINER must be contiguous
*/
template< typename CONTAINER >
struct GatherResult
{
// Collected data who must be trivially copyable
CONTAINER data;
// Number of elements per row
stdVector< integer > counts;
// Starting index for each row in 'data'
stdVector< integer > offsets;
};

/**
* @brief Gather buffers of varying sizes from all ranks to rank 0.
* @tparam CONTAINER The container type holding the data.
* @tparam VALUE_T The trivially copyable underlying data type (deduced automatically).
* @param localBuffer The local buffer to be gathered on rank 0.
* @return A struct containing:
* - 'data': all the gathered data on rank 0
* - 'counts': number of elements for each rank
* - 'offsets': starting index for each rank in 'data'
*/
template<
typename CONTAINER,
typename VALUE_T = typename CONTAINER::value_type,
typename = std::enable_if_t<
std::is_trivially_copyable_v< VALUE_T > &&
std::is_same_v< decltype(std::declval< CONTAINER >().data()), VALUE_T * > &&
std::is_same_v< decltype(std::declval< CONTAINER >().size()), std::size_t >
>
>
static GatherResult< CONTAINER >
gatherBufferRank0( CONTAINER const & localBuffer )
{
integer const numRanks = MpiWrapper::commSize();
integer const numLocalValues = static_cast< integer >(localBuffer.size());

GatherResult< CONTAINER > gatherResult;

if( MpiWrapper::commRank() == 0 )
{
gatherResult.counts.resize( numRanks );
gatherResult.offsets.resize( numRanks );
}


MpiWrapper::gather( &numLocalValues, 1, gatherResult.counts.data(), 1, 0 );

if( MpiWrapper::commRank() == 0 )
{
integer totalSize = 0;
for( integer i = 0; i < numRanks; ++i )
{
gatherResult.offsets[i] = totalSize;
totalSize += gatherResult.counts[i];
}
gatherResult.data.resize( totalSize );
}

MpiWrapper::gatherv( localBuffer.data(),
numLocalValues,
gatherResult.data.data(),
gatherResult.counts.data(),
gatherResult.offsets.data(),
0 );

return gatherResult;
}

/**
* @brief Gather srting from all ranks to rank 0
* @tparam FUNC Callable type invoked as void(string_view) for each non-empty rank string.
* @param str The local string to send from the calling rank.
* @param func Callback invoked on rank 0 for each non-empty received string.
*/
static void gatherStringOnRank0( string_view str,
std::function< void(string_view) > && func );

/**
* @brief Strongly typed wrapper around MPI_Allgather.
* @tparam T_SEND The pointer type for \p sendbuf
Expand Down
42 changes: 42 additions & 0 deletions src/coreComponents/common/format/EnumStrings.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* ------------------------------------------------------------------------------------------------------------
* SPDX-License-Identifier: LGPL-2.1-only
*
* Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
* Copyright (c) 2018-2024 TotalEnergies
* Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
* Copyright (c) 2023-2024 Chevron
* Copyright (c) 2019- GEOS/GEOSX Contributors
* All rights reserved
*
* See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
* ------------------------------------------------------------------------------------------------------------
*/

/**
* @file EnumStrings.cpp
*/

#include "common/format/EnumStrings.hpp"
#include "common/logger/Logger.hpp"

namespace geos
{

void internal::EnumErrorMessageToString( size_t index,
string_view typeName,
std::size_t size )
{
GEOS_THROW( "Invalid value " << index << " of type " << typeName<< ". Valid range is 0.." << size - 1,
InputError );
}

void internal::EnumErrorMessageFromString( string_view s,
string_view typeName,
string_view concat )
{
GEOS_THROW( "Invalid value '" << s << "' of type " << typeName << ". Valid options are: " << concat,
InputError );
}

}
40 changes: 27 additions & 13 deletions src/coreComponents/common/format/EnumStrings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "common/format/StringUtilities.hpp"
// #include "codingUtilities/RTTypes.hpp"
#include "common/DataTypes.hpp"
#include "common/logger/Logger.hpp"
#include "common/format/Format.hpp"

#include <iostream>
Expand All @@ -40,6 +39,25 @@ namespace geos

namespace internal
{

/**
* @brief Raise a throw error in case of bad use of enum::toString
* @param index The index of the enum causing the error
* @param typeName The enum name
* @param size The size of the enum
*/
void EnumErrorMessageToString( size_t index, string_view typeName, std::size_t size );

/**
* @brief Raise a throw error in case of bad use of enum::FromString
* @param s The string that not belonging to the enum
* @param typeName The enum name
* @param size The string concatenation of the enum
*/
void EnumErrorMessageFromString( string_view s,
string_view typeName,
string_view concat );

/**
* @brief Simple compile-time variadic function that counts its arguments.
* @tparam ARGS variadic pack of argument types
Expand Down Expand Up @@ -152,12 +170,10 @@ struct EnumStrings
auto const & strings = get();
std::size_t size = std::distance( std::begin( strings ), std::end( strings ) );
base_type const index = static_cast< base_type >( e );
GEOS_THROW_IF( index >= LvArray::integerConversion< base_type >( size ),
GEOS_FMT( "Invalid value {} of type {}. Valid range is 0..{}",
index,
getEnumTypeNameString( enum_type{} ),
size - 1 ),
InputError );
if( index >= LvArray::integerConversion< base_type >( size ))
{
internal::EnumErrorMessageToString( index, getEnumTypeNameString( enum_type{} ), size - 1 );
}
return strings[ index ];
}

Expand All @@ -170,12 +186,10 @@ struct EnumStrings
{
auto const & strings = get();
auto const it = std::find( std::begin( strings ), std::end( strings ), s );
GEOS_THROW_IF( it == std::end( strings ),
GEOS_FMT( "Invalid value '{}' of type {}. Valid options are: {}",
s,
getEnumTypeNameString( enum_type{} ),
concat( ", " ) ),
InputError );
if( it == std::end( strings ))
{
internal::EnumErrorMessageFromString( s, getEnumTypeNameString( enum_type{} ), EnumStrings::concat( ", " ));
}
enum_type const e = static_cast< enum_type >( LvArray::integerConversion< base_type >( std::distance( std::begin( strings ), it ) ) );
return e;
}
Expand Down
10 changes: 7 additions & 3 deletions src/coreComponents/common/format/LogPart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,22 @@

#include "LogPart.hpp"
#include "common/format/StringUtilities.hpp"
#include "common/logger/ErrorHandling.hpp"
#include <algorithm>

using namespace geos::stringutilities;
namespace geos
{

LogPart::LogPart( string_view logPartTitle, bool enableOutput )
LogPart::LogPart( string_view logpartName, bool enableOutput )
{
m_formattedStartDescription.m_title = logPartTitle;
m_formattedEndDescription.m_title = GEOS_FMT( "{}{}", m_prefixEndTitle, logPartTitle );
m_formattedStartDescription.m_title = logpartName;
m_formattedEndDescription.m_title = GEOS_FMT( "{}{}", m_prefixEndTitle, logpartName );

m_enableOutput = enableOutput;

ErrorLogger::global().setCurrentLogPart( std::string( logpartName ) );

}

void LogPart::addDescription( string_view description )
Expand Down
3 changes: 1 addition & 2 deletions src/coreComponents/common/format/LogPart.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
#ifndef GEOS_COMMON_FORMAT_LOGPART_HPP
#define GEOS_COMMON_FORMAT_LOGPART_HPP

#include "common/DataTypes.hpp"
#include "common/format/Format.hpp"
#include "common/format/StringUtilities.hpp"
#include "common/format/Format.hpp"

namespace geos
{
Expand Down
Loading
Loading