YetAnotherCoupler 3.5.2
Loading...
Searching...
No Matches
component.c File Reference
#include "config.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "utils_mci.h"
#include "utils_common.h"
#include "yac_mpi_common.h"
#include "component.h"
#include "yac.h"
Include dependency graph for component.c:

Go to the source code of this file.

Data Structures

struct  component_data
 
struct  yac_component_config
 

Functions

static int compare_component_data (void const *a, void const *b)
 
struct yac_component_configyac_component_config_new (struct yac_couple_config *couple_config, char const **names, size_t num_names, MPI_Comm comm_)
 
static int compare_int (const void *a, const void *b)
 
static size_t get_comp_idx (char const *caller, struct yac_component_config *comp_config, char const *comp_name)
 
MPI_Comm yac_component_config_get_comps_comm (struct yac_component_config *comp_config, const char **names, size_t num_names)
 
int yac_component_config_contains_component (struct yac_component_config *comp_config, char const *comp_name)
 
static MPI_Group get_local_comp_group (char const *caller, struct yac_component_config *comp_config, char const *comp_name)
 
int yac_component_config_comp_size (struct yac_component_config *comp_config, char const *comp_name)
 
int yac_component_config_comp_rank (struct yac_component_config *comp_config, char const *comp_name)
 
void yac_component_config_delete (struct yac_component_config *comp_config)
 

Function Documentation

◆ compare_component_data()

static int compare_component_data ( void const * a,
void const * b )
static

Definition at line 33 of file component.c.

Here is the caller graph for this function:

◆ compare_int()

static int compare_int ( const void * a,
const void * b )
inlinestatic

Definition at line 120 of file component.c.

Here is the caller graph for this function:

◆ get_comp_idx()

static size_t get_comp_idx ( char const * caller,
struct yac_component_config * comp_config,
char const * comp_name )
static

Definition at line 127 of file component.c.

Here is the caller graph for this function:

◆ get_local_comp_group()

static MPI_Group get_local_comp_group ( char const * caller,
struct yac_component_config * comp_config,
char const * comp_name )
static

Definition at line 256 of file component.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_component_config_comp_rank()

int yac_component_config_comp_rank ( struct yac_component_config * comp_config,
char const * comp_name )
Examples
test_component_config.c.

Definition at line 281 of file component.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_component_config_comp_size()

int yac_component_config_comp_size ( struct yac_component_config * comp_config,
char const * comp_name )
Examples
test_component_config.c.

Definition at line 271 of file component.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_component_config_contains_component()

int yac_component_config_contains_component ( struct yac_component_config * comp_config,
char const * comp_name )

Checks whether a component is locally available

Parameters
[in]comp_configcomponent configuration
[in]comp_namecomponent name
Returns
"1" if comp_name was provided to yac_component_config_new
"0" otherwise
Examples
test_component_config.c.

Definition at line 244 of file component.c.

Here is the caller graph for this function:

◆ yac_component_config_delete()

void yac_component_config_delete ( struct yac_component_config * comp_config)
Examples
test_component_config.c.

Definition at line 291 of file component.c.

Here is the caller graph for this function:

◆ yac_component_config_get_comps_comm()

MPI_Comm yac_component_config_get_comps_comm ( struct yac_component_config * comp_config,
const char ** names,
size_t num_names )

creates a communicator that contains the processes of all listed components

Parameters
[in]comp_configcomponent configuration
[in]nameslist of component names
[in]num_namesnumber of component names
Returns
components communicator
Examples
test_component_config.c.

Definition at line 142 of file component.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_component_config_new()

struct yac_component_config * yac_component_config_new ( struct yac_couple_config * couple_config,
char const ** names,
size_t num_names,
MPI_Comm comm_ )
Examples
test_component_config.c.

Definition at line 38 of file component.c.

Here is the call graph for this function:
Here is the caller graph for this function: