forked from marek357/BlueFieldProject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsnd.cpp
More file actions
31 lines (29 loc) · 814 Bytes
/
snd.cpp
File metadata and controls
31 lines (29 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <stdio.h>
#include <mpi.h>
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <unistd.h>
#include <string>
#include <unistd.h>
#include <unistd.h>
char hostname[100];
int main() {
int comm_size, rank;
MPI_Init(NULL, NULL);
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
MPI_Comm_size(MPI_COMM_WORLD,&comm_size);
int err[100];
gethostname(hostname, 100);
printf("%s", hostname);
printf("jestem procesem %d a size mojego komunikatora to %d", rank, comm_size);
MPI_Comm comm, parent, wynikowy_com;
MPI_Comm_get_parent(&parent);
MPI_Intercomm_merge(parent, 0, &wynikowy_com);
char args[100];
int subcom_size;
MPI_Comm_size(comm, &subcom_size);
printf(" rozmiar interkomunikatora to %d \n", subcom_size);
MPI_Finalize();
return 0;
}