forked from ascot4fusion/ascot5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmpi_interface.h
32 lines (26 loc) · 982 Bytes
/
mpi_interface.h
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
/**
* @file mpi_interface.h
* @brief Header file for mpi_interface.c
*/
#ifndef MPI_INTERFACE_H
#define MPI_INTERFACE_H
#ifdef MPI
#include <mpi.h>
#endif
#include "diag.h"
#include "particle.h"
#include "simulate.h"
#define mpi_type_integer MPI_LONG
#define mpi_type_real MPI_DOUBLE
#define mpi_type_a5err MPI_UNSIGNED_LONG_LONG
void mpi_interface_init(int argc, char** argv, sim_offload_data* sim,
int* mpi_rank, int* mpi_size, int* mpi_root);
void mpi_interface_finalize();
void mpi_my_particles(int* start_index, int* n, int ntotal, int mpi_rank,
int mpi_size);
void mpi_gather_particlestate(particle_state* ps, particle_state** psgathered,
int* ngathered, int ntotal, int mpi_rank,
int mpi_size, int mpi_root);
void mpi_gather_diag(diag_offload_data* data, real* offload_array, int ntotal,
int mpi_rank, int mpi_size, int mpi_root);
#endif