Skip to content

Commit c4a238e

Browse files
authored
Merge pull request #3750 from JanVogelsang/mpi-cpp-bindings-fix
Replace deprecated MPI C++ bindings by their C equivalent
2 parents 73bc8a6 + ec6c48e commit c4a238e

8 files changed

Lines changed: 8 additions & 12 deletions

File tree

doc/htmldoc/tutorials/music_tutorial/music_tutorial_3.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ divided into a setup phase and a runtime phase. You can see the setup below.
1919

2020
.. code-block:: cpp
2121
22-
MPI::Intracomm comm;
22+
MPI_Comm comm;
2323
2424
int main(int argc, char **argv)
2525
{
@@ -170,7 +170,7 @@ communications and clean up after itself before exiting.
170170

171171
.. code-block:: cpp
172172
173-
MPI::Intracomm comm;
173+
MPI_Comm comm;
174174
FILE *fout;
175175
176176
struct eventtype {

models/music_cont_in_proxy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ nest::music_cont_in_proxy::pre_run_hook()
147147
S_.port_width_ = V_.MP_->width();
148148

149149
B_.data_ = std::vector< double >( S_.port_width_ );
150-
MUSIC::ArrayData data_map( static_cast< void* >( &( B_.data_[ 0 ] ) ), MPI::DOUBLE, 0, S_.port_width_ );
150+
MUSIC::ArrayData data_map( static_cast< void* >( &( B_.data_[ 0 ] ) ), MPI_DOUBLE, 0, S_.port_width_ );
151151

152152
V_.MP_->map( &data_map );
153153
S_.published_ = true;

models/music_cont_out_proxy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ nest::music_cont_out_proxy::pre_run_hook()
271271
new MUSIC::PermutationIndex( &music_index_map.front(), music_index_map.size() );
272272

273273
MUSIC::ArrayData* dmap =
274-
new MUSIC::ArrayData( static_cast< void* >( &( B_.data_.front() ) ), MPI::DOUBLE, music_perm_ind );
274+
new MUSIC::ArrayData( static_cast< void* >( &( B_.data_.front() ) ), MPI_DOUBLE, music_perm_ind );
275275

276276
// Setup an array map
277277
MP->map( dmap );

models/music_rate_out_proxy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ nest::music_rate_out_proxy::pre_run_hook()
176176

177177

178178
MUSIC::ArrayData* dmap =
179-
new MUSIC::ArrayData( static_cast< void* >( &( B_.data_.front() ) ), MPI::DOUBLE, 0, S_.port_width_ );
179+
new MUSIC::ArrayData( static_cast< void* >( &( B_.data_.front() ) ), MPI_DOUBLE, 0, S_.port_width_ );
180180

181181

182182
// Setup an array map

nestkernel/mpi_manager_impl.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ nest::MPIManager::get_process_id_of_vp( const size_t vp ) const
4444
#ifdef HAVE_MPI
4545

4646
// Variable to hold the MPI communicator to use.
47-
#ifdef HAVE_MUSIC
48-
extern MPI::Intracomm comm;
49-
#else /* #ifdef HAVE_MUSIC */
5047
extern MPI_Comm comm;
51-
#endif /* #ifdef HAVE_MUSIC */
5248

5349
template < typename T >
5450
struct MPI_Type

nestkernel/music_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ MUSICManager::music_finalize()
126126

127127
#ifdef HAVE_MUSIC
128128

129-
MPI::Intracomm
129+
MPI_Comm
130130
MUSICManager::communicator()
131131
{
132132
return music_setup->communicator();

nestkernel/music_manager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class MUSICManager : public ManagerInterface
7575
void music_finalize(); // called from MPIManager::mpi_finalize
7676

7777
#ifdef HAVE_MUSIC
78-
MPI::Intracomm communicator();
78+
MPI_Comm communicator();
7979

8080
MUSIC::Setup* get_music_setup();
8181
MUSIC::Runtime* get_music_runtime();

nestkernel/music_rate_in_handler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ MusicRateInHandler::publish_port()
110110
*it = 0;
111111
}
112112

113-
MUSIC::ArrayData data_map( static_cast< void* >( &( data_[ 0 ] ) ), MPI::DOUBLE, 0, port_width_ );
113+
MUSIC::ArrayData data_map( static_cast< void* >( &( data_[ 0 ] ) ), MPI_DOUBLE, 0, port_width_ );
114114

115115
MP_->map( &data_map );
116116
published_ = true;

0 commit comments

Comments
 (0)