The FARGO_THORIN code developer's guide
 All Data Structures Files Functions Variables Typedefs Macros
Functions | Variables
commbound.c File Reference

Contains the functions used to synchronize buffer zones on all processes. More...

#include "fargo.h"
Include dependency graph for commbound.c:

Go to the source code of this file.

Functions

void AllocateComm ()
 
void CommunicateBoundaries (PolarGrid *Density, PolarGrid *Vrad, PolarGrid *Vtheta, PolarGrid *Energy, PolarGrid *Label)
 

Variables

static realSendInnerBoundary
 
static realSendOuterBoundary
 
static realRecvInnerBoundary
 
static realRecvOuterBoundary
 
static int allocated_com = 0
 
static int size_com
 

Detailed Description

Contains the functions used to synchronize buffer zones on all processes.

In addition to the main function that allows the synchronization (note that even processes first send their inner zones to the previous process, then receive their inner buffer from this process, while odd processes first receive their outer buffer from the next process, then send their outer zones to the next process. This file also contains the function that allocates the memory for the communication (once for all the run).

Author
THORIN modifications by Ondřej Chrenko chren.nosp@m.ko@s.nosp@m.irrah.nosp@m..tro.nosp@m.ja.mf.nosp@m.f.cu.nosp@m.ni.cz, Copyright (C) 2017; original code by Frédéric Masset

Definition in file commbound.c.

Function Documentation

void AllocateComm ( )

Definition at line 28 of file commbound.c.

References AdvecteLabel, allocated_com, CPU_Rank, CPUOVERLAP, EnergyEq, NSEC, prs_exit(), RecvInnerBoundary, RecvOuterBoundary, SendInnerBoundary, SendOuterBoundary, size_com, and YES.

Referenced by CommunicateBoundaries().

Here is the call graph for this function:

Here is the caller graph for this function:

void CommunicateBoundaries ( PolarGrid Density,
PolarGrid Vrad,
PolarGrid Vtheta,
PolarGrid Energy,
PolarGrid Label 
)

Definition at line 47 of file commbound.c.

References AdvecteLabel, AllocateComm(), allocated_com, CPU_Number, CPU_Rank, CPUOVERLAP, EnergyEq, fargostat, MPI_COMM_WORLD, MPI_DOUBLE, MPI_Irecv(), MPI_Isend(), MPI_Wait(), NSEC, RecvInnerBoundary, RecvOuterBoundary, SendInnerBoundary, SendOuterBoundary, size_com, and YES.

Referenced by AlgoGas().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

int allocated_com = 0
static

Definition at line 25 of file commbound.c.

Referenced by AllocateComm(), and CommunicateBoundaries().

real* RecvInnerBoundary
static

Definition at line 22 of file commbound.c.

Referenced by AllocateComm(), and CommunicateBoundaries().

real* RecvOuterBoundary
static

Definition at line 23 of file commbound.c.

Referenced by AllocateComm(), and CommunicateBoundaries().

real* SendInnerBoundary
static

Definition at line 20 of file commbound.c.

Referenced by AllocateComm(), and CommunicateBoundaries().

real* SendOuterBoundary
static

Definition at line 21 of file commbound.c.

Referenced by AllocateComm(), and CommunicateBoundaries().

int size_com
static

Definition at line 26 of file commbound.c.

Referenced by AllocateComm(), and CommunicateBoundaries().