-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patht8project_main.cxx
More file actions
32 lines (25 loc) · 936 Bytes
/
t8project_main.cxx
File metadata and controls
32 lines (25 loc) · 936 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
32
#include <t8project_helloworld.hxx>
#include <t8.h>
int
main (int argc, char **argv)
{
int mpiret;
/* Initialize MPI. This has to happen before we initialize sc or t8code. */
mpiret = sc_MPI_Init (&argc, &argv);
/* Error check the MPI return value. */
SC_CHECK_MPI (mpiret);
/* Initialize the sc library, has to happen before we initialize t8code. */
sc_init (sc_MPI_COMM_WORLD, 1, 1, NULL, SC_LP_ESSENTIAL);
/* Initialize t8code with log level SC_LP_ESSENTIAL. See sc.h for more info on the log levels. */
t8_init (SC_LP_ESSENTIAL);
/* Register this project as an sc package.
* This allows you to use sc_malloc/free.
* You could also set up your own logging functions similar to t8_global_productionf and other, see t8.h/t8.c
* See t8.h/t8.c for proper wrapper implementations.
*/
t8project::helloworld();
sc_finalize ();
mpiret = sc_MPI_Finalize ();
SC_CHECK_MPI (mpiret);
return 0;
}