diff --git a/bin/mpirunDebug b/bin/mpirunDebug index f94018d4e4..042edb013a 100755 --- a/bin/mpirunDebug +++ b/bin/mpirunDebug @@ -24,7 +24,6 @@ . "${WM_PROJECT_DIR:?}"/bin/tools/RunFunctions # Run functions printHelp() { - exec 1>&2 cat< @@ -203,7 +202,7 @@ do # Processing application arguments case "$1" in - (-help* | --help*) usage ;; + (-help* | --help*) printHelp ;; ('') ;; ## Ignore junk (-np) @@ -235,15 +234,16 @@ done # Cleanup only if [ -n "$optClean" ] then - echo "Cleanup old mpirunDebug files..." 1>&2 - rm -f gdbCommands mpirun.schema - rm -rf mpirun.log mpirun.files + exec 1>&2 + echo "Cleanup old mpirunDebug files..." + rm -f gdbCommands mpirun.schema vgcore.* rm -f processor*.log processor*.sh - echo " gdbCommands mpirun.schema" 1>&2 - echo " mpirun.{files,log}/" 1>&2 - echo " processor*.{log,sh}" 1>&2 - echo "Done" 1>&2 - exit 0 + rm -rf mpirun.log mpirun.files + echo " gdbCommands mpirun.schema vgcore.*" + echo " processor*.{log,sh}" + echo " mpirun.{files,log}/" + echo "Done" + exit 0 # A clean exit fi @@ -344,12 +344,15 @@ esac echo "**sourceFoam: $sourceFoam" 1>&2 -rm -f ./mpirun.schema -touch ./mpirun.schema - mkdir -p ./mpirun.files mkdir -p ./mpirun.log +schema_file="$PWD/mpirun.files/mpirun.schema" + +rm -f "$schema_file" +touch "$schema_file" + + proc=0 xpos=0 ypos=0 @@ -374,8 +377,8 @@ COMMANDS # Add to the mpirun.schema case "$method" in - (*xterm*) echo "${node}${xterm} -e ${procCmdFile}" >> "$PWD"/mpirun.schema ;; - (*) echo "${node}${procCmdFile}" >> "$PWD"/mpirun.schema ;; + (*xterm*) echo "${node}${xterm} -e ${procCmdFile}" >> "$schema_file" ;; + (*) echo "${node}${procCmdFile}" >> "$schema_file" ;; esac case "$method" in @@ -421,17 +424,33 @@ COMMANDS fi done -for ((proc=0; proc<$nProcs; proc++)) -do - procLog="mpirun.log/processor${proc}.log" - echo " tail -f $procLog" 1>&2 -done + +if [ "$nProcs" -lt 10 ] +then + for ((proc = 0; proc < $nProcs; proc++)) + do + procLog="mpirun.log/processor${proc}.log" + echo " tail -f $procLog" 1>&2 + done +else + for ((proc = 0; proc < 4; proc++)) + do + procLog="mpirun.log/processor${proc}.log" + echo " tail -f $procLog" 1>&2 + done + echo " ..." 1>&2 + for ((proc = $nProcs-2; proc < $nProcs; proc++)) + do + procLog="mpirun.log/processor${proc}.log" + echo " tail -f $procLog" 1>&2 + done +fi unset cmd case "$WM_MPLIB" in *OPENMPI*) - cmd="mpirun --oversubscribe -app $PWD/mpirun.schema &2 -echo "Constructed $PWD/mpirun.schema file:" 1>&2 +echo "Constructed $schema_file file:" 1>&2 echo 1>&2 echo " $cmd" 1>&2 echo 1>&2 diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamCombineGather.C b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamCombineGather.C index ca86325537..911bc8ebb8 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamCombineGather.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamCombineGather.C @@ -182,8 +182,7 @@ void Foam::Pstream::listCombineGather ( UPstream::commsTypes::scheduled, belowID, - received.data_bytes(), - received.size_bytes(), + received, tag, comm ); @@ -239,8 +238,7 @@ void Foam::Pstream::listCombineGather ( UPstream::commsTypes::scheduled, myComm.above(), - values.cdata_bytes(), - values.size_bytes(), + values, tag, comm ); diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamGatherList.C b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamGatherList.C index add213e7a3..267d3d1c98 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamGatherList.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamGatherList.C @@ -80,8 +80,7 @@ void Foam::Pstream::gatherList ( UPstream::commsTypes::scheduled, belowID, - received.data_bytes(), - received.size_bytes(), + received, tag, comm ); @@ -155,8 +154,7 @@ void Foam::Pstream::gatherList ( UPstream::commsTypes::scheduled, myComm.above(), - sending.cdata_bytes(), - sending.size_bytes(), + sending, tag, comm ); @@ -231,8 +229,7 @@ void Foam::Pstream::scatterList ( UPstream::commsTypes::scheduled, myComm.above(), - received.data_bytes(), - received.size_bytes(), + received, tag, comm ); @@ -286,8 +283,7 @@ void Foam::Pstream::scatterList ( UPstream::commsTypes::scheduled, belowID, - sending.cdata_bytes(), - sending.size_bytes(), + sending, tag, comm ); diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C index c0dae071f9..9553a4bb73 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C @@ -94,7 +94,7 @@ static List getHostGroupIds(const label parentCommunicator) ( myDigest.cdata_bytes(), // Send digests.data_bytes(), // Recv - SHA1Digest::max_size(), // Num send/recv data per rank + SHA1Digest::size_bytes(), // Num send/recv data per rank parentCommunicator ); diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H index 089d7b6e82..e737bc71ff 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2015-2024 OpenCFD Ltd. + Copyright (C) 2015-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -99,6 +99,9 @@ public: //- Wrapper for MPI_Request class Request; // Forward Declaration + //- Wrapper for MPI_Win + class Window; // Forward Declaration + //- Structure for communicating between processors class commsStruct { @@ -1462,6 +1465,12 @@ UList::operator[](const label procID) const; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Traits, nested classes etc +#include "UPstreamTraits.H" +#include "UPstreamWindow.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #ifdef NoRepository #include "UPstreamTemplates.C" #endif diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstreamTraits.H b/src/OpenFOAM/db/IOstreams/Pstreams/UPstreamTraits.H new file mode 100644 index 0000000000..188d3db643 --- /dev/null +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstreamTraits.H @@ -0,0 +1,46 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2025 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Description + A set of traits associated with UPstream communication + +SourceFiles + +\*---------------------------------------------------------------------------*/ + +#ifndef Foam_UPstreamTraits_H +#define Foam_UPstreamTraits_H + +#include "UPstream.H" +#include +#include // For streamsize + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstreamWindow.H b/src/OpenFOAM/db/IOstreams/Pstreams/UPstreamWindow.H new file mode 100644 index 0000000000..aa3ef233f8 --- /dev/null +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstreamWindow.H @@ -0,0 +1,152 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2025 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::UPstream::Window + +Description + An opaque wrapper for MPI_Win with a vendor-independent + representation and without any \c header dependency. + +Note + The MPI standard states that MPI_Win is always an opaque object. + Generally it is either an integer (eg, mpich) or a pointer (eg, openmpi). + +SourceFiles + +\*---------------------------------------------------------------------------*/ + +#ifndef Foam_UPstreamWindow_H +#define Foam_UPstreamWindow_H + +#include "UPstream.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class UPstream::Window Declaration +\*---------------------------------------------------------------------------*/ + +class UPstream::Window +{ +public: + + // Public Types + + //- Storage for MPI_Win (as integer or pointer) + typedef std::intptr_t value_type; + + +private: + + // Private Data + + //- The MPI_Win (as wrapped value) + value_type value_; + +public: + + // Generated Methods + + //- Copy construct + Window(const Window&) noexcept = default; + + //- Move construct + Window(Window&&) noexcept = default; + + //- Copy assignment + Window& operator=(const Window&) noexcept = default; + + //- Move assignment + Window& operator=(Window&&) noexcept = default; + + + // Member Operators + + //- Test for equality + bool operator==(const Window& rhs) const noexcept + { + return (value_ == rhs.value_); + } + + //- Test for inequality + bool operator!=(const Window& rhs) const noexcept + { + return (value_ != rhs.value_); + } + + + // Constructors + + //- Default construct as MPI_WIN_NULL + Window() noexcept; + + //- Construct from MPI_Win (as pointer type) + explicit Window(const void* p) noexcept + : + value_(reinterpret_cast(p)) + {} + + //- Construct from MPI_Win (as integer type) + explicit Window(value_type val) noexcept + : + value_(val) + {} + + + // Member Functions + + // Basic handling + + //- Return raw value + value_type value() const noexcept { return value_; } + + //- Return as pointer value + const void* pointer() const noexcept + { + return reinterpret_cast(value_); + } + + //- True if not equal to MPI_WIN_NULL + bool good() const noexcept; + + //- Reset to default constructed value (MPI_WIN_NULL) + void reset() noexcept; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C index 2d0e1bd140..554b8a4685 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2020-2023 OpenCFD Ltd. + Copyright (C) 2020-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -113,8 +113,7 @@ void Foam::processorCyclicPointPatchField::initSwapAddSeparated ( commsType, procPatch_.neighbProcNo(), - recvBuf_.data_bytes(), - recvBuf_.size_bytes(), + recvBuf_, procPatch_.tag(), procPatch_.comm() ); @@ -123,8 +122,7 @@ void Foam::processorCyclicPointPatchField::initSwapAddSeparated ( commsType, procPatch_.neighbProcNo(), - sendBuf_.cdata_bytes(), - sendBuf_.size_bytes(), + sendBuf_, procPatch_.tag(), procPatch_.comm() ); @@ -150,8 +148,7 @@ void Foam::processorCyclicPointPatchField::swapAddSeparated ( commsType, procPatch_.neighbProcNo(), - recvBuf_.data_bytes(), - recvBuf_.size_bytes(), + recvBuf_, procPatch_.tag(), procPatch_.comm() ); diff --git a/src/OpenFOAM/global/fileOperations/fileOperation/fileOperationRanks.C b/src/OpenFOAM/global/fileOperations/fileOperation/fileOperationRanks.C index cfedf53130..bad09da2b9 100644 --- a/src/OpenFOAM/global/fileOperations/fileOperation/fileOperationRanks.C +++ b/src/OpenFOAM/global/fileOperations/fileOperation/fileOperationRanks.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2022-2023 OpenCFD Ltd. + Copyright (C) 2022-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -126,7 +126,7 @@ Foam::labelList Foam::fileOperation::getGlobalHostIORanks() ( myDigest.cdata_bytes(), // Send digests.data_bytes(), // Recv - SHA1Digest::max_size(), // Num send/recv per rank + SHA1Digest::size_bytes(), // Num send/recv per rank UPstream::worldComm ); diff --git a/src/OpenFOAM/include/openfoam_mpi.H b/src/OpenFOAM/include/openfoam_mpi.H index d6bcc5534f..a7e3249810 100644 --- a/src/OpenFOAM/include/openfoam_mpi.H +++ b/src/OpenFOAM/include/openfoam_mpi.H @@ -80,6 +80,20 @@ struct Cast return static_cast(arg.value()); } } + + //- Cast UPstream::Window to MPI_Win + template + static Type to_mpi(UPstream::Window arg) noexcept + { + if constexpr (std::is_pointer_v) + { + return reinterpret_cast(arg.value()); + } + else // std::is_integral_v + { + return static_cast(arg.value()); + } + } }; diff --git a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrixTemplates.C b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrixTemplates.C index 34f2b2e787..170315b418 100644 --- a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrixTemplates.C +++ b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrixTemplates.C @@ -78,8 +78,7 @@ void Foam::LUscalarMatrix::solve ( UPstream::commsTypes::nonBlocking, proci, - procSlot.data_bytes(), - procSlot.size_bytes(), + procSlot, tag, comm_ ); @@ -102,8 +101,7 @@ void Foam::LUscalarMatrix::solve ( UPstream::commsTypes::nonBlocking, UPstream::masterNo(), - x.cdata_bytes(), - x.size_bytes(), + x, tag, comm_ ); @@ -142,8 +140,7 @@ void Foam::LUscalarMatrix::solve ( UPstream::commsTypes::nonBlocking, proci, - procSlot.cdata_bytes(), - procSlot.size_bytes(), + procSlot, tag, comm_ ); @@ -166,8 +163,7 @@ void Foam::LUscalarMatrix::solve ( UPstream::commsTypes::nonBlocking, UPstream::masterNo(), - x.data_bytes(), - x.size_bytes(), + x, tag, comm_ ); diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/lduCalculatedProcessorField/lduCalculatedProcessorField.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/lduCalculatedProcessorField/lduCalculatedProcessorField.C index 0fb082115b..075a79f446 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/lduCalculatedProcessorField/lduCalculatedProcessorField.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/lduCalculatedProcessorField/lduCalculatedProcessorField.C @@ -114,8 +114,7 @@ void Foam::lduCalculatedProcessorField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procInterface_.neighbProcNo(), - scalarRecvBuf_.data_bytes(), - scalarRecvBuf_.size_bytes(), + scalarRecvBuf_, procInterface_.tag(), procInterface_.comm() ); @@ -125,8 +124,7 @@ void Foam::lduCalculatedProcessorField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procInterface_.neighbProcNo(), - scalarSendBuf_.cdata_bytes(), - scalarSendBuf_.size_bytes(), + scalarSendBuf_, procInterface_.tag(), procInterface_.comm() ); diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C index 0b54b87683..e671adef53 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C @@ -56,8 +56,7 @@ void Foam::processorLduInterface::send ( commsType, neighbProcNo(), - fld.cdata_bytes(), - fld.size_bytes(), + fld, tag(), comm() ); @@ -133,8 +132,7 @@ void Foam::processorLduInterface::receive ( commsType, neighbProcNo(), - fld.data_bytes(), - fld.size_bytes(), + fld, tag(), comm() ); diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C index ef92cb5ac3..5e160f4b13 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019-2023 OpenCFD Ltd. + Copyright (C) 2019-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -149,8 +149,7 @@ void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procInterface_.neighbProcNo(), - scalarRecvBuf_.data_bytes(), - scalarRecvBuf_.size_bytes(), + scalarRecvBuf_, procInterface_.tag(), comm() ); @@ -160,8 +159,7 @@ void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procInterface_.neighbProcNo(), - scalarSendBuf_.cdata_bytes(), - scalarSendBuf_.size_bytes(), + scalarSendBuf_, procInterface_.tag(), comm() ); diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C index 7005e95ee5..d4fd0c7f34 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C @@ -201,8 +201,7 @@ void Foam::mapDistributeBase::send ( UPstream::commsTypes::nonBlocking, proci, - subField.data_bytes(), - subField.size_bytes(), + subField, tag, comm ); @@ -244,8 +243,7 @@ void Foam::mapDistributeBase::send ( UPstream::commsTypes::nonBlocking, proci, - subField.cdata_bytes(), - subField.size_bytes(), + subField, tag, comm ); @@ -778,8 +776,7 @@ void Foam::mapDistributeBase::distribute ( UPstream::commsTypes::nonBlocking, proci, - subField.data_bytes(), - subField.size_bytes(), + subField, tag, comm ); @@ -806,8 +803,7 @@ void Foam::mapDistributeBase::distribute ( UPstream::commsTypes::nonBlocking, proci, - subField.cdata_bytes(), - subField.size_bytes(), + subField, tag, comm ); @@ -1218,8 +1214,7 @@ void Foam::mapDistributeBase::distribute ( UPstream::commsTypes::nonBlocking, proci, - subField.data_bytes(), - subField.size_bytes(), + subField, tag, comm ); @@ -1246,8 +1241,7 @@ void Foam::mapDistributeBase::distribute ( UPstream::commsTypes::nonBlocking, proci, - subField.cdata_bytes(), - subField.size_bytes(), + subField, tag, comm ); diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C index 7d2b879d72..a0a55385e4 100644 --- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C @@ -1086,8 +1086,7 @@ void Foam::syncTools::syncBoundaryFaceList ( UPstream::commsTypes::nonBlocking, procPatch.neighbProcNo(), - fld.data_bytes(), - fld.size_bytes() + fld ); } } @@ -1112,8 +1111,7 @@ void Foam::syncTools::syncBoundaryFaceList ( UPstream::commsTypes::nonBlocking, procPatch.neighbProcNo(), - fld.cdata_bytes(), - fld.size_bytes() + fld ); } } diff --git a/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C b/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C index 1808cdf0af..75bf7d4a93 100644 --- a/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C +++ b/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C @@ -259,8 +259,7 @@ void Foam::globalIndex::gather ( commsType, procIDs[i], - procSlot.data_bytes(), - procSlot.size_bytes(), + procSlot, tag, comm ); @@ -283,8 +282,7 @@ void Foam::globalIndex::gather ( commsType, masterProci, - fld.cdata_bytes(), - fld.size_bytes(), + fld, tag, comm ); @@ -948,8 +946,7 @@ void Foam::globalIndex::scatter ( commsType, procIDs[i], - procSlot.cdata_bytes(), - procSlot.size_bytes(), + procSlot, tag, comm ); @@ -984,8 +981,7 @@ void Foam::globalIndex::scatter ( commsType, masterProci, - fld.data_bytes(), - fld.size_bytes(), + fld, tag, comm ); diff --git a/src/Pstream/dummy/Make/files b/src/Pstream/dummy/Make/files index d560719fc8..6126bd6cf7 100644 --- a/src/Pstream/dummy/Make/files +++ b/src/Pstream/dummy/Make/files @@ -5,6 +5,7 @@ UPstreamCommunicator.C UPstreamGatherScatter.C UPstreamReduce.C UPstreamRequest.C +UPstreamWindow.C UIPstreamRead.C UOPstreamWrite.C diff --git a/src/Pstream/dummy/UPstreamWindow.C b/src/Pstream/dummy/UPstreamWindow.C new file mode 100644 index 0000000000..4c8e5b7906 --- /dev/null +++ b/src/Pstream/dummy/UPstreamWindow.C @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2025 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "UPstream.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::UPstream::Window::Window() noexcept +: + UPstream::Window(nullptr) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +bool Foam::UPstream::Window::good() const noexcept +{ + return false; +} + + +void Foam::UPstream::Window::reset() noexcept +{} + + +// ************************************************************************* // diff --git a/src/Pstream/mpi/Make/files b/src/Pstream/mpi/Make/files index c8b08f8a6a..e859a9209f 100644 --- a/src/Pstream/mpi/Make/files +++ b/src/Pstream/mpi/Make/files @@ -6,6 +6,7 @@ UPstreamCommunicator.C UPstreamGatherScatter.C UPstreamReduce.C UPstreamRequest.C +UPstreamWindow.C UIPstreamRead.C UOPstreamWrite.C diff --git a/src/Pstream/mpi/UPstreamWindow.C b/src/Pstream/mpi/UPstreamWindow.C new file mode 100644 index 0000000000..8bcce43014 --- /dev/null +++ b/src/Pstream/mpi/UPstreamWindow.C @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2025 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "PstreamGlobals.H" +#include "profilingPstream.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::UPstream::Window::Window() noexcept +: + UPstream::Window(MPI_WIN_NULL) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +bool Foam::UPstream::Window::good() const noexcept +{ + return MPI_WIN_NULL != PstreamUtils::Cast::to_mpi(*this); +} + + +void Foam::UPstream::Window::reset() noexcept +{ + *this = UPstream::Window(MPI_WIN_NULL); +} + + +// ************************************************************************* // diff --git a/src/fileFormats/ensight/output/ensightOutputTemplates.C b/src/fileFormats/ensight/output/ensightOutputTemplates.C index 1741713539..9c0d7b2862 100644 --- a/src/fileFormats/ensight/output/ensightOutputTemplates.C +++ b/src/fileFormats/ensight/output/ensightOutputTemplates.C @@ -217,8 +217,7 @@ void Foam::ensightOutput::Detail::writeFieldComponents ( UPstream::commsTypes::scheduled, proci, - slot.data_bytes(), - slot.size_bytes() + slot ); } } @@ -244,8 +243,7 @@ void Foam::ensightOutput::Detail::writeFieldComponents ( UPstream::commsTypes::scheduled, UPstream::masterNo(), - scratch.cdata_bytes(), - scratch.size_bytes() + scratch ); } } diff --git a/src/fileFormats/vtk/output/foamVtkOutput.C b/src/fileFormats/vtk/output/foamVtkOutput.C index 338f7b555f..1b83ed6d7e 100644 --- a/src/fileFormats/vtk/output/foamVtkOutput.C +++ b/src/fileFormats/vtk/output/foamVtkOutput.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016-2022 OpenCFD Ltd. + Copyright (C) 2016-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -155,8 +155,7 @@ void Foam::vtk::writeListParallel ( UPstream::commsTypes::scheduled, proci, - recvData.data_bytes(), - recvData.size_bytes() + recvData ); // With value offset @@ -176,8 +175,7 @@ void Foam::vtk::writeListParallel ( UPstream::commsTypes::scheduled, UPstream::masterNo(), - values.cdata_bytes(), - values.size_bytes() + values ); } } diff --git a/src/fileFormats/vtk/output/foamVtkOutputTemplates.C b/src/fileFormats/vtk/output/foamVtkOutputTemplates.C index 4d7c63cd37..1c356b8f84 100644 --- a/src/fileFormats/vtk/output/foamVtkOutputTemplates.C +++ b/src/fileFormats/vtk/output/foamVtkOutputTemplates.C @@ -193,8 +193,7 @@ void Foam::vtk::writeListParallel ( UPstream::commsTypes::scheduled, proci, - recvData.data_bytes(), - recvData.size_bytes() + recvData ); vtk::writeList(fmt, recvData); } @@ -208,8 +207,7 @@ void Foam::vtk::writeListParallel ( UPstream::commsTypes::scheduled, UPstream::masterNo(), - values.cdata_bytes(), - values.size_bytes() + values ); } } @@ -262,8 +260,7 @@ void Foam::vtk::writeListParallel ( UPstream::commsTypes::scheduled, proci, - recvData.data_bytes(), - recvData.size_bytes() + recvData ); vtk::writeList(fmt, recvData); } @@ -277,8 +274,7 @@ void Foam::vtk::writeListParallel ( UPstream::commsTypes::scheduled, UPstream::masterNo(), - sendData.cdata_bytes(), - sendData.size_bytes() + sendData ); } } @@ -332,8 +328,7 @@ void Foam::vtk::writeListParallel ( UPstream::commsTypes::scheduled, proci, - recvData.data_bytes(), - recvData.size_bytes() + recvData ); vtk::writeList(fmt, recvData); } @@ -347,8 +342,7 @@ void Foam::vtk::writeListParallel ( UPstream::commsTypes::scheduled, UPstream::masterNo(), - sendData.cdata_bytes(), - sendData.size_bytes() + sendData ); } } @@ -401,8 +395,7 @@ void Foam::vtk::writeListsParallel ( UPstream::commsTypes::scheduled, proci, - recvData.data_bytes(), - recvData.size_bytes() + recvData ); vtk::writeList(fmt, recvData); } @@ -417,8 +410,7 @@ void Foam::vtk::writeListsParallel ( UPstream::commsTypes::scheduled, proci, - recvData.data_bytes(), - recvData.size_bytes() + recvData ); vtk::writeList(fmt, recvData); } @@ -432,8 +424,7 @@ void Foam::vtk::writeListsParallel ( UPstream::commsTypes::scheduled, UPstream::masterNo(), - values1.cdata_bytes(), - values1.size_bytes() + values1 ); } @@ -443,8 +434,7 @@ void Foam::vtk::writeListsParallel ( UPstream::commsTypes::scheduled, UPstream::masterNo(), - values2.cdata_bytes(), - values2.size_bytes() + values2 ); } } @@ -506,8 +496,7 @@ void Foam::vtk::writeListsParallel ( UPstream::commsTypes::scheduled, proci, - recvData.data_bytes(), - recvData.size_bytes() + recvData ); vtk::writeList(fmt, recvData); } @@ -522,8 +511,7 @@ void Foam::vtk::writeListsParallel ( UPstream::commsTypes::scheduled, proci, - recvData.data_bytes(), - recvData.size_bytes() + recvData ); vtk::writeList(fmt, recvData); } @@ -537,8 +525,7 @@ void Foam::vtk::writeListsParallel ( UPstream::commsTypes::scheduled, UPstream::masterNo(), - values1.cdata_bytes(), - values1.size_bytes() + values1 ); } @@ -548,8 +535,7 @@ void Foam::vtk::writeListsParallel ( UPstream::commsTypes::scheduled, UPstream::masterNo(), - sendData2.cdata_bytes(), - sendData2.size_bytes() + sendData2 ); } } diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C index 9d361e03c2..54db9e5dd9 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C @@ -227,15 +227,15 @@ void Foam::processorFaPatchField::initEvaluate } // Receive straight into *this - this->resize_nocopy(sendBuf_.size()); + Field& self = *this; + self.resize_nocopy(sendBuf_.size()); recvRequest_ = UPstream::nRequests(); UIPstream::read ( UPstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), - this->data_bytes(), - this->size_bytes(), + self, procPatch_.tag(), procPatch_.comm() ); @@ -245,8 +245,7 @@ void Foam::processorFaPatchField::initEvaluate ( UPstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), - sendBuf_.cdata_bytes(), - sendBuf_.size_bytes(), + sendBuf_, procPatch_.tag(), procPatch_.comm() ); @@ -328,8 +327,7 @@ void Foam::processorFaPatchField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), - scalarRecvBuf_.data_bytes(), - scalarRecvBuf_.size_bytes(), + scalarRecvBuf_, procPatch_.tag(), procPatch_.comm() ); @@ -339,8 +337,7 @@ void Foam::processorFaPatchField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), - scalarSendBuf_.cdata_bytes(), - scalarSendBuf_.size_bytes(), + scalarSendBuf_, procPatch_.tag(), procPatch_.comm() ); @@ -434,8 +431,7 @@ void Foam::processorFaPatchField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), - recvBuf_.data_bytes(), - recvBuf_.size_bytes(), + recvBuf_, procPatch_.tag(), procPatch_.comm() ); @@ -445,8 +441,7 @@ void Foam::processorFaPatchField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), - sendBuf_.cdata_bytes(), - sendBuf_.size_bytes(), + sendBuf_, procPatch_.tag(), procPatch_.comm() ); diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/calculatedProcessor/calculatedProcessorFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/calculatedProcessor/calculatedProcessorFvPatchField.C index d94f194834..682a4481fb 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/calculatedProcessor/calculatedProcessorFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/calculatedProcessor/calculatedProcessorFvPatchField.C @@ -138,15 +138,15 @@ void Foam::calculatedProcessorFvPatchField::initEvaluate } // Receive straight into *this - this->resize_nocopy(sendBuf_.size()); + Field& self = *this; + self.resize_nocopy(sendBuf_.size()); recvRequest_ = UPstream::nRequests(); UIPstream::read ( UPstream::commsTypes::nonBlocking, procInterface_.neighbProcNo(), - this->data_bytes(), - this->size_bytes(), + self, procInterface_.tag(), procInterface_.comm() ); @@ -156,8 +156,7 @@ void Foam::calculatedProcessorFvPatchField::initEvaluate ( UPstream::commsTypes::nonBlocking, procInterface_.neighbProcNo(), - sendBuf_.cdata_bytes(), - sendBuf_.size_bytes(), + sendBuf_, procInterface_.tag(), procInterface_.comm() ); @@ -218,8 +217,7 @@ void Foam::calculatedProcessorFvPatchField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procInterface_.neighbProcNo(), - scalarRecvBuf_.data_bytes(), - scalarRecvBuf_.size_bytes(), + scalarRecvBuf_, procInterface_.tag(), procInterface_.comm() ); @@ -229,8 +227,7 @@ void Foam::calculatedProcessorFvPatchField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procInterface_.neighbProcNo(), - scalarSendBuf_.cdata_bytes(), - scalarSendBuf_.size_bytes(), + scalarSendBuf_, procInterface_.tag(), procInterface_.comm() ); diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C index 6784bf3b13..f095684a0b 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C @@ -232,15 +232,15 @@ void Foam::processorFvPatchField::initEvaluate } // Receive straight into *this - this->resize_nocopy(sendBuf_.size()); + Field& self = *this; + self.resize_nocopy(sendBuf_.size()); recvRequest_ = UPstream::nRequests(); UIPstream::read ( UPstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), - this->data_bytes(), - this->size_bytes(), + self, procPatch_.tag(), procPatch_.comm() ); @@ -250,8 +250,7 @@ void Foam::processorFvPatchField::initEvaluate ( UPstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), - sendBuf_.cdata_bytes(), - sendBuf_.size_bytes(), + sendBuf_, procPatch_.tag(), procPatch_.comm() ); @@ -353,8 +352,7 @@ void Foam::processorFvPatchField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), - scalarRecvBuf_.data_bytes(), - scalarRecvBuf_.size_bytes(), + scalarRecvBuf_, procPatch_.tag(), procPatch_.comm() ); @@ -364,8 +362,7 @@ void Foam::processorFvPatchField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), - scalarSendBuf_.cdata_bytes(), - scalarSendBuf_.size_bytes(), + scalarSendBuf_, procPatch_.tag(), procPatch_.comm() ); @@ -474,8 +471,7 @@ void Foam::processorFvPatchField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), - recvBuf_.data_bytes(), - recvBuf_.size_bytes(), + recvBuf_, procPatch_.tag(), procPatch_.comm() ); @@ -485,8 +481,7 @@ void Foam::processorFvPatchField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), - sendBuf_.cdata_bytes(), - sendBuf_.size_bytes(), + sendBuf_, procPatch_.tag(), procPatch_.comm() ); diff --git a/src/lagrangian/intermediate/conversion/ensight/ensightOutputCloud.C b/src/lagrangian/intermediate/conversion/ensight/ensightOutputCloud.C index dac7eaf44e..b2ce66f311 100644 --- a/src/lagrangian/intermediate/conversion/ensight/ensightOutputCloud.C +++ b/src/lagrangian/intermediate/conversion/ensight/ensightOutputCloud.C @@ -143,8 +143,7 @@ bool Foam::ensightOutput::writeCloudPositions ( UPstream::commsTypes::scheduled, proci, - positions.data_bytes(), - positions.size_bytes() + positions ); if (isBinaryOutput) @@ -166,8 +165,7 @@ bool Foam::ensightOutput::writeCloudPositions ( UPstream::commsTypes::scheduled, UPstream::masterNo(), - positions.cdata_bytes(), - positions.size_bytes() + positions ); } } diff --git a/src/lagrangian/intermediate/conversion/ensight/ensightOutputCloudTemplates.C b/src/lagrangian/intermediate/conversion/ensight/ensightOutputCloudTemplates.C index 85b5d8a898..d488b1aeba 100644 --- a/src/lagrangian/intermediate/conversion/ensight/ensightOutputCloudTemplates.C +++ b/src/lagrangian/intermediate/conversion/ensight/ensightOutputCloudTemplates.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016-2024 OpenCFD Ltd. + Copyright (C) 2016-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -110,8 +110,7 @@ bool Foam::ensightOutput::writeCloudField ( UPstream::commsTypes::scheduled, proci, - recvData.data_bytes(), - recvData.size_bytes() + recvData ); count = ensightOutput::Detail::writeCloudFieldContent @@ -137,8 +136,7 @@ bool Foam::ensightOutput::writeCloudField ( UPstream::commsTypes::scheduled, UPstream::masterNo(), - field.cdata_bytes(), - field.size_bytes() + field ); } } diff --git a/src/meshTools/matrices/lduMatrix/preconditioners/distributedDILUPreconditioner/distributedDILUPreconditioner.C b/src/meshTools/matrices/lduMatrix/preconditioners/distributedDILUPreconditioner/distributedDILUPreconditioner.C index 2759e5dafa..4fcdcf7162 100644 --- a/src/meshTools/matrices/lduMatrix/preconditioners/distributedDILUPreconditioner/distributedDILUPreconditioner.C +++ b/src/meshTools/matrices/lduMatrix/preconditioners/distributedDILUPreconditioner/distributedDILUPreconditioner.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2023 OpenCFD Ltd. + Copyright (C) 2023-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -194,13 +194,11 @@ void Foam::distributedDILUPreconditioner::receive auto& recvBuf = recvBufs_[inti]; recvBuf.resize_nocopy(interfaceBouCoeffs[inti].size()); - requests.push_back(UPstream::Request()); UIPstream::read ( - requests.back(), + requests.emplace_back(), ppp->neighbProcNo(), - recvBuf.data_bytes(), - recvBuf.size_bytes(), + recvBuf, ppp->tag()+70, // random offset ppp->comm() ); @@ -232,13 +230,11 @@ void Foam::distributedDILUPreconditioner::send sendBuf[face] = psiInternal[faceCells[face]]; } - requests.push_back(UPstream::Request()); UOPstream::write ( - requests.back(), + requests.emplace_back(), ppp->neighbProcNo(), - sendBuf.cdata_bytes(), - sendBuf.size_bytes(), + sendBuf, ppp->tag()+70, // random offset ppp->comm() ); diff --git a/src/overset/lduPrimitiveProcessorInterface/GAMG/calculatedProcessorGAMGInterfaceField.C b/src/overset/lduPrimitiveProcessorInterface/GAMG/calculatedProcessorGAMGInterfaceField.C index 75e0669189..7ad18c7e42 100644 --- a/src/overset/lduPrimitiveProcessorInterface/GAMG/calculatedProcessorGAMGInterfaceField.C +++ b/src/overset/lduPrimitiveProcessorInterface/GAMG/calculatedProcessorGAMGInterfaceField.C @@ -139,8 +139,7 @@ void Foam::calculatedProcessorGAMGInterfaceField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procInterface_.neighbProcNo(), - scalarRecvBuf_.data_bytes(), - scalarRecvBuf_.size_bytes(), + scalarRecvBuf_, procInterface_.tag(), comm() ); @@ -150,8 +149,7 @@ void Foam::calculatedProcessorGAMGInterfaceField::initInterfaceMatrixUpdate ( UPstream::commsTypes::nonBlocking, procInterface_.neighbProcNo(), - scalarSendBuf_.cdata_bytes(), - scalarSendBuf_.size_bytes(), + scalarSendBuf_, procInterface_.tag(), comm() ); diff --git a/src/parallel/decompose/decompositionMethods/metisLikeDecomp/metisLikeDecomp.C b/src/parallel/decompose/decompositionMethods/metisLikeDecomp/metisLikeDecomp.C index 2a07ac2a04..a105682562 100644 --- a/src/parallel/decompose/decompositionMethods/metisLikeDecomp/metisLikeDecomp.C +++ b/src/parallel/decompose/decompositionMethods/metisLikeDecomp/metisLikeDecomp.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017-2024 OpenCFD Ltd. + Copyright (C) 2017-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -100,8 +100,7 @@ Foam::label Foam::metisLikeDecomp::decomposeGeneral ( commsType, proci, - procSlot.data_bytes(), - procSlot.size_bytes(), + procSlot, UPstream::msgType(), UPstream::worldComm ); @@ -124,8 +123,7 @@ Foam::label Foam::metisLikeDecomp::decomposeGeneral ( commsType, UPstream::masterNo(), - procSlot.cdata_bytes(), - procSlot.size_bytes(), + procSlot, UPstream::msgType(), UPstream::worldComm );