-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.c
49 lines (34 loc) · 1007 Bytes
/
main.c
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/******************************************************************************
*** The driver code for the examples of how to use the INHDF5 API
***
*** Copyright (c) 2020-2024 Ioannis Nompelis
*** Ioannis Nompelis <nompelis@nobelware.com>
******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <mpi.h>
#include <hdf5.h>
#include "inUtils_HDF5.h"
// a demo that uses 2 ranks (processes) found in "test.c"
int oldtest();
// a deme that handles a 2D dataset
int test( MPI_Comm* );
// some testing...
int test2( MPI_Comm* );
int main( int argc, char *argv[] )
{
int ierr=0;
int irank,nrank;
MPI_Comm comm;
//-- start the day with MPI
MPI_Init( &argc, &argv );
MPI_Comm_dup( MPI_COMM_WORLD, &comm );
MPI_Comm_rank( comm, &irank );
MPI_Comm_size( comm, &nrank );
// (void) oldtest();
// (void) test( &comm );
(void) test2( &comm );
MPI_Finalize();
return 0;
}