 Include dependency graph for cs_base.h:
 Include dependency graph for cs_base.h:Go to the source code of this file.
| Macros | |
| #define | CS_APP_NAME "code_saturne" | 
| #define | CS_APP_VERSION PACKAGE_VERSION /* PACKAGE_VERSION from autoconf */ | 
| #define | CS_MEM_ALIGN 0 | 
| #define | CS_BASE_STRING_LEN 80 | 
| Typedefs | |
| typedef void() | cs_base_atexit_t(void) | 
| typedef void() | cs_base_sigint_handler_t(int signum) | 
| Functions | |
| static const char * | cs_base_strtf (bool boolean) | 
| Return a string "true" or "false" according to the boolean.  More... | |
| char * | cs_base_get_app_name (int argc, const char *argv[]) | 
| void | cs_base_logfile_head (int argc, char *argv[]) | 
| void | cs_base_mpi_init (int *argc, char **argv[]) | 
| MPI_Comm | cs_base_get_rank_step_comm (int rank_step) | 
| Return a reduced communicator matching a multiple of the total number of ranks.  More... | |
| MPI_Comm | cs_base_get_rank_step_comm_recursive (MPI_Comm parent_comm, int rank_step) | 
| void | cs_exit (int status) | 
| void | cs_base_error_init (bool signal_defaults) | 
| void | cs_base_mem_init (void) | 
| void | cs_base_mem_finalize (void) | 
| void | cs_base_signal_restore (void) | 
| void | cs_base_time_summary (void) | 
| void | cs_base_update_status (const char *format,...) | 
| Update status file.  More... | |
| void | cs_base_trace_set (bool trace) | 
| void | cs_base_bft_printf_init (const char *log_name, bool rn_log_flag) | 
| void | cs_base_bft_printf_set (const char *log_name, bool rn_log_flag) | 
| const char * | cs_base_bft_printf_name (void) | 
| bool | cs_base_bft_printf_suppressed (void) | 
| void | cs_base_warn (const char *file_name, int line_num) | 
| void | cs_base_atexit_set (cs_base_atexit_t *const fct) | 
| void | cs_base_sigint_handler_set (cs_base_sigint_handler_t *const h) | 
| void | cs_base_option_string_clean (char *s) | 
| const char * | cs_base_get_localedir (void) | 
| const char * | cs_base_get_pkgdatadir (void) | 
| const char * | cs_base_get_pkglibdir (void) | 
| void | cs_base_check_bool (bool *b) | 
| FILE * | cs_base_open_properties_data_file (const char *base_name) | 
| void * | cs_base_dlopen (const char *filename) | 
| Load a dynamic library.  More... | |
| void * | cs_base_dlopen_plugin (const char *name) | 
| Load a plugin's dynamic library.  More... | |
| int | cs_base_dlopen_get_flags (void) | 
| Get flags for dlopen.  More... | |
| void | cs_base_dlopen_set_flags (int flags) | 
| Set flags for dlopen.  More... | |
| void | cs_base_dlclose (const char *filename, void *handle) | 
| Unload a dynamic library.  More... | |
| void * | cs_base_get_dl_function_pointer (void *handle, const char *name, bool errors_are_fatal) | 
| Get a shared library function pointer.  More... | |
| void | cs_base_backtrace_dump (FILE *f, int lv_start) | 
| Dump a stack trace to a file.  More... | |
| void | cs_base_at_finalize (cs_base_atexit_t *func) | 
| Register a function to be called at the finalization stage.  More... | |
| void | cs_base_finalize_sequence (void) | 
| Call sequence of finalization functions.  More... | |
| void | cs_base_get_run_identity (char **run_id, char **case_name, char **study_name) | 
| Query run-time directory info, using working directory names.  More... | |
| #define CS_APP_NAME "code_saturne" | 
| #define CS_APP_VERSION PACKAGE_VERSION /* PACKAGE_VERSION from autoconf */ | 
| #define CS_BASE_STRING_LEN 80 | 
| #define CS_MEM_ALIGN 0 | 
| typedef void() cs_base_atexit_t(void) | 
| typedef void() cs_base_sigint_handler_t(int signum) | 
| void cs_base_at_finalize | ( | cs_base_atexit_t * | func | ) | 
Register a function to be called at the finalization stage.
The finalization is done in the reverse (first in, last out) sequence relative to calls of cs_base_at_finalize.
| [in] | func | finalization function to call. | 
| void cs_base_atexit_set | ( | cs_base_atexit_t *const | fct | ) | 
| void cs_base_backtrace_dump | ( | FILE * | f, | 
| int | lv_start | ||
| ) | 
Dump a stack trace to a file.
| [in] | f | pointer to file in which to dump trace | 
| [in] | lv_start | start level in stack trace | 
| void cs_base_bft_printf_init | ( | const char * | log_name, | 
| bool | rn_log_flag | ||
| ) | 
| const char* cs_base_bft_printf_name | ( | void | ) | 
| void cs_base_bft_printf_set | ( | const char * | log_name, | 
| bool | rn_log_flag | ||
| ) | 
| bool cs_base_bft_printf_suppressed | ( | void | ) | 
| void cs_base_check_bool | ( | bool * | b | ) | 
| void cs_base_dlclose | ( | const char * | filename, | 
| void * | handle | ||
| ) | 
Unload a dynamic library.
Note that the dlopen underlying mechanism uses a reference count, so a library is really unloaded only one cs_base_dlclose has been called the same number of times as cs_base_dlopen.
| [in] | filename | optional path to shared library file name for error logging, or NULL | 
| [in] | handle | handle to shared library | 
| void* cs_base_dlopen | ( | const char * | filename | ) | 
Load a dynamic library.
| [in] | filename | path to shared library file. | 
| [in] | filename | path to shared library file | 
| int cs_base_dlopen_get_flags | ( | void | ) | 
Get flags for dlopen.
| void* cs_base_dlopen_plugin | ( | const char * | name | ) | 
Load a plugin's dynamic library.
This function is similar to cs_base_dlopen, except that only the base plugin file name (with no extension) needs to be given. It is assumed the file is available in the code's "pkglibdir" directory,
| [in] | name | path to shared library file | 
| void cs_base_dlopen_set_flags | ( | int | flags | ) | 
Set flags for dlopen.
| [in] | flags | flags to set | 
| void cs_base_error_init | ( | bool | signal_defaults | ) | 
| void cs_base_finalize_sequence | ( | void | ) | 
Call sequence of finalization functions.
The finalization is done in the reverse (first in, last out) sequence relative to calls of cs_base_at_finalize.
| char* cs_base_get_app_name | ( | int | argc, | 
| const char * | argv[] | ||
| ) | 
| void* cs_base_get_dl_function_pointer | ( | void * | handle, | 
| const char * | name, | ||
| bool | errors_are_fatal | ||
| ) | 
Get a shared library function pointer.
| [in] | handle | handle to shared library | 
| [in] | name | name of function symbol in library | 
| [in] | errors_are_fatal | abort if true, silently ignore if false | 
| const char* cs_base_get_localedir | ( | void | ) | 
| const char* cs_base_get_pkgdatadir | ( | void | ) | 
| const char* cs_base_get_pkglibdir | ( | void | ) | 
| MPI_Comm cs_base_get_rank_step_comm | ( | int | rank_step | ) | 
Return a reduced communicator matching a multiple of the total number of ranks.
This updates the number of reduced communicators if necessary.
| [in] | rank_step | associated multiple of total ranks | 
| MPI_Comm cs_base_get_rank_step_comm_recursive | ( | MPI_Comm | parent_comm, | 
| int | rank_step | ||
| ) | 
| void cs_base_get_run_identity | ( | char ** | run_id, | 
| char ** | case_name, | ||
| char ** | study_name | ||
| ) | 
Query run-time directory info, using working directory names.
Returned names are allocated if non-NULL, so should be deallocated by the caller when no longer needed.
Names are extracted from the working directory structure, which is expected to be of the form: <prefix>/study_name/case_name/RESU/run_id
or, in the case of a coupled run: <prefix>/study_name/RESU_COUPLING/run_id/case_name
If some names cannot be queried, NULL is returned.
| [out] | run_id | run_id, or NULL | 
| [out] | case_name | case name, or NULL | 
| [out] | study_name | study name, or NULL | 
| void cs_base_logfile_head | ( | int | argc, | 
| char * | argv[] | ||
| ) | 
| void cs_base_mem_finalize | ( | void | ) | 
| void cs_base_mem_init | ( | void | ) | 
| void cs_base_mpi_init | ( | int * | argc, | 
| char ** | argv[] | ||
| ) | 
| FILE* cs_base_open_properties_data_file | ( | const char * | base_name | ) | 
| void cs_base_option_string_clean | ( | char * | s | ) | 
| void cs_base_sigint_handler_set | ( | cs_base_sigint_handler_t *const | h | ) | 
| void cs_base_signal_restore | ( | void | ) | 
| 
 | inlinestatic | 
Return a string "true" or "false" according to the boolean.
| [in] | boolean | bool type | 
| void cs_base_time_summary | ( | void | ) | 
| void cs_base_trace_set | ( | bool | trace | ) | 
| void cs_base_update_status | ( | const char * | format, | 
| ... | |||
| ) | 
Update status file.
If the format string is NULL, the file is removed.
| [in] | format | format string, or NULL | 
| [in] | ... | format arguments | 
| void cs_base_warn | ( | const char * | file_name, | 
| int | line_num | ||
| ) | 
| void cs_exit | ( | int | status | ) |