This file indirectly includes the following files: iostream, map, string, vector, and roccom_basic.h. More...
#include <Roccom_base.h>
Public Types | |
typedef Window::Pointer_descriptor | Pointer_descriptor |
Public Member Functions | |
Module management | |
void | load_module (const std::string &lname, const std::string &wname) throw (int) |
Load a module. More... | |
void | unload_module (const std::string &lname, const std::string &wname, int dodl=1) throw (int) |
Unload a module. More... | |
Window and pane management | |
void | new_window (const std::string &wname, MPI_Comm comm) throw (int) |
Creates a window with given name. More... | |
void | delete_window (const std::string &wname) throw (int) |
Deletes a window with given name. More... | |
void | window_init_done (const std::string &wname, bool panechanged=true) throw (int) |
Marks the end of the registration of a window. More... | |
void | delete_pane (const std::string &wname, const int pid) throw (int) |
Deletes a pane and its associated data. More... | |
Attribute management | |
void | new_attribute (const std::string &wa, const char loc, const int data_type, int size, const std::string &unit) throw (int) |
Creates a new attribute for a window. More... | |
void | delete_attribute (const std::string &wa) throw (int) |
Delete an existing attribute from a window. More... | |
void | set_size (const std::string &wa_str, int pane_id, int nitems, int ng=0) throw (int) |
Set the sizes of an attribute. More... | |
void | set_object (const std::string &wa, const int pane_id, void *obj_addr, void *casted_obj) throw (int) |
Associates an object with a specific window. More... | |
void | get_object (const std::string &wa, const int pane_id, void **ptr) throw (int) |
Associates an object with a specific window. More... | |
void | set_array (const std::string &wa, const int pane_id, void *addr, int strd=0, int cap=0, bool is_const=false) throw (int) |
Associates an array with an attribute for a specific pane. More... | |
template<class T > | |
void | set_bounds (const std::string &wa, const int pane_id, T lbnd, T ubnd) throw (int) |
template<class T > | |
void | set_bounds (const std::string &wa, const int pane_id, const T *lbnd, const T *ubnd) throw (int) |
void | set_bounds (const std::string &wa, const int pane_id, const void *lbnd, const void *ubnd) throw (int) |
void | get_bounds (const std::string &wa, const int pane_id, void *lbnd, void *ubnd) throw (int) |
int | check_bounds (const std::string &wa, int pane_id) throw (int) |
void | allocate_array (const std::string &wa, const int pane_id=0, void **addr=NULL, int strd=0, int cap=0) throw (int) |
Allocate space for an attribute on a specific pane and return the address by setting addr. More... | |
void | resize_array (const std::string &wa, const int pane_id=0, void **addr=NULL, int strd=-1, int cap=0) throw (int) |
Resize an attribute on a specific pane and return the address by setting addr. More... | |
void | append_array (const std::string &wa, const int pane_id, const void *val, int v_strd, int v_size) throw (int) |
Append an array to the end of the attribute on a specific pane and return the new address by setting addr. More... | |
void | use_attribute (const std::string &wname, const std::string &pwname, int withghost=1, const char *cndname=NULL, int val=0) throw (int) |
Use the subset of panes of another window of which the given pane attribute has value val. More... | |
void | clone_attribute (const std::string &wname, const std::string &pwname, int withghost=1, const char *cndname=NULL, int val=0) throw (int) |
Clone the subset of panes of another window of which the given pane attribute has value val. More... | |
void | copy_attribute (const std::string &wname, const std::string &pwname, int withghost=1, const char *cndname=NULL, int val=0) throw (int) |
Copy an attribute onto another. More... | |
void | copy_attribute (int trg_hdl, int src_hdl, int withghost=1, int ptn_hdl=0, int val=0) throw (int) |
Copy an attribute onto another. More... | |
void | deallocate_array (const std::string &wa, const int pid=0) throw (int) |
Deallocate space for an attribute in a pane, asuming the memory was allocated allocate_mesh or allocate_attribute. More... | |
void | get_attribute (const std::string &wa_str, char *loc, int *type, int *size, std::string *unit) throw (int) |
Information retrieval Get the information about an attribute. More... | |
void | get_size (const std::string &wa_str, int pane_id, int *size, int *ng=0) throw (int) |
Get the sizes of an attribute. The opposite of set_size. More... | |
int | get_status (const std::string &wa_str, int pane_id) throw (int) |
Get the status of an attribute. More... | |
void | get_array (const std::string &wa, const int pane_id, void **addr, int *strd=NULL, int *cap=0, bool is_const=false) throw (int) |
Get the address for an attribute on a specific pane. More... | |
void | get_array (const std::string &wa, const int pane_id, Pointer_descriptor &addr, int *strd=NULL, int *cap=0, bool is_const=false) throw (int) |
Get the address for an attribute on a specific pane. More... | |
void | copy_array (const std::string &wa, const int pane_id, void *val, int v_strd=0, int v_size=0, int offset=0) throw (int) |
Copy an array from an attribute on a specific pane into a given buffer. More... | |
void | set_f90pointer (const std::string &waname, void *ptr, Func_ptr f, long int l) throw (int) |
void | get_f90pointer (const std::string &waname, void *ptr, Func_ptr f, long int l) throw (int) |
Information retrieval | |
MPI_Comm | get_communicator (const std::string &wname) throw (int) |
void | get_windows (std::vector< std::string > &) throw (int) |
Obtain a list of all window names. More... | |
void | get_modules (std::vector< std::string > &) throw (int) |
Obtain a list of all module names. More... | |
void | get_panes (const std::string &wname, std::vector< int > &paneids_vec, int rank=-2, int **pane_ids=NULL) throw (int) |
Obtain the panes of a given window on a specific process. More... | |
void | get_attributes (const std::string &wname, int *na, std::string &str, char **names=NULL) throw (int) |
Obtain the user-defined attributes of the given window. More... | |
void | get_connectivities (const std::string &wname, int pane_id, int *nc, std::string &str, char **names=NULL) throw (int) |
Obtain the connectivity tables of a pane of the given window. More... | |
void | get_parent (const std::string &waname, int pane_id, std::string &str, char **name=NULL) throw (int) |
Obtain the parent attribute's name of a given attribute on a given pane. More... | |
void | free_buffer (int **buf) |
void | free_buffer (char **buf) |
int | get_window_handle (const std::string &wname) throw (int) |
Window * | get_window_object (int hdl) throw (int) |
const Window * | get_window_object (int hdl) const throw (int) |
Window * | get_window_object (const std::string &wname) throw (int) |
const Window * | get_window_object (const std::string &wname) const throw (int) |
int | get_attribute_handle (const std::string &waname) throw (int) |
int | get_attribute_handle_const (const std::string &waname) throw (int) |
int | get_function_handle (const std::string &wfname) throw (int) |
Function management | |
void | set_function (const std::string &wf, Func_ptr ptr, const std::string &intents, const COM_Type *types, bool ff=false) throw (int) |
Registers a function to the window. More... | |
void | set_member_function (const std::string &wf, Func_ptr ptr, const std::string &wa, const std::string &intents, const COM_Type *types, bool ff=false) throw (int) |
void | set_member_function (const std::string &wf, Member_func_ptr ptr, const std::string &wa, const std::string &intents, const COM_Type *types, bool ff=false) throw (int) |
int | get_num_arguments (const std::string &wf) throw (COM_exception) |
Get the number of arguments of a given function "window.function". More... | |
int | get_num_arguments (const int wf) throw (COM_exception) |
Get the number of arguments of a given function from its handle. More... | |
void | call_function (int wf, int count, void **args, const int *lens=NULL, bool from_c=true) throw (int) |
Invoke a function with given arguments. More... | |
void | icall_function (int wf, int count, void *args[], int *reqid, const int *lens=NULL) throw (int) |
Nonblockingly invoke a function with given arguments. More... | |
void | wait (int) |
Wait for the completion of a nonblocking call. More... | |
int | test (int) |
Test whether a nonblocking call has finished. More... | |
Profiling and tracing tools | |
int | get_verbose () const |
Determines whether verbose is on. More... | |
int | get_debug () const |
Determines whether verbose is on. More... | |
void | set_verbose (int v) |
Changes the verbose setting. More... | |
void | set_debug (bool debug) |
Turns on debuging messages. More... | |
void | set_function_verbose (int i, int level) throw (int) |
void | set_profiling (int i) |
This subroutine turns on (or off) profiling if i==1 (or ==0). More... | |
void | set_profiling_barrier (int hdl, MPI_Comm comm) |
void | print_profile (const std::string &fname, const std::string &header) |
Protected Member Functions | |
template<class T > | |
void | set_member_function_helper (const std::string &wf, T ptr, const std::string &wa, const std::string &intents, const COM_Type *types, bool ff=false) throw (int) |
std::pair< int, int > | get_f90pntoffsets (const Attribute *a) |
Roccom_base () | |
Window management | |
Window & | get_window (const std::string &wname) throw (COM_exception) |
Obtains a reference to the Window object from its name. More... | |
const Window & | get_window (const std::string &wname) const throw (COM_exception) |
Obtains a constant reference to the Window object from its name. More... | |
Attribute & | get_attribute (const int) throw (COM_exception) |
Obtains a reference to an attribute from its handle. More... | |
const Attribute & | get_attribute (const int) const throw (COM_exception) |
Obtains a const reference to an attribute from its handle. More... | |
Function & | get_function (const int) throw (COM_exception) |
Obtains a reference to an attribute from its handle. More... | |
const Function & | get_function (const int) const throw (COM_exception) |
Obtains a const reference to an attribute from its handle. More... | |
Protected Attributes | |
Module_map | _module_map |
Window_map | _window_map |
Attribute_map | _attr_map |
Function_map | _func_map |
std::string | _libdir |
Library directory. More... | |
std::vector< double > | _timer |
Timers for function calls. More... | |
int | _depth |
Depth of procedure calls. More... | |
int | _verbose |
Indicates whether verbose is on. More... | |
int | _verb1 |
Indicates whether to print detailed information. More... | |
bool | _debug |
Indicated whether debug mode is on. More... | |
MPI_Comm | _comm |
Default communicator of Roccom. More... | |
bool | _mpi_initialized |
Indicates whether MPI was initialized by Roccom. More... | |
int | _errorcode |
Error code. More... | |
bool | _exception_on |
Indicates whether Roccom should throw exception. More... | |
bool | _profile_on |
Indicates whether should profile. More... | |
int | _f90_mangling |
Encoding name mangling. More... | |
int | _f90ptr_treat |
Treatement of F90 pointers. More... | |
int | _cppobj_casting |
Treatement of C++ objects. More... | |
Static Protected Attributes | |
static Roccom_base * | roccom_base =NULL |
Private Types | |
typedef Roccom_map< Window * > | Window_map |
typedef Roccom_map< std::pair < void *, std::set < std::string > > > | Module_map |
typedef Roccom_map< Attribute * > | Attribute_map |
Initialization and Finalization | |
Roccom_base (int *argc, char ***argv) throw ( COM_exception, int) | |
Constructor. More... | |
~Roccom_base () | |
Destructor. More... | |
static void | init (int *argc, char ***argv) throw (int) |
static void | finalize () throw (int) |
static void | abort (int ierr) |
static void | set_default_communicator (MPI_Comm comm) |
Set the default communicator of Roccom. More... | |
static MPI_Comm | get_default_communicator () |
Get the default communicator of Roccom. More... | |
static void | set_roccom (Roccom_base *) |
Set the Roccom pointer to the given object. More... | |
static Roccom_base * | get_roccom () |
Get a pointer to the Roccom object. More... | |
static bool | initialized () |
Checks whether Roccom has been initialized. More... | |
Miscellaneous | |
enum | { FPTR_NONE =0, FPTR_INSERT =1, FPTR_APPEND =2 } |
int | get_error_code () const |
Get the error code. More... | |
void | turn_on_exception () |
void | turn_off_exception () |
int | f90ptr_treat () const |
static int | get_sizeof (COM_Type type, int count=1) |
Gets the size of the data type given by its index. More... | |
int | split_name (const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true) throw (COM_exception) |
Extracts the window and attribute names from "window.attribute". More... | |
void | proc_exception (const COM_exception &, const std::string &) throw ( int) |
This file indirectly includes the following files: iostream, map, string, vector, and roccom_basic.h.
The base class for Roccom implementations.
Definition at line 49 of file Roccom_base.h.
|
private |
Definition at line 52 of file Roccom_base.h.
|
private |
Definition at line 51 of file Roccom_base.h.
Definition at line 54 of file Roccom_base.h.
|
private |
Definition at line 50 of file Roccom_base.h.
anonymous enum |
Enumerator | |
---|---|
FPTR_NONE | |
FPTR_INSERT | |
FPTR_APPEND |
Definition at line 414 of file Roccom_base.h.
Roccom_base | ( | int * | argc, |
char *** | argv | ||
) | |||
throw | ( | COM_exception, | |
int | |||
) |
Constructor.
Definition at line 84 of file Roccom_base.C.
References COMMPI_Comm_rank(), COMMPI_Initialized(), i, MPI_COMM_WORLD, rank, remove_arg(), and s.
~Roccom_base | ( | ) |
Destructor.
Definition at line 181 of file Roccom_base.C.
References _mpi_initialized.
|
protected |
|
static |
Definition at line 205 of file Roccom_base.C.
References COMMPI_Initialized(), and MPI_COMM_WORLD.
Referenced by COM_F_FUNC2(), and generic_list::li_check_list().
void allocate_array | ( | const std::string & | wa, |
const int | pane_id = 0 , |
||
void ** | addr = NULL , |
||
int | strd = 0 , |
||
int | cap = 0 |
||
) | |||
throw | ( | int | |
) |
Allocate space for an attribute on a specific pane and return the address by setting addr.
Allocate for all panes if pane-id is 0, in which case, do not set addr.
Definition at line 695 of file Roccom_base.C.
References append_frame, COM_exception::msg, and s.
void append_array | ( | const std::string & | wa, |
const int | pane_id, | ||
const void * | val, | ||
int | v_strd, | ||
int | v_size | ||
) | |||
throw | ( | int | |
) |
Append an array to the end of the attribute on a specific pane and return the new address by setting addr.
Definition at line 759 of file Roccom_base.C.
References append_frame, COM_exception::msg, and s.
void call_function | ( | int | wf, |
int | count, | ||
void ** | args, | ||
const int * | lens = NULL , |
||
bool | from_c = true |
||
) | |||
throw | ( | int | |
) |
Invoke a function with given arguments.
wf | the handle to the function. |
count | the number of input arguments. |
args | the addresses to the arguments. |
lens | the lengths of character strings. |
Definition at line 1744 of file Roccom_base.C.
References append_frame, Function::attribute(), COM_assertion_msg, COM_CHAR, COM_CHARACTER, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_ERR_ATTRIBUTE_CONST, COM_ERR_IMMUTABLE, COM_ERR_TOO_FEW_ARGS, COM_ERR_TOO_MANY_ARGS, COM_F90POINTER, COM_FLOAT, COM_INT, COM_INTEGER, COM_LOGICAL, COM_LONG, COM_MPI_COMMC, COM_MPI_COMMF, COM_REAL, COM_STRING, COMMPI_Comm_c2f(), COMMPI_Comm_f2c(), Function::data_type(), Attribute::data_type(), get_wtime(), i, iend, Function::intent(), Attribute::is_const(), Function::is_fortran(), Function::is_literal(), Function::is_optional(), Function::is_rawdata(), max(), MAX_NAMELEN, Function::MAX_NUMARG, COM_exception::msg, n, Window::name(), Attribute::name(), Function::num_of_args(), offset(), Attribute::pointer(), and Attribute::window().
Referenced by icall_function().
int check_bounds | ( | const std::string & | wa, |
int | pane_id | ||
) | |||
throw | ( | int | |
) |
Definition at line 1130 of file Roccom_base.C.
void clone_attribute | ( | const std::string & | wname, |
const std::string & | pwname, | ||
int | withghost = 1 , |
||
const char * | cndname = NULL , |
||
int | val = 0 |
||
) | |||
throw | ( | int | |
) |
Clone the subset of panes of another window of which the given pane attribute has value val.
Definition at line 822 of file Roccom_base.C.
References append_frame, COM_ERR_ATTRIBUTE_NOTEXIST, Attribute::empty(), Pane::INHERIT_CLONE, COM_exception::msg, ni, and s.
void copy_array | ( | const std::string & | wa, |
const int | pane_id, | ||
void * | val, | ||
int | v_strd = 0 , |
||
int | v_size = 0 , |
||
int | offset = 0 |
||
) | |||
throw | ( | int | |
) |
Copy an array from an attribute on a specific pane into a given buffer.
Definition at line 1093 of file Roccom_base.C.
References append_frame, COM_exception::msg, offset(), and s.
void copy_attribute | ( | const std::string & | wname, |
const std::string & | pwname, | ||
int | withghost = 1 , |
||
const char * | cndname = NULL , |
||
int | val = 0 |
||
) | |||
throw | ( | int | |
) |
Copy an attribute onto another.
Definition at line 862 of file Roccom_base.C.
References append_frame, COM_ERR_ATTRIBUTE_NOTEXIST, Attribute::empty(), Pane::INHERIT_COPY, COM_exception::msg, ni, and s.
Referenced by copy_attribute().
void copy_attribute | ( | int | trg_hdl, |
int | src_hdl, | ||
int | withghost = 1 , |
||
int | ptn_hdl = 0 , |
||
int | val = 0 |
||
) | |||
throw | ( | int | |
) |
Copy an attribute onto another.
Definition at line 902 of file Roccom_base.C.
References append_frame, COM_ERR_IMMUTABLE, COM_ERR_INVALID_ATTRIBUTE_HANDLE, copy_attribute(), Window::inherit(), Pane::INHERIT_COPY, COM_exception::msg, Attribute::name(), and Attribute::window().
void deallocate_array | ( | const std::string & | wa, |
const int | pid = 0 |
||
) | |||
throw | ( | int | |
) |
Deallocate space for an attribute in a pane, asuming the memory was allocated allocate_mesh or allocate_attribute.
Definition at line 934 of file Roccom_base.C.
References append_frame, COM_exception::msg, and s.
void delete_attribute | ( | const std::string & | wa | ) | |
throw | ( | int | |||
) |
Delete an existing attribute from a window.
Definition at line 548 of file Roccom_base.C.
References append_frame, COM_exception::msg, and s.
void delete_pane | ( | const std::string & | wname, |
const int | pid | ||
) | |||
throw | ( | int | |
) |
Deletes a pane and its associated data.
Definition at line 459 of file Roccom_base.C.
References append_frame, and COM_exception::msg.
void delete_window | ( | const std::string & | wname | ) | |
throw | ( | int | |||
) |
Deletes a window with given name.
Definition at line 441 of file Roccom_base.C.
References append_frame, COM_ERR_WINDOW_NOTEXIST, COM_exception::ierr, COM_exception::msg, and s.
|
inline |
Definition at line 415 of file Roccom_base.h.
References _f90ptr_treat.
|
static |
Definition at line 197 of file Roccom_base.C.
References COM_ERR_WASNOT_INITIALIZED, get_roccom(), and set_roccom().
Referenced by COM_F_FUNC2().
void free_buffer | ( | int ** | buf | ) |
Definition at line 1467 of file Roccom_base.C.
void free_buffer | ( | char ** | buf | ) |
Definition at line 1464 of file Roccom_base.C.
void get_array | ( | const std::string & | wa, |
const int | pane_id, | ||
void ** | addr, | ||
int * | strd = NULL , |
||
int * | cap = 0 , |
||
bool | is_const = false |
||
) | |||
throw | ( | int | |
) |
Get the address for an attribute on a specific pane.
Definition at line 1012 of file Roccom_base.C.
References Window::Pointer_descriptor::ptr.
Referenced by get_array().
void get_array | ( | const std::string & | wa, |
const int | pane_id, | ||
Pointer_descriptor & | addr, | ||
int * | strd = NULL , |
||
int * | cap = 0 , |
||
bool | is_const = false |
||
) | |||
throw | ( | int | |
) |
Get the address for an attribute on a specific pane.
Definition at line 1022 of file Roccom_base.C.
References append_frame, get_array(), COM_exception::msg, and s.
void get_attribute | ( | const std::string & | wa_str, |
char * | loc, | ||
int * | type, | ||
int * | size, | ||
std::string * | unit | ||
) | |||
throw | ( | int | |
) |
Information retrieval Get the information about an attribute.
The opposite of new_attribute.
Definition at line 958 of file Roccom_base.C.
References append_frame, COM_exception::msg, print_type(), and s.
Referenced by get_attribute().
|
protected |
Obtains a reference to an attribute from its handle.
Definition at line 2176 of file Roccom_base.C.
References append_frame, COM_ERR_INVALID_ATTRIBUTE_HANDLE, and get_attribute().
|
protected |
Obtains a const reference to an attribute from its handle.
Definition at line 2191 of file Roccom_base.C.
References append_frame, COM_ERR_INVALID_ATTRIBUTE_HANDLE, and get_attribute().
int get_attribute_handle | ( | const std::string & | waname | ) | |
throw | ( | int | |||
) |
Definition at line 1540 of file Roccom_base.C.
References append_frame, COM_exception::msg, and n.
int get_attribute_handle_const | ( | const std::string & | waname | ) | |
throw | ( | int | |||
) |
Definition at line 1513 of file Roccom_base.C.
References append_frame, COM_exception::msg, and n.
void get_attributes | ( | const std::string & | wname, |
int * | na, | ||
std::string & | str, | ||
char ** | names = NULL |
||
) | |||
throw | ( | int | |
) |
Obtain the user-defined attributes of the given window.
Definition at line 1349 of file Roccom_base.C.
References append_frame, copy, i, COM_exception::msg, n, and s.
void get_bounds | ( | const std::string & | wa, |
const int | pane_id, | ||
void * | lbnd, | ||
void * | ubnd | ||
) | |||
throw | ( | int | |
) |
Definition at line 1126 of file Roccom_base.C.
MPI_Comm get_communicator | ( | const std::string & | wname | ) | |
throw | ( | int | |||
) |
Definition at line 1241 of file Roccom_base.C.
References append_frame, COMMPI_Initialized(), Window::get_communicator(), COM_exception::msg, and s.
void get_connectivities | ( | const std::string & | wname, |
int | pane_id, | ||
int * | nc, | ||
std::string & | str, | ||
char ** | names = NULL |
||
) | |||
throw | ( | int | |
) |
Obtain the connectivity tables of a pane of the given window.
Definition at line 1390 of file Roccom_base.C.
References append_frame, copy, i, COM_exception::msg, n, and s.
|
inline |
|
inlinestatic |
Get the default communicator of Roccom.
Definition at line 75 of file Roccom_base.h.
References _comm, and get_roccom().
Referenced by COM_F_FUNC2().
|
inline |
|
protected |
Definition at line 1135 of file Roccom_base.C.
References _f90ptr_treat, COM_assertion_msg, COM_F90POINTER, FPTR_INSERT, Attribute::get_sizeof(), n, and Attribute::size_of_components().
void get_f90pointer | ( | const std::string & | waname, |
void * | ptr, | ||
Func_ptr | f, | ||
long int | l | ||
) | |||
throw | ( | int | |
) |
Definition at line 1202 of file Roccom_base.C.
References append_frame, COM_assertion_msg, COM_ERR_NOT_A_POINTER, COM_ERR_NOT_A_WINDOW_ATTRIBUTE, COM_F90POINTER, Attribute::data_type(), Attribute::location(), COM_exception::msg, and Attribute::pointer().
|
protected |
Obtains a reference to an attribute from its handle.
Definition at line 2206 of file Roccom_base.C.
References append_frame, and COM_ERR_INVALID_FUNCTION_HANDLE.
Referenced by get_function(), and set_profiling_barrier().
|
protected |
Obtains a const reference to an attribute from its handle.
Definition at line 2222 of file Roccom_base.C.
References append_frame, COM_ERR_INVALID_FUNCTION_HANDLE, and get_function().
int get_function_handle | ( | const std::string & | wfname | ) | |
throw | ( | int | |||
) |
Definition at line 1565 of file Roccom_base.C.
References append_frame, COM_exception::msg, and n.
void get_modules | ( | std::vector< std::string > & | names | ) | |
throw | ( | int | |||
) |
Obtain a list of all module names.
Definition at line 1322 of file Roccom_base.C.
References append_frame, COM_exception::msg, and s.
int get_num_arguments | ( | const std::string & | wf | ) | |
throw | ( | COM_exception | |||
) |
Get the number of arguments of a given function "window.function".
Definition at line 1716 of file Roccom_base.C.
References append_frame, COM_ERR_FUNCTION_NOTEXIST, Function::num_of_args(), and set_member_function().
int get_num_arguments | ( | const int | wf | ) | |
throw | ( | COM_exception | |||
) |
Get the number of arguments of a given function from its handle.
Definition at line 1728 of file Roccom_base.C.
References Function::num_of_args().
void get_object | ( | const std::string & | wa, |
const int | pane_id, | ||
void ** | ptr | ||
) | |||
throw | ( | int | |
) |
Associates an object with a specific window.
Definition at line 648 of file Roccom_base.C.
void get_panes | ( | const std::string & | wname, |
std::vector< int > & | paneids_vec, | ||
int | rank = -2 , |
||
int ** | pane_ids = NULL |
||
) | |||
throw | ( | int | |
) |
Obtain the panes of a given window on a specific process.
If rank is -2, then the current process is assumed. If rank is -1, then get the panes on all processes within the window's communicator.
Definition at line 1264 of file Roccom_base.C.
References append_frame, copy, COM_exception::msg, rank, and s.
void get_parent | ( | const std::string & | waname, |
int | pane_id, | ||
std::string & | str, | ||
char ** | name = NULL |
||
) | |||
throw | ( | int | |
) |
Obtain the parent attribute's name of a given attribute on a given pane.
If the attribute has no parent, then set name to empty.
Definition at line 1431 of file Roccom_base.C.
References append_frame, copy, COM_exception::msg, and s.
|
inlinestatic |
Get a pointer to the Roccom object.
Definition at line 505 of file Roccom_base.h.
References roccom_base.
Referenced by finalize(), get_default_communicator(), initialized(), and set_default_communicator().
void get_size | ( | const std::string & | wa_str, |
int | pane_id, | ||
int * | size, | ||
int * | ng = 0 |
||
) | |||
throw | ( | int | |
) |
Get the sizes of an attribute. The opposite of set_size.
Definition at line 988 of file Roccom_base.C.
References append_frame, COM_exception::msg, and s.
|
static |
Gets the size of the data type given by its index.
Definition at line 2162 of file Roccom_base.C.
References Attribute::get_sizeof().
int get_status | ( | const std::string & | wa_str, |
int | pane_id | ||
) | |||
throw | ( | int | |
) |
Get the status of an attribute.
If the attribute name is empty, and pane ID is 0, then checks whether the window exist (return 0 if does and -1 if not); if attribute name is empty and pane ID is >0, then check whether check whether the given pane exists (return 0 if so and -1 if not). Otherwise, it checks the status of an attribute and returns one of the following values: -1: not exist. 0: not yet initialized 1: set by the user. 2: set by the user with const modifier. 3: inherited from (i.e., use) another attribute. 4: allocated by Roccom.
Definition at line 1055 of file Roccom_base.C.
References append_frame, Window::get_status(), COM_exception::msg, and s.
|
inline |
|
protected |
Obtains a reference to the Window object from its name.
Definition at line 2166 of file Roccom_base.C.
References append_frame, and COM_ERR_WINDOW_NOTEXIST.
Referenced by get_window(), and get_window_object().
|
inlineprotected |
Obtains a constant reference to the Window object from its name.
Definition at line 436 of file Roccom_base.h.
References get_window().
int get_window_handle | ( | const std::string & | wname | ) | |
throw | ( | int | |||
) |
Definition at line 1471 of file Roccom_base.C.
References append_frame, COM_assertion, COM_exception::msg, and n.
Referenced by get_window_object().
Window * get_window_object | ( | int | hdl | ) | |
throw | ( | int | |||
) |
Definition at line 1495 of file Roccom_base.C.
References append_frame, COM_ERR_INVALID_WINDOW_HANDLE, and get_window().
Referenced by get_window_object().
const Window * get_window_object | ( | int | hdl | ) | const |
throw | ( | int | |||
) |
Definition at line 1504 of file Roccom_base.C.
References append_frame, COM_ERR_INVALID_WINDOW_HANDLE, and get_window_object().
|
inline |
Definition at line 301 of file Roccom_base.h.
References get_window_handle(), and get_window_object().
|
inline |
Definition at line 303 of file Roccom_base.h.
References get_window_handle(), and get_window_object().
void get_windows | ( | std::vector< std::string > & | names | ) | |
throw | ( | int | |||
) |
Obtain a list of all window names.
Definition at line 1294 of file Roccom_base.C.
References append_frame, COM_exception::msg, and s.
|
inline |
Nonblockingly invoke a function with given arguments.
wf | the handle to the function. |
count | the number of input arguments. |
args | the addresses to the arguments. |
reqid | is set to the request of the current call. |
lens | the lengths of character strings. |
Definition at line 364 of file Roccom_base.h.
References call_function().
|
static |
Definition at line 186 of file Roccom_base.C.
References COM_ERR_WAS_INITIALIZED, and printStackBacktrace().
Referenced by COM_F_FUNC2().
|
inlinestatic |
Checks whether Roccom has been initialized.
Definition at line 82 of file Roccom_base.h.
References get_roccom().
Referenced by COM_F_FUNC2().
void load_module | ( | const std::string & | lname, |
const std::string & | wname | ||
) | |||
throw | ( | int | |
) |
Load a module.
Definition at line 211 of file Roccom_base.C.
References COM_ERR_COULD_FINDSYM, COM_ERR_COULD_OPENLIB, i, iend, MPI_COMM_SELF, and swap().
void new_attribute | ( | const std::string & | wa, |
const char | loc, | ||
const int | data_type, | ||
int | size, | ||
const std::string & | unit | ||
) | |||
throw | ( | int | |
) |
Creates a new attribute for a window.
Definition at line 516 of file Roccom_base.C.
References append_frame, COM_exception::msg, print_type(), and s.
void new_window | ( | const std::string & | wname, |
MPI_Comm | comm | ||
) | |||
throw | ( | int | |
) |
Creates a window with given name.
Definition at line 399 of file Roccom_base.C.
References append_frame, COM_WARN_DUP_WINDOW, COM_exception::msg, and s.
void print_profile | ( | const std::string & | fname, |
const std::string & | header | ||
) |
Definition at line 2106 of file Roccom_base.C.
References _debug, _func_map, _profile_on, Function_map::counts, cimg_library::cimg::fclose(), cimg_library::cimg::fopen(), i, iend, n, Roccom_map< Object >::name(), Function_map::wtimes_self, and Function_map::wtimes_tree.
|
protected |
Definition at line 2259 of file Roccom_base.C.
References printStackBacktrace(), and s.
Referenced by set_profiling_barrier().
void resize_array | ( | const std::string & | wa, |
const int | pane_id = 0 , |
||
void ** | addr = NULL , |
||
int | strd = -1 , |
||
int | cap = 0 |
||
) | |||
throw | ( | int | |
) |
Resize an attribute on a specific pane and return the address by setting addr.
Resize for all panes if pane-id is 0, in which case, do not set addr. The difference between resize and allocate is that resize will reallocate memory only if the current array cannot accomodate the requested capacity.
Definition at line 727 of file Roccom_base.C.
References append_frame, COM_exception::msg, and s.
void set_array | ( | const std::string & | wa, |
const int | pane_id, | ||
void * | addr, | ||
int | strd = 0 , |
||
int | cap = 0 , |
||
bool | is_const = false |
||
) | |||
throw | ( | int | |
) |
Associates an array with an attribute for a specific pane.
Definition at line 658 of file Roccom_base.C.
References append_frame, COM_exception::msg, and s.
|
inline |
Definition at line 146 of file Roccom_base.h.
Referenced by set_bounds().
|
inline |
Definition at line 151 of file Roccom_base.h.
References set_bounds().
void set_bounds | ( | const std::string & | wa, |
const int | pane_id, | ||
const void * | lbnd, | ||
const void * | ubnd | ||
) | |||
throw | ( | int | |
) |
Definition at line 691 of file Roccom_base.C.
|
inline |
|
inlinestatic |
Set the default communicator of Roccom.
This communicator will be used as the default communicator for any new window.
Definition at line 71 of file Roccom_base.h.
References _comm, and get_roccom().
Referenced by COM_F_FUNC2().
void set_f90pointer | ( | const std::string & | waname, |
void * | ptr, | ||
Func_ptr | f, | ||
long int | l | ||
) | |||
throw | ( | int | |
) |
Definition at line 1147 of file Roccom_base.C.
References append_frame, COM_assertion_msg, COM_ERR_NOT_A_POINTER, COM_ERR_NOT_A_WINDOW_ATTRIBUTE, COM_F90POINTER, Attribute::data_type(), get_sizeof(), i, Attribute::location(), COM_exception::msg, n, ni, Attribute::pointer(), and Attribute::size_of_components().
void set_function | ( | const std::string & | wf, |
Func_ptr | ptr, | ||
const std::string & | intents, | ||
const COM_Type * | types, | ||
bool | ff = false |
||
) | |||
throw | ( | int | |
) |
Registers a function to the window.
The names of the window and the function is give by wf in the format of "window.function" (null terminated). The address is given by ptr. The last two arguments specifies the number of the arguments, the intentions and types of the arguments.
Definition at line 1589 of file Roccom_base.C.
References append_frame, COM_ERR_TOO_MANY_ARGS, COM_ERR_UNKNOWN_DATATYPE, COM_ERR_UNKNOWN_INTENT, COM_MAX_TYPEID, COM_MIN_TYPEID, COMMPI_Comm_rank(), i, Function::MAX_NUMARG, MPI_COMM_WORLD, COM_exception::msg, n, print_type(), rank, and s.
Referenced by set_member_function_helper().
void set_function_verbose | ( | int | i, |
int | level | ||
) | |||
throw | ( | int | |
) |
void set_member_function | ( | const std::string & | wf, |
Func_ptr | ptr, | ||
const std::string & | wa, | ||
const std::string & | intents, | ||
const COM_Type * | types, | ||
bool | ff = false |
||
) | |||
throw | ( | int | |
) |
Definition at line 1695 of file Roccom_base.C.
Referenced by get_num_arguments(), and set_member_function_helper().
void set_member_function | ( | const std::string & | wf, |
Member_func_ptr | ptr, | ||
const std::string & | wa, | ||
const std::string & | intents, | ||
const COM_Type * | types, | ||
bool | ff = false |
||
) | |||
throw | ( | int | |
) |
Definition at line 1705 of file Roccom_base.C.
|
protected |
Definition at line 1636 of file Roccom_base.C.
References append_frame, COM_ERR_ATTRIBUTE_NOTEXIST, COM_ERR_F90FUNC, COM_ERR_TOO_MANY_ARGS, COM_ERR_UNKNOWN_DATATYPE, COM_ERR_UNKNOWN_INTENT, COM_F90POINTER, COM_MAX_TYPEID, COM_MIN_TYPEID, Attribute::data_type(), i, Function::MAX_NUMARG, COM_exception::msg, n, print_type(), s, set_function(), and set_member_function().
void set_object | ( | const std::string & | wa, |
const int | pane_id, | ||
void * | obj_addr, | ||
void * | casted_obj | ||
) | |||
throw | ( | int | |
) |
Associates an object with a specific window.
Definition at line 625 of file Roccom_base.C.
References COM_Object_derived::cast_obj(), and COM_assertion_msg.
void set_profiling | ( | int | i | ) |
This subroutine turns on (or off) profiling if i==1 (or ==0).
It (re-)initializes all profiling info to 0.
Definition at line 2069 of file Roccom_base.C.
References _debug, _func_map, _profile_on, Function_map::counts, i, Function_map::wtimes_self, and Function_map::wtimes_tree.
void set_profiling_barrier | ( | int | hdl, |
MPI_Comm | comm | ||
) |
Definition at line 2079 of file Roccom_base.C.
References _comm, _debug, _func_map, append_frame, COM_ERR_INVALID_FUNCTION_HANDLE, COMMPI_Initialized(), get_function(), COM_exception::msg, Roccom_map< Object >::name(), proc_exception(), Function::set_communicator(), and Roccom_map< Object >::size().
|
static |
Set the Roccom pointer to the given object.
It was introduced to support processes.
Definition at line 56 of file Roccom_base.C.
References roccom_base.
Referenced by finalize().
void set_size | ( | const std::string & | wa_str, |
int | pane_id, | ||
int | nitems, | ||
int | ng = 0 |
||
) | |||
throw | ( | int | |
) |
Set the sizes of an attribute.
Note that for nodal or elemental data, setting sizes for one such attributes affects all other attributes.
Definition at line 569 of file Roccom_base.C.
References append_frame, COM_exception::msg, and s.
|
inline |
Changes the verbose setting.
Definition at line 384 of file Roccom_base.h.
References _verb1, _verbose, and v.
|
protected |
Extracts the window and attribute names from "window.attribute".
Returns nonzero if fails.
Definition at line 2236 of file Roccom_base.C.
References append_frame, COM_ERR_INVALID_ATTRIBUTE_NAME, and ni.
|
inline |
Test whether a nonblocking call has finished.
Definition at line 371 of file Roccom_base.h.
|
inline |
Definition at line 412 of file Roccom_base.h.
References _exception_on.
|
inline |
Definition at line 411 of file Roccom_base.h.
References _exception_on.
void unload_module | ( | const std::string & | lname, |
const std::string & | wname, | ||
int | dodl = 1 |
||
) | |||
throw | ( | int | |
) |
Unload a module.
Definition at line 324 of file Roccom_base.C.
References COM_ERR_COULD_FINDSYM, and COM_ERR_MODULE_NOTLOADED.
void use_attribute | ( | const std::string & | wname, |
const std::string & | pwname, | ||
int | withghost = 1 , |
||
const char * | cndname = NULL , |
||
int | val = 0 |
||
) | |||
throw | ( | int | |
) |
Use the subset of panes of another window of which the given pane attribute has value val.
Definition at line 782 of file Roccom_base.C.
References append_frame, COM_ERR_ATTRIBUTE_NOTEXIST, Attribute::empty(), Pane::INHERIT_USE, COM_exception::msg, ni, and s.
|
inline |
void window_init_done | ( | const std::string & | wname, |
bool | panechanged = true |
||
) | |||
throw | ( | int | |
) |
Marks the end of the registration of a window.
Definition at line 424 of file Roccom_base.C.
References append_frame, and COM_exception::msg.
|
protected |
Definition at line 472 of file Roccom_base.h.
|
protected |
Default communicator of Roccom.
Definition at line 481 of file Roccom_base.h.
Referenced by get_default_communicator(), set_default_communicator(), and set_profiling_barrier().
|
protected |
Treatement of C++ objects.
-1: Unknown 0: No casting to COM_Object 1: Casting to COM_Object
Definition at line 494 of file Roccom_base.h.
|
protected |
Indicated whether debug mode is on.
Definition at line 480 of file Roccom_base.h.
Referenced by get_debug(), print_profile(), set_debug(), set_profiling(), and set_profiling_barrier().
|
protected |
Depth of procedure calls.
Definition at line 477 of file Roccom_base.h.
|
protected |
|
protected |
Indicates whether Roccom should throw exception.
Definition at line 484 of file Roccom_base.h.
Referenced by turn_off_exception(), and turn_on_exception().
|
protected |
Encoding name mangling.
-1: Unknown. 0: lower-case without appending 1: upper-case without appending 2: lower-case with appending 3: upper-case with appending
Definition at line 487 of file Roccom_base.h.
|
protected |
Treatement of F90 pointers.
Definition at line 493 of file Roccom_base.h.
Referenced by COM_F_FUNC2(), f90ptr_treat(), and get_f90pntoffsets().
|
protected |
Definition at line 473 of file Roccom_base.h.
Referenced by print_profile(), set_profiling(), and set_profiling_barrier().
|
protected |
Library directory.
Definition at line 475 of file Roccom_base.h.
|
protected |
Definition at line 470 of file Roccom_base.h.
|
protected |
Indicates whether MPI was initialized by Roccom.
Definition at line 482 of file Roccom_base.h.
Referenced by ~Roccom_base().
|
protected |
Indicates whether should profile.
Definition at line 485 of file Roccom_base.h.
Referenced by print_profile(), and set_profiling().
|
protected |
Timers for function calls.
Definition at line 476 of file Roccom_base.h.
|
protected |
Indicates whether to print detailed information.
Definition at line 479 of file Roccom_base.h.
Referenced by set_verbose().
|
protected |
Indicates whether verbose is on.
Definition at line 478 of file Roccom_base.h.
Referenced by set_verbose().
|
protected |
Definition at line 471 of file Roccom_base.h.
|
staticprotected |
Definition at line 499 of file Roccom_base.h.
Referenced by get_roccom(), and set_roccom().