GADGET-4
|
#include <parameters.h>
Inherits setcomm.
Inherited by global_data_all_processes.
Public Member Functions | |
parameters () | |
parameters (MPI_Comm comm) | |
int | read_parameter_file (const char *fname) |
This function parses the parameter file. More... | |
void | add_param (const char *name, void *buf, int type, int flag) |
void | write_used_parameters (const char *dirname, const char *fname) |
![]() | |
setcomm (MPI_Comm Comm) | |
setcomm (const char *str) | |
void | initcomm (MPI_Comm Comm) |
void | mpi_printf (const char *fmt,...) |
void | determine_compute_nodes (void) |
Public Attributes | |
int | NParameters = 0 |
char | ParametersTag [MAX_PARAMETERS][MAXLEN_PARAM_TAG] |
void * | ParametersValue [MAX_PARAMETERS] |
char | ParametersType [MAX_PARAMETERS] |
char | ParametersChangeable [MAX_PARAMETERS] |
int | ParameterSequence [MAX_PARAMETERS] |
![]() | |
MPI_Comm | Communicator |
int | NTask |
int | ThisTask |
int | PTask |
int | ThisNode |
int | NumNodes = 0 |
int | TasksInThisNode |
int | RankInThisNode |
int | MinTasksPerNode |
int | MaxTasksPerNode |
long long | MemoryOnNode |
long long | SharedMemoryOnNode |
Definition at line 29 of file parameters.h.
|
inline |
Definition at line 33 of file parameters.h.
|
inline |
Definition at line 34 of file parameters.h.
void add_param | ( | const char * | name, |
void * | buf, | ||
int | type, | ||
int | flag | ||
) |
Definition at line 30 of file parameters.cc.
int read_parameter_file | ( | const char * | fname | ) |
This function parses the parameter file.
Each parameter is defined by a keyword (‘tag’), and can be either of type douple, int, or character string. Three arrays containing the name, type and address of the parameter are filled first. The routine then parses the parameter file and fills the referenced variables. The routine makes sure that each parameter appears exactly once in the parameter file, otherwise error messages are produced that complain about the missing parameters. Basic checks are performed on the supplied parameters in the end.
fname | The file name of the parameter file |
Definition at line 57 of file parameters.cc.
void write_used_parameters | ( | const char * | dirname, |
const char * | fname | ||
) |
Definition at line 195 of file parameters.cc.
int NParameters = 0 |
Definition at line 42 of file parameters.h.
char ParametersChangeable[MAX_PARAMETERS] |
Definition at line 47 of file parameters.h.
int ParameterSequence[MAX_PARAMETERS] |
Definition at line 48 of file parameters.h.
char ParametersTag[MAX_PARAMETERS][MAXLEN_PARAM_TAG] |
Definition at line 44 of file parameters.h.
char ParametersType[MAX_PARAMETERS] |
Definition at line 46 of file parameters.h.
void* ParametersValue[MAX_PARAMETERS] |
Definition at line 45 of file parameters.h.