ASCOT5
Loading...
Searching...
No Matches
mpi_interface.h
Go to the documentation of this file.
1
5#ifndef MPI_INTERFACE_H
6#define MPI_INTERFACE_H
7
8#ifdef MPI
9#include <mpi.h>
10#endif
11#include "diag.h"
12#include "particle.h"
13
15#define mpi_type_integer MPI_LONG
17#define mpi_type_real MPI_DOUBLE
19#define mpi_type_a5err MPI_UNSIGNED_LONG_LONG
20
22void mpi_interface_init(int argc, char** argv, int* mpi_rank, int* mpi_size,
23 int* mpi_root);
25void mpi_my_particles(int* start_index, int* n, int ntotal, int mpi_rank,
26 int mpi_size);
28 int* ngathered, int ntotal, int mpi_rank,
29 int mpi_size, int mpi_root);
31 particle_state* ps, particle_state** ps_gather, int* n_gather, int n_tot,
32 int mpi_rank, int mpi_size, int mpi_root);
33void mpi_gather_diag(diag_offload_data* data, real* offload_array, int ntotal,
34 int mpi_rank, int mpi_size, int mpi_root);
35
36#endif
double real
Definition ascot5.h:85
Header file for diag.c.
void mpi_gather_particlestate(particle_state *ps, particle_state **psgathered, int *ngathered, int ntotal, int mpi_rank, int mpi_size, int mpi_root)
Gather all particle states to the root process.
void mpi_gather_diag(diag_offload_data *data, real *offload_array, int ntotal, int mpi_rank, int mpi_size, int mpi_root)
Gather all diagnostics to the root process.
void mpi_my_particles(int *start_index, int *n, int ntotal, int mpi_rank, int mpi_size)
Divide markers to mpi processes.
void mpi_interface_finalize()
Finalize MPI.
void mpi_interface_init(int argc, char **argv, int *mpi_rank, int *mpi_size, int *mpi_root)
Initialize MPI.
void mpi_interface_barrier()
Wait until all processes have reached this routine.
Header file for particle.c.
Diagnostics offload data struct.
Definition diag.h:21
General representation of a marker.
Definition particle.h:40