1 #if COMPILATION_INSTRUCTIONS
2 mpic++ -O3 -std=c++14 `#-Wfatal-errors` $0 -o $0x.x && time mpirun -n 2 $0x.x $@ && rm -f $0x.x; exit
3 #endif
4 //  (C) Copyright Alfredo A. Correa 2018.
5 #define OMPI_SKIP_MPICXX 1  // https://github.com/open-mpi/ompi/issues/5157
6 #include "../../mpi3/main.hpp"
7 #include "../../mpi3/window.hpp"
8 #include "../../mpi3/group.hpp"
9 
10 #include<cassert>
11 
12 namespace mpi3 = boost::mpi3;
13 using std::cout;
14 
main(int argc,char * [],mpi3::communicator world)15 int mpi3::main(int argc, char*[], mpi3::communicator world){
16 	int buf[10];
17 	mpi3::window<int> win{buf, 10, world};
18 	mpi3::group wing(win);
19 	mpi3::group g(world);
20 	assert( g == wing );
21 	assert( g.rank() == wing.rank() );
22 	assert( g.rank() == world.rank() );
23 	assert( mpi3::group(world) == mpi3::group(win) );
24 	assert( mpi3::group(world).rank() == mpi3::group(win).rank() );
25 	return 0;
26 }
27 
28