README.md 3 KB
Newer Older
Iker Martín Álvarez's avatar
Iker Martín Álvarez committed
1
2
# MAM_BICGSTAB

Iker Martín Álvarez's avatar
Iker Martín Álvarez committed
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Malleable implementation of the application BIConjugate Gradient STABilized (BICGSTAB). This branch shows the code and results for the paper "MaM: A Malleable User-Friendly Interface for MPI Applications" in the workshop DYNRESHPC24 inside the conference EURO-PAR24.

This branch contains the following directories:
- BiCGStab_Iker: Contains the code related to the BiCGStab with a Makefile. A single "make" is needed to compile the code.
- Exec: Contains multiple scripts to execute the code and perform analysis of the resulting data.
- Results: Contains two subdirectories with the raw data of executions. They refer to the MPICH channel used, which is either Nemesis(Ethernet network) or OFI(Infiniband network). In the paper only the data from OFI has been used.
- malleability: Contains the code used of MaM along with a Makefile. A single "make install" is required to compile the code. In addition, this make should be done prior to compiling the BiCGStab.

The paper did not have enough space to show the main header of MAM with its main functions and constants. Following can be found first the functions, and then the constants.
```c
//Main Functions
int MAM_Init(int root, MPI_Comm *comm, char *name_exec, void (*user_function)(void *), void *user_args);
int MAM_Finalize();
int MAM_Checkpoint(int *mam_state, int wait_completed, void (*user_function)(void *), void *user_args);

//Automatic data redistribution 
void MAM_Data_add(void *data, size_t *index, size_t total_qty, MPI_Datatype type, int is_replicated, int is_constant);
void MAM_Data_get_pointer(void **data, size_t *index, size_t *total_qty, int MPI_Datatype *type, int is_replicated, int is_constant);
void MAM_Data_get_entries(int is_replicated, int is_constant, size_t *entries);

//Semi-automatic data redistribution
int MAM_Get_reconf_info(mam_user_reconf_t *reconf_info);
void MAM_Resume_redistribution(int *mam_state);

//Configuration MaM
void MAM_Set_key_config(int key, int required, int *provided);
int MAM_Contains_strat(int key, int strategy, int *result);
```

```c
// Main MaM constants
enum mam_states{MAM_UNRESERVED, MAM_NOT_STARTED, MAM_PENDING, MAM_USER_PENDING, MAM_COMPLETED};
enum mam_completion{MAM_CHECK_COMPLETION, MAM_WAIT_COMPLETION};

//Automatic data redistribution constants
enum mam_data{MAM_DATA_DISTRIBUTED, MAM_DATA_REPLICATED, MAM_DATA_VARIABLE, MAM_DATA_CONSTANT};
//Semi-automatic data redistribution constants
enum mam_proc_states{MAM_PROC_CONTINUE, MAM_PROC_NEW_RANK, MAM_PROC_ZOMBIE};

// Keys and Values for configurating MaM
enum mam_key_values{MAM_SPAWN_METHOD, MAM_SPAWN_STRATEGIES, MAM_RED_METHOD, MAM_RED_STRATEGIES};
enum mall_spawn_methods{MAM_SPAWN_BASELINE, MAM_SPAWN_MERGE};
enum mam_spawn_strats{MAM_STRAT_SPAWN_CLEAR, MAM_STRAT_SPAWN_PTHREAD, MAM_STRAT_SPAWN_SINGLE, MAM_STRAT_SPAWN_INTERCOMM};
enum mall_redistribution_methods{MAM_RED_BASELINE, MAM_RED_POINT};
enum mam_redistribution_strats{MAM_STRAT_RED_CLEAR, MAM_STRAT_RED_NONBLOCKING, MAM_STRAT_RED_PTHREAD, MAM_STRAT_RED_WAIT_SOURCES, MAM_STRAT_RED_WAIT_TARGETS};
```