#include <mpi.h>
#include <string.h>
#include <iostream>
int main(int argc, char** argv) {
MPI_Init(&argc, &argv);
MPI_Comm comm = MPI_COMM_WORLD;
int size;
MPI_Comm_size(comm, &size);
int rank;
MPI_Comm_rank(comm, &rank);
std::cout << "Процес " << rank << " із " << size << " процесів\n";
MPI_Finalize();
return 0;
}
I2luY2x1ZGUgPG1waS5oPgojaW5jbHVkZSA8c3RyaW5nLmg+CiNpbmNsdWRlIDxpb3N0cmVhbT4KCmludCBtYWluKGludCBhcmdjLCBjaGFyKiogYXJndikgewogICAgTVBJX0luaXQoJmFyZ2MsICZhcmd2KTsKCiAgICBNUElfQ29tbSBjb21tID0gTVBJX0NPTU1fV09STEQ7CgogICAgaW50IHNpemU7CiAgICBNUElfQ29tbV9zaXplKGNvbW0sICZzaXplKTsKCiAgICBpbnQgcmFuazsKICAgIE1QSV9Db21tX3JhbmsoY29tbSwgJnJhbmspOwoKICAgIHN0ZDo6Y291dCA8PCAi0J/RgNC+0YbQtdGBICIgPDwgcmFuayA8PCAiINGW0LcgIiA8PCBzaXplIDw8ICIg0L/RgNC+0YbQtdGB0ZbQslxuIjsKCiAgICBNUElfRmluYWxpemUoKTsKICAgIHJldHVybiAwOwp9