From: vbd Date: Wed, 27 Feb 2008 09:24:08 +0000 (+0000) Subject: Correcting problem with OpenMPI implementation X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5261c928a2631c6cc4d11a401252099e19795966;p=tools%2Fmedcoupling.git Correcting problem with OpenMPI implementation --- diff --git a/src/ParaMEDMEM/InterpolationMatrix.cxx b/src/ParaMEDMEM/InterpolationMatrix.cxx index 6f9ef4dc4..693ac59f6 100644 --- a/src/ParaMEDMEM/InterpolationMatrix.cxx +++ b/src/ParaMEDMEM/InterpolationMatrix.cxx @@ -25,8 +25,8 @@ namespace ParaMEDMEM Creates an empty matrix structure linking two distributed supports. The method must be called by all processors belonging to source and target groups. \param source_support local support - \param local_group processor group containing the local processors - \param distant_group processor group containing the distant processors + \param source_group processor group containing the local processors + \param target_group processor group containing the distant processors \param method interpolation method */ InterpolationMatrix::InterpolationMatrix( diff --git a/src/ParaMEDMEM/IntersectionDEC.cxx b/src/ParaMEDMEM/IntersectionDEC.cxx index a148966d8..82b03dfb6 100644 --- a/src/ParaMEDMEM/IntersectionDEC.cxx +++ b/src/ParaMEDMEM/IntersectionDEC.cxx @@ -13,6 +13,11 @@ #include "IntersectionDEC.hxx" #include "ElementLocator.hxx" #include "MEDMEM_OptionManager.hxx" + + +namespace ParaMEDMEM +{ + /*! \defgroup intersectiondec IntersectionDEC @@ -71,10 +76,11 @@ In the P0-P0 case, this matrix is a plain rectangular matrix with coefficients e * */ - -/*! @{ */ -namespace ParaMEDMEM -{ +/*! +\addtogroup intersectiondec +@{ +*/ + IntersectionDEC::IntersectionDEC() { } @@ -213,6 +219,11 @@ void IntersectionDEC::recvData() } + /*! + Receives the data at time \a time in asynchronous mode. The value of the field + will be time-interpolated from the field values received. + \param time time at which the value is desired + */ void IntersectionDEC::recvData( double time ) { @@ -239,13 +250,22 @@ void IntersectionDEC::sendData() _interpolation_matrix->transposeMultiply(*_local_field->getField()); } + /*! + Sends the data available at time \a time in asynchronous mode. + \param time time at which the value is available + \param deltatime time interval between the value presently sent and the next one. + */ + + void IntersectionDEC::sendData( double time , double deltatime ) { _interpolation_matrix->getAccessDEC()->SetTime(time,deltatime); sendData() ; } -/*! @} */ +/*! + @} + */ } diff --git a/src/ParaMEDMEM/MPIProcessorGroup.cxx b/src/ParaMEDMEM/MPIProcessorGroup.cxx index 41f4fbf69..9eb971e38 100644 --- a/src/ParaMEDMEM/MPIProcessorGroup.cxx +++ b/src/ParaMEDMEM/MPIProcessorGroup.cxx @@ -31,10 +31,15 @@ using namespace std; } \endverbatim */ -/*! @{ */ + namespace ParaMEDMEM { +/*! +\addtogroup processor_group +@{ +*/ + /*! * Creates a processor group that is based on all the MPI_COMM_WORLD processor.This routine must be called by all processors in MPI_COMM_WORLD. @@ -87,9 +92,10 @@ ProcessorGroup(interface, proc_ids) _comm_interface.commCreate(MPI_COMM_WORLD, _group, &_comm); delete[] ranks; } - /*! Creates a processor group that is based on the processors between \a pstart and \pend. + /*! Creates a processor group that is based on the processors between \a pstart and \a pend. This routine must be called by all processors in MPI_COMM_WORLD. +\param comm_interface reference to the comm_interface object \param interface CommInterface object giving access to the MPI communication layer \param pstart id in MPI_COMM_WORLD of the first processor in the group @@ -120,7 +126,9 @@ MPIProcessorGroup::MPIProcessorGroup (const CommInterface& comm_interface, int p _comm_interface.commCreate(MPI_COMM_WORLD, _group, &_comm); delete[] ranks; } - +/*! +@} +*/ MPIProcessorGroup::MPIProcessorGroup (const ProcessorGroup& proc_group, set proc_ids) : ProcessorGroup(proc_group.getCommInterface()) @@ -137,9 +145,13 @@ MPIProcessorGroup::~MPIProcessorGroup() _comm_interface.commFree(&_comm); } +/*! +\addtogroup processor_group +@{ +*/ /*! Translation of the rank id between two processor groups. This method translates rank \a rank -on the current processor group to the rank on group pointed by \group. +on the current processor group to the rank on group pointed by \a group. \param group group from which the rank is expected \param rank rank on group \a group of the processor which is to be translated \return rank on local group @@ -169,16 +181,7 @@ int MPIProcessorGroup::translateRank(const ProcessorGroup* group, int rank) cons } -ProcessorGroup* MPIProcessorGroup::createProcGroup() const -{ - set procs; - for (set::const_iterator iter=_proc_ids.begin(); iter!= _proc_ids.end(); iter++) - procs.insert(*iter); - - return new MPIProcessorGroup(_comm_interface, procs); - -} - /*!Adding processors of group \a group to local group. +/*!Adding processors of group \a group to local group. \param group group that is to be fused with current group \return new group formed by the fusion of local group and \a group. */ @@ -192,7 +195,17 @@ ProcessorGroup* MPIProcessorGroup::fuse (const ProcessorGroup& group) const } return new MPIProcessorGroup(_comm_interface,procs); } +/*! + @} + */ + ProcessorGroup* MPIProcessorGroup::createProcGroup() const +{ + set procs; + for (set::const_iterator iter=_proc_ids.begin(); iter!= _proc_ids.end(); iter++) + procs.insert(*iter); + + return new MPIProcessorGroup(_comm_interface, procs); - } -/*! @} */ +} + diff --git a/src/ParaMEDMEM/NonCoincidentDEC.cxx b/src/ParaMEDMEM/NonCoincidentDEC.cxx index 2d165409d..cce2af2a4 100644 --- a/src/ParaMEDMEM/NonCoincidentDEC.cxx +++ b/src/ParaMEDMEM/NonCoincidentDEC.cxx @@ -14,6 +14,11 @@ extern "C" { #include #include } + + +namespace ParaMEDMEM +{ + /*! \defgroup noncoincidentdec NonCoincidentDEC @@ -64,17 +69,15 @@ In the P0-P0 case, this matrix is a plain rectangular matrix with one non-zero element per row (with value 1). For instance, in the above figure, the matrix is : \f[ -\begin{tabular}{|ccc|} -1 & 0 & 0 \\ -0 & 0 & 1 \\ -1 & 0 & 0 \\ -0 & 0 & 1 \\ +\begin{tabular}{|cccc|} +1 & 0 & 0 & 0\\ +0 & 0 & 1 & 0\\ +1 & 0 & 0 & 0\\ +0 & 0 & 1 & 0\\ \end{tabular} \f] */ -namespace ParaMEDMEM -{ fvm_nodal_t* medmemMeshToFVMMesh(const MEDMEM::MESH* mesh) { // create an FVM structure from the paramesh structure @@ -220,6 +223,10 @@ NonCoincidentDEC::NonCoincidentDEC() { } + /*! +\addtogroup noncoincidentdec +@{ + */ /*! Constructor of a non coincident DEC with * a source group on which lies a field lying on a mesh and a @@ -368,7 +375,9 @@ void NonCoincidentDEC::sendData() renormalizeTargetField(); } - + /*! +@} + */ } diff --git a/src/ParaMEDMEM/StructuredCoincidentDEC.cxx b/src/ParaMEDMEM/StructuredCoincidentDEC.cxx index 76649855b..9cd68017a 100644 --- a/src/ParaMEDMEM/StructuredCoincidentDEC.cxx +++ b/src/ParaMEDMEM/StructuredCoincidentDEC.cxx @@ -7,6 +7,8 @@ #include "MPIProcessorGroup.hxx" #include "StructuredCoincidentDEC.hxx" +namespace ParaMEDMEM +{ /*! \defgroup structuredcoincidentdec StructuredCoincidentDEC @@ -51,8 +53,7 @@ that only have different partitionings. In the case when the fields have also different component topologies, creating the ParaFIELD requires some more effort. See \ref parafield section for more details. */ -namespace ParaMEDMEM -{ + StructuredCoincidentDEC::StructuredCoincidentDEC():_toposource(0),_topotarget(0), _recvbuffer(0),_sendbuffer(0), @@ -76,6 +77,10 @@ StructuredCoincidentDEC::~StructuredCoincidentDEC() delete _topotarget; } +/*! +\addtogroup structuredcoincidentdec +@{ +*/ StructuredCoincidentDEC::StructuredCoincidentDEC(ProcessorGroup& local_group, ProcessorGroup& distant_group):DEC(local_group,distant_group),_toposource(0),_topotarget(0),_recvbuffer(0),_sendbuffer(0) { } @@ -376,5 +381,8 @@ void StructuredCoincidentDEC::synchronize() prepareTargetDE(); } } +/*! +@} +*/ } diff --git a/src/ParaMEDMEM/Test/ParaMEDMEMTest.hxx b/src/ParaMEDMEM/Test/ParaMEDMEMTest.hxx index 3805b90fb..4ebd16f9d 100644 --- a/src/ParaMEDMEM/Test/ParaMEDMEMTest.hxx +++ b/src/ParaMEDMEM/Test/ParaMEDMEMTest.hxx @@ -41,10 +41,10 @@ class ParaMEDMEMTest : public CppUnit::TestFixture CPPUNIT_TEST(testSynchronousEqualIntersectionWithoutInterpNativeDEC_2D); CPPUNIT_TEST(testSynchronousEqualIntersectionWithoutInterpDEC_2D); CPPUNIT_TEST(testSynchronousEqualIntersectionDEC_2D); -// CPPUNIT_TEST(testSynchronousFasterSourceIntersectionDEC_2D); -// CPPUNIT_TEST(testSynchronousSlowerSourceIntersectionDEC_2D); -// CPPUNIT_TEST(testSynchronousSlowSourceIntersectionDEC_2D); -// CPPUNIT_TEST(testSynchronousFastSourceIntersectionDEC_2D); + CPPUNIT_TEST(testSynchronousFasterSourceIntersectionDEC_2D); + CPPUNIT_TEST(testSynchronousSlowerSourceIntersectionDEC_2D); + CPPUNIT_TEST(testSynchronousSlowSourceIntersectionDEC_2D); + CPPUNIT_TEST(testSynchronousFastSourceIntersectionDEC_2D); CPPUNIT_TEST(testAsynchronousEqualIntersectionDEC_2D); CPPUNIT_TEST(testAsynchronousFasterSourceIntersectionDEC_2D); CPPUNIT_TEST(testAsynchronousSlowerSourceIntersectionDEC_2D); diff --git a/src/ParaMEDMEM/Test/ParaMEDMEMTest_IntersectionDEC.cxx b/src/ParaMEDMEM/Test/ParaMEDMEMTest_IntersectionDEC.cxx index c1ce0fedc..bc408649a 100644 --- a/src/ParaMEDMEM/Test/ParaMEDMEMTest_IntersectionDEC.cxx +++ b/src/ParaMEDMEM/Test/ParaMEDMEMTest_IntersectionDEC.cxx @@ -509,6 +509,6 @@ void ParaMEDMEMTest::testAsynchronousIntersectionDEC_2D(double dtA, double tmaxA cout << "testAsynchronousIntersectionDEC_2D" << rank << " MPI_Barrier " << endl ; - MPI_Barrier(MPI_COMM_WORLD); + if (Asynchronous) MPI_Barrier(MPI_COMM_WORLD); cout << "end of IntersectionDEC_2D test"<