ESPResSo 3.2.0-159-gf5c8922-git
Extensible Simulation Package for Soft Matter Research
Functions
parser.c File Reference

Implementation of parser.h. More...

#include "utils.h"
#include "parser.h"
#include "communication.h"
Include dependency graph for parser.c:

Go to the source code of this file.

Functions

int parse_int_list (Tcl_Interp *interp, char *list, IntList *il)
 parse an integer list
int parse_double_list (Tcl_Interp *interp, char *list, DoubleList *dl)
 parse an double list
int gather_runtime_errors (Tcl_Interp *interp, int error_code)
 gather all error messages from all nodes and set the interpreter result to these error messages.

Detailed Description

Implementation of parser.h.

parse_int_list is too long for inlining.

Definition in file parser.c.


Function Documentation

int gather_runtime_errors ( Tcl_Interp *  interp,
int  ret_state 
)

gather all error messages from all nodes and set the interpreter result to these error messages.

This should be called only on the master node.

The errors are append to the result, if ret_state == TCL_ERROR, otherwise the result is overwritten, in case an error occurs. Therefore you should end any Tcl command handler by return gather_runtime_errors(<return_value>). This code uses asynchronous communication.

Parameters:
ret_statereturn value of the procedure
interpwhere to put the errors
Returns:
new return value after the background errors, if any, have been handled

Definition at line 51 of file parser.c.

References ES_OK, free, malloc, mpi_gather_runtime_errors(), and n_nodes.

Referenced by tclcommand_adress(), tclcommand_analyze(), tclcommand_blockfile(), tclcommand_cellsystem(), tclcommand_change_volume(), tclcommand_constraint(), tclcommand_counterions(), tclcommand_crosslink(), tclcommand_diamond(), tclcommand_icosaeder(), tclcommand_integrate(), tclcommand_inter(), tclcommand_inter_coulomb_parse_mmm1d(), tclcommand_lbboundary(), tclcommand_lbfluid(), tclcommand_maxwell_velocities(), tclcommand_metadynamics(), tclcommand_nemd(), tclcommand_part_parse_cmd(), tclcommand_salt(), tclcommand_setmd(), tclcommand_thermostat(), and tclcommand_velocities().

int parse_double_list ( Tcl_Interp *  interp,
char *  list,
DoubleList dl 
)

parse an double list

Parameters:
interpfor conversion of backslash stuff
listthe string containing the list
dlwhere to store the results

Definition at line 40 of file parser.c.

References DoubleList::e, i, DoubleList::n, and realloc_doublelist().

int parse_int_list ( Tcl_Interp *  interp,
char *  list,
IntList il 
)

parse an integer list

Parameters:
interpfor conversion of backslash stuff
listthe string containing the list
ilwhere to store the results

Definition at line 29 of file parser.c.

References IntList::e, i, IntList::n, and realloc_intlist().

Referenced by parse_id_list().