su2hmc
Loading...
Searching...
No Matches
par_mpi.h File Reference

MPI headers. More...

#include <coord.h>
#include <errorcodes.h>
#include <stdalign.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for par_mpi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MPI_Finalise()
 Avoid any accidents with US/UK spelling.
#define DOWN   0
 Flag for send down.
#define UP   1
 Flag for send up.
#define masterproc   0
 The main rank. Used for serial tasks.
#define tag   0
 default MPI tag

Functions

int Par_begin (int argc, char *argv[])
 Initialises the MPI configuration.
int Par_sread (const int iread, const float beta, const float fmu, const float akappa, const Complex_f ajq, const float c_sw, Complex *u11, Complex *u12, Complex *u11t, Complex *u12t)
 Reads and assigns the gauges from file.
int Par_swrite (const int itraj, const int icheck, const float beta, const float fmu, const float akappa, const Complex_f ajq, const float c_sw, Complex *u11, Complex *u12)
 Copies u11 and u12 into arrays without halos which then get written to output.
int Par_isum (int *ival)
 Performs a reduction on an integer ival to get a sum which is then distributed to all ranks.
int Par_dsum (double *dval)
 Performs a reduction on a double dval to get a sum which is then distributed to all ranks.
int Par_fsum (float *dval)
 Performs a reduction on a float dval to get a sum which is then distributed to all ranks.
int Par_csum (Complex_f *cval)
 Performs a reduction on a complex float cval to get a sum which is then distributed to all ranks.
int Par_zsum (Complex *zval)
 Performs a reduction on a complex double zval to get a sum which is then distributed to all ranks.
int Par_icopy (int *ival)
 Broadcasts an integer to the other processes.
int Par_dcopy (double *dval)
 Broadcasts a double to the other processes.
int Par_fcopy (float *fval)
 Broadcasts a float to the other processes.
int Par_ccopy (Complex *cval)
 Broadcasts a complex float to the other processes.
int Par_zcopy (Complex *zval)
 Broadcasts a complex double to the other processes.
int ZHalo_swap_all (Complex *z, int ncpt)
 Calls the functions to send data to both the up and down halos.
int ZHalo_swap_dir (Complex *z, int ncpt, int idir, int layer)
 Swaps the halos along the axis given by idir in the direction given by layer.
int CHalo_swap_all (Complex_f *c, int ncpt)
 Calls the functions to send data to both the up and down halos.
int CHalo_swap_dir (Complex_f *c, int ncpt, int idir, int layer)
 Swaps the halos along the axis given by idir in the direction given by layer.
int DHalo_swap_all (double *d, int ncpt)
 Calls the functions to send data to both the up and down halos.
int DHalo_swap_dir (double *d, int ncpt, int idir, int layer)
 Swaps the halos along the axis given by idir in the direction given by layer.
int SHalo_swap_all (float *d, int ncpt)
 Calls the functions to send data to both the up and down halos.
int SHalo_swap_dir (float *d, int ncpt, int idir, int layer)
 Swaps the halos along the axis given by idir in the direction given by layer.
int Trial_Exchange (Complex *ut[2], Complex_f *ut_f[2])
 Exchanges the trial fields.

Variables

int pu [ndim]
 Processors in the up direction.
int pd [ndim]
 Processors in the down direction.
int * pcoord
 The processor grid.
int pstart [ndim][nproc]
 The initial lattice site on each sublattice in a given direction.
int pstop [ndim][nproc]
 The final lattice site on each sublattice in a given direction.
int rank
 The MPI rank.
int size
 The number of MPI ranks in total.

Detailed Description

MPI headers.

Author
D. Lawlor

Definition in file par_mpi.h.

Macro Definition Documentation

◆ DOWN

#define DOWN   0

Flag for send down.

Definition at line 37 of file par_mpi.h.

◆ masterproc

#define masterproc   0

The main rank. Used for serial tasks.

Definition at line 42 of file par_mpi.h.

◆ MPI_Finalise

#define MPI_Finalise ( )
Value:
MPI_Finalize()

Avoid any accidents with US/UK spelling.

Definition at line 32 of file par_mpi.h.

◆ tag

#define tag   0

default MPI tag

Definition at line 45 of file par_mpi.h.

◆ UP

#define UP   1

Flag for send up.

Definition at line 39 of file par_mpi.h.

Variable Documentation

◆ pcoord

int* pcoord
extern

The processor grid.

Definition at line 17 of file par_mpi.c.

◆ pd

int pd[ndim]
extern

Processors in the down direction.

Definition at line 22 of file par_mpi.c.

◆ pstart

int pstart[ndim][nproc]
extern

The initial lattice site on each sublattice in a given direction.

Definition at line 18 of file par_mpi.c.

◆ pstop

int pstop[ndim][nproc]
extern

The final lattice site on each sublattice in a given direction.

Definition at line 19 of file par_mpi.c.

◆ pu

int pu[ndim]
extern

Processors in the up direction.

Definition at line 21 of file par_mpi.c.

◆ rank

int rank
extern

The MPI rank.

Definition at line 20 of file par_mpi.c.

◆ size

int size
extern

The number of MPI ranks in total.

Definition at line 20 of file par_mpi.c.