Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
d764bca
Merge remote-tracking branch 'origin/develop' into feat/dudes/perfora…
arng40 Feb 2, 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
ff7e66d
remove mpi code
arng40 Mar 12, 2026
ef3e09c
Merge remote-tracking branch 'origin/develop' into feat/dudes/perfora…
arng40 Mar 12, 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
a06b548
Merge branch 'develop' into feat/dudes/perforations-table-detail
arng40 Mar 17, 2026
763103a
: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
ecef467
:green_heart: fix CI build
arng40 Mar 27, 2026
bdc15ec
:truck: move declaration outside hpp
arng40 Mar 27, 2026
81a96b2
:coffin: :label: remove dead code, update types
arng40 Mar 30, 2026
7d6249d
:art: update perdoration sorting cond
arng40 Mar 30, 2026
935d117
:art: improve testMpiTable Cond
arng40 Mar 30, 2026
a302088
🎨 spaces
MelReyCG Mar 30, 2026
1181253
:art: added boolean array for perfo availibility
arng40 Mar 30, 2026
23a5694
Merge branch 'develop' into feat/dudes/perforations-table-detail
MelReyCG Mar 30, 2026
17538bd
:recycle: relocated in perfo data + renaming
arng40 Mar 30, 2026
0d22428
Merge branch 'feat/dudes/perforations-table-detail' of https://github…
arng40 Mar 30, 2026
ba863d7
Merge branch 'develop' into feat/dudes/perforations-table-detail
arng40 Mar 31, 2026
ee7d7da
:bug: local scope for globalWellElemIndices
arng40 Mar 31, 2026
55aff05
Merge branch 'feat/dudes/perforations-table-detail' of https://github…
arng40 Mar 31, 2026
dfe0619
:art: format code
arng40 Mar 31, 2026
b962b2c
:coffin: dead code & spaces
arng40 Mar 31, 2026
854c07d
🎨 doc & warning updated
arng40 Mar 31, 2026
1e1176e
:bug: fix typo
arng40 Mar 31, 2026
eefa8aa
:bug: fix warning
arng40 Mar 31, 2026
f83574c
:art: update doc
arng40 Mar 31, 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
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
86 changes: 86 additions & 0 deletions src/coreComponents/common/MpiWrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,53 @@ 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 which must be trivially copyable
CONTAINER data;
// Number of elements per rank
stdVector< integer > counts;
// Starting index for each rank 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 );

/**
* @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 Expand Up @@ -978,6 +1025,45 @@ inline MPI_Op MpiWrapper::getMpiOp( Reduction const op )
}
}

template< typename CONTAINER, typename VALUE_T, typename >
MpiWrapper::GatherResult< CONTAINER >
MpiWrapper::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;
}

template< typename T_SEND, typename T_RECV >
int MpiWrapper::allgather( T_SEND const * const sendbuf,
int sendcount,
Expand Down
135 changes: 134 additions & 1 deletion src/coreComponents/common/format/table/TableData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,81 @@ TableData & TableData::operator=( TableData const & other )

bool TableData::operator<( TableData const & other ) const
{
return m_rows < other.m_rows;
if( other.getCellsData().size()!= getCellsData().size())
return false;

for( size_t i = 0; i < getCellsData().size(); i++ )
{
if( getCellsData()[i].data()->value > other.getCellsData()[i].data()->value )
return false;
}
return true;
}

bool TableData::operator==( TableData const & comparingTable ) const
{
if( comparingTable.getCellsData().size()!= getCellsData().size())
return false;
for( size_t i = 0; i < getCellsData().size(); i++ )
{
if( getCellsData()[i].data()->value != comparingTable.getCellsData()[i].data()->value )
return false;
}
return true;
}

void TableData::CellData::serialize( stdVector< buffer_unit_type > & out ) const
{
basicSerialization::serializePrimitive( type, out );
basicSerialization::serializeString( value, out );
}


size_t TableData::CellData::getSerializedSize() const
{
return basicSerialization::sizeOfPrimitive( type ) + basicSerialization::sizeOfString( value );
}

size_t TableData::getSerializedSize() const
{
size_t totalSize =0;

if( m_rows.empty())
return totalSize;

for( auto & row : m_rows )
{
size_t rowSize = 0;
for( auto & cell : row )
{
rowSize += cell.getSerializedSize();
}
totalSize += sizeof(size_t) + rowSize;
}
return totalSize;
}

void TableData::serialize( stdVector< buffer_unit_type > & serializedTableData ) const
{
if( m_rows.empty())
return;

for( auto & row : m_rows )
{
{ // pack row size;
size_t rowSize = 0;
for( auto const & cell : row )
rowSize += cell.getSerializedSize();
basicSerialization::serializePrimitive( rowSize, serializedTableData );
}

{ // pack cells
for( auto const & cell : row )
{
cell.serialize( serializedTableData );
}
}
}
}


Expand Down Expand Up @@ -180,4 +254,63 @@ TableData2D::TableDataHolder TableData2D::buildTableData( string_view targetUnit

return tableData1D;
}

void basicSerialization::serializeString ( string const & data, stdVector< buffer_unit_type > & out )
{
basicSerialization::serializePrimitive( data.size(), out );
auto * begin = data.data();
auto * end = begin + data.size();
out.insert( out.end(), begin, end );
}

void basicSerialization::deserializeString( string & str, buffer_unit_type const * & ptr, buffer_unit_type const * end )
{
string::size_type strSize = 0;
basicSerialization::deserializePrimitive( strSize, ptr, end );
if( static_cast< long >(strSize) > std::distance( ptr, end ) )
{
throw std::runtime_error( "buffer overflow reading string" );
}
str.assign( ptr, ptr + strSize );
ptr += str.size();
}

bool tableDataSorting::positiveNumberStringComp( string_view s1, string_view s2 )
{
auto split = []( string_view s, string & intPart, string & decPart )
{
size_t dotPos = s.find( '.' );
if( dotPos == string::npos )
{
intPart = s;
decPart = "";
}
else
{
intPart = s.substr( 0, dotPos );
decPart = s.substr( dotPos + 1 );
}
};

string s1Int, s1Dec, s2Int, s2Dec;
split( s1, s1Int, s1Dec );
split( s2, s2Int, s2Dec );

if( s1Int.length() != s2Int.length())
return s1Int.length() < s2Int.length();

if( s1Int != s2Int )
return s1Int < s2Int;

size_t minLen = std::min( s1Dec.length(), s2Dec.length());
for( size_t i = 0; i < minLen; ++i )
{
if( s1Dec[i] != s2Dec[i] )
return s1Dec[i] < s2Dec[i];
}


return false;
}

}
Loading
Loading