sem1 homework
This commit is contained in:
parent
d82d9189fb
commit
149ce4231c
3 changed files with 89 additions and 0 deletions
13
sem1/homework/task1/hello.c
Normal file
13
sem1/homework/task1/hello.c
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#include <mpi.h>
|
||||
#include <stdio.h>
|
||||
int main(int argc, char *argv[]) {
|
||||
int commsize, my_rank;
|
||||
|
||||
MPI_Init(&argc, &argv);
|
||||
|
||||
MPI_Comm_size(MPI_COMM_WORLD, &commsize);
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
|
||||
printf ("Communicator size = %d; My rank = %d\n", commsize,my_rank);
|
||||
|
||||
MPI_Finalize();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue