Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Roccom_base Class Reference

This file indirectly includes the following files: iostream, map, string, vector, and roccom_basic.h. More...

#include <Roccom_base.h>

Inheritance diagram for Roccom_base:
Collaboration diagram for Roccom_base:

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)
 
Windowget_window_object (int hdl) throw (int)
 
const Windowget_window_object (int hdl) const throw (int)
 
Windowget_window_object (const std::string &wname) throw (int)
 
const Windowget_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
Windowget_window (const std::string &wname) throw (COM_exception)
 Obtains a reference to the Window object from its name. More...
 
const Windowget_window (const std::string &wname) const throw (COM_exception)
 Obtains a constant reference to the Window object from its name. More...
 
Attributeget_attribute (const int) throw (COM_exception)
 Obtains a reference to an attribute from its handle. More...
 
const Attributeget_attribute (const int) const throw (COM_exception)
 Obtains a const reference to an attribute from its handle. More...
 
Functionget_function (const int) throw (COM_exception)
 Obtains a reference to an attribute from its handle. More...
 
const Functionget_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_baseroccom_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_baseget_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)
 

Detailed Description

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.

Member Typedef Documentation

typedef Roccom_map<Attribute*> Attribute_map
private

Definition at line 52 of file Roccom_base.h.

typedef Roccom_map<std::pair<void *, std::set<std::string> > > Module_map
private

Definition at line 51 of file Roccom_base.h.

Definition at line 54 of file Roccom_base.h.

typedef Roccom_map<Window*> Window_map
private

Definition at line 50 of file Roccom_base.h.

Member Enumeration Documentation

anonymous enum
Enumerator
FPTR_NONE 
FPTR_INSERT 
FPTR_APPEND 

Definition at line 414 of file Roccom_base.h.

Constructor & Destructor Documentation

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.

85  : _depth(0), _verbose(0), _verb1(0), _comm(MPI_COMM_WORLD),
87  _debug(false)
88 {
89  _attr_map.add_object("",NULL);
90  _func_map.add_object("",NULL);
91  _errorcode = 0;
92 
93 #ifdef PREFIX
94  _libdir = std::string(PREFIX);
95 #endif
96 
97  const char *comhome = std::getenv( "ROCCOM_HOME");
98  if ( comhome) _libdir = comhome;
99  else {
100  comhome = std::getenv( "ROCSTAR_HOME");
101  if ( comhome) _libdir = comhome;
102  }
103 
104  if ( !_libdir.empty()) _libdir.append( "/lib/");
105 
106  // Parse command-line options
107  std::map<int,int> verb_maps; // Process-specific verbose level
108  int i=1;
109 
110  while ( argc && i<*argc) {
111  if ( std::strncmp((*argv)[i], "-com-v", 6) == 0) {
112  // Check whether a number follows -com-v
113  const char *s=(*argv)[i]+6;
114  int rank = -1; // Default are all processes
115  if ( s[0] != '\0') rank = std::atoi( s);
116 
117  int verb=1;
118  if ( *argc>i+1 && (*argv)[i+1][0]>='0' && (*argv)[i+1][0]<='9')
119  { verb = std::atoi( (*argv)[i+1]); remove_arg( argc, argv, i+1); }
120 
121  if ( rank == -1) set_verbose(verb);
122  else verb_maps[rank] = verb;
123 
124  remove_arg( argc, argv, i);
125  }
126  else if ( std::strcmp((*argv)[i], "-com-mpi") == 0) {
127  if ( !COMMPI_Initialized()) _mpi_initialized=true;
128 
129  remove_arg( argc, argv, i);
130  }
131  else if ( std::strcmp((*argv)[i], "-com-home") == 0) {
132  if ( *argc>i+1 && (*argv)[i+1][0]>='0' && (*argv)[i+1][0]<='9') {
133  _libdir = (*argv)[i+1]; _libdir.append( "/lib/");
134  remove_arg( argc, argv, i+1);
135  }
136  remove_arg( argc, argv, i);
137  }
138  else
139  ++i;
140  }
141 
142 
143  // Initialize MPI if requested and MPI is not yet initialized.
144  // if ( _mpi_initialized){
145  // std::cout << "INITIALIZING MPI!!!" << std::endl;
146  if(!COMMPI_Initialized())
147  MPI_Init( argc, argv);
148  // }
149  // Set process-specific verbose level
150  int rank = 0;
152  std::map<int,int>::const_iterator it=verb_maps.find( rank);
153  if ( it!=verb_maps.end()) set_verbose( it->second);
154 
155  // Determine the F90 pointer treatment mode
156  _f90_mangling = -1;
157  _f90ptr_treat = -1;
158 
159 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
160  // For GNU C++, we know to use the csated address.
161  _cppobj_casting = 1;
162 #elif defined(_POWER) || defined(__INTEL_COMPILER)
163  // For IBM and INTEL compilers, we know to use the object's address
164  _cppobj_casting = 0;
165 #else
166  _cppobj_casting = -1;
167 #endif
168 
169  if ( _debug && rank == 0) {
170  std::cerr << "Roccom Version 3.0. CVS $Id: Roccom_base.C,v 1.93 2008/12/06 08:43:25 mtcampbe Exp $" << std::endl;
171  std::cerr << "Roccom: Started with verbose level " << _verbose << std::endl;
172 #ifndef DUMMY_MPI
173  if ( !COMMPI_Initialized())
174  std::cerr << "Roccom: MPI not initialized. Running in serial mode\n";
175 #else
176  std::cerr << "Roccom: Running in serial mode with DUMMY_MPI\n";
177 #endif
178  }
179 }
int COMMPI_Comm_rank(MPI_Comm c)
Definition: commpi.h:162
int _depth
Depth of procedure calls.
Definition: Roccom_base.h:477
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_COMM_WORLD
int add_object(const std::string &n, Function *t)
Insert a function into the table.
Definition: maps.h:138
static void remove_arg(int *argc, char ***argv, int i)
Remove an argument from the argument list.
Definition: Roccom_base.C:78
int _f90_mangling
Encoding name mangling.
Definition: Roccom_base.h:487
double s
Definition: blastest.C:80
Attribute_map _attr_map
Definition: Roccom_base.h:472
bool _exception_on
Indicates whether Roccom should throw exception.
Definition: Roccom_base.h:484
std::string _libdir
Library directory.
Definition: Roccom_base.h:475
int _verb1
Indicates whether to print detailed information.
Definition: Roccom_base.h:479
int _f90ptr_treat
Treatement of F90 pointers.
Definition: Roccom_base.h:493
MPI_Comm _comm
Default communicator of Roccom.
Definition: Roccom_base.h:481
blockLoc i
Definition: read.cpp:79
bool _profile_on
Indicates whether should profile.
Definition: Roccom_base.h:485
void set_verbose(int v)
Changes the verbose setting.
Definition: Roccom_base.h:384
int _errorcode
Error code.
Definition: Roccom_base.h:483
int _verbose
Indicates whether verbose is on.
Definition: Roccom_base.h:478
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int add_object(std::string name, Object t, bool is_const=false)
Insert an object into the table.
Definition: maps.h:97
bool _mpi_initialized
Indicates whether MPI was initialized by Roccom.
Definition: Roccom_base.h:482
static int rank
Definition: advectest.C:66
int COMMPI_Initialized()
Definition: commpi.h:168
int _cppobj_casting
Treatement of C++ objects.
Definition: Roccom_base.h:494
Function_map _func_map
Definition: Roccom_base.h:473

Here is the call graph for this function:

Destructor.

Definition at line 181 of file Roccom_base.C.

References _mpi_initialized.

181  {
182  // If MPI was initialized by Roccom, then call MPI_Finalize.
183  if (_mpi_initialized) MPI_Finalize();
184 }
bool _mpi_initialized
Indicates whether MPI was initialized by Roccom.
Definition: Roccom_base.h:482
Roccom_base ( )
protected

Member Function Documentation

void abort ( int  ierr)
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().

205  {
206  if ( COMMPI_Initialized() ) MPI_Abort( MPI_COMM_WORLD, ierr);
207  else exit( ierr);
208 }
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_COMM_WORLD
int COMMPI_Initialized()
Definition: commpi.h:168

Here is the call graph for this function:

Here is the caller graph for this function:

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.

697 {
698  try {
699  if ( _debug) {
700  std::cerr << "Roccom: Allocate array for \"" << wa << "\" on pane "
701  << pid << " with stride ";
702  if ( strd) std::cerr << strd;
703  else std::cerr << "==#components";
704 
705  std::cerr << " and capacity ";
706 
707  if ( cap) std::cerr << cap;
708  else std::cerr << "==#items";
709 
710  std::cerr << std::endl;
711  }
712 
713  std::string wname, aname;
714  split_name( wa, wname, aname);
715 
716  get_window( wname).alloc_array( aname, pid, addr, strd, cap);
717  _errorcode = 0;
718  }
719  catch ( COM_exception ex) {
721  std::string s;
722  s = s + "When processing attribute " + wa;
723  proc_exception( ex, s);
724  }
725 }
void alloc_array(const std::string &aname, const int pane_id, void **addr, int strd=0, int cap=0)
Allocate memory for an attribute for a specific pane and set addr to the address. ...
Definition: Window.C:238
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
void allocate_array(const std::string &wa, const int pane_id=0, void **addr=NULL, int strd=0, int cap=0)
Allocate space for an attribute on a specific pane and return the address by setting addr...
Definition: Roccom_base.C:695
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.

761 {
762  try {
763  if ( _debug)
764  std::cerr << "Roccom: Appending array " << val << " for \"" << wa
765  << "\" on pane " << pid << " with stride " << v_strd
766  << " and size " << v_size << std::endl;
767 
768  std::string wname, aname;
769  split_name( wa, wname, aname);
770 
771  get_window( wname).append_array( aname, pid, val, v_strd, v_size);
772  _errorcode = 0;
773  }
774  catch ( COM_exception ex) {
776  std::string s("When processing attribute "); s.append(wa);
777  proc_exception( ex, s);
778  }
779 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
int _errorcode
Error code.
Definition: Roccom_base.h:483
void append_array(const std::string &aname, const int pane_id, const void *val, int v_strd, int v_size)
Append the given array to the end of the attribute on a specific pane, and reallocate memory for the ...
Definition: Window.C:284
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
void append_array(const std::string &wa, const int pane_id, const void *val, int v_strd, int v_size)
Append an array to the end of the attribute on a specific pane and return the new address by setting ...
Definition: Roccom_base.C:759
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
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.

Parameters
wfthe handle to the function.
countthe number of input arguments.
argsthe addresses to the arguments.
lensthe 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().

1745  {
1746  // Roccom prints out the trace upto (verb-1)/2 depth.
1747  // If verb is even, then it will also print the arguments.
1748  try {
1749  if ( wf==0) {
1750  if ( _debug) {
1751  std::cerr << "Roccom: ************* CALL(" << _depth << ") "
1752  << "on NOOP with " << count << " arguments" << std::endl;
1753  }
1754  return; // Null function
1755  }
1756 
1757  Function *func = &get_function( wf);
1758 
1759  int verb = std::max(_verbose, int(_func_map.verbs[ wf]))-_depth*2;
1760  if ( verb<=0) verb = 0;
1761  else verb = (verb+1)%2+1;
1762  if ( _debug) {
1763  std::cerr << "Roccom: CALL(" << _depth << ") "
1764  << _func_map.name(wf);
1765  if ( _debug) std::cerr << '(';
1766  }
1767 
1768  std::vector<char> strs[Function::MAX_NUMARG+1];
1769  bool needpostproc=false;
1770 
1771  int li=0;
1772  void *ps[2*Function::MAX_NUMARG+1];
1773  int lcount = 0;
1774  void **plen = NULL;
1775  if ( func->is_fortran()) plen = ps+func->num_of_args();
1776 
1777  // attr must be const to void throwing exception when pointer is called
1778  const Attribute *attr = func->attribute();
1779  int offset = (attr!=NULL);
1780  count += offset;
1781  args -= offset;
1782  if ( count > func->num_of_args())
1784 
1785  if ( offset) {
1786  if ( _debug)
1787  std::cerr << std::endl << "Roccom:\t" << func->intent(0) << ": ";
1788 
1789  if ( func->is_rawdata( 0)) {
1790  if ( attr->is_const() && std::tolower(func->intent(0)) != 'i')
1792 
1793  if ( attr->data_type()==COM_F90POINTER) {
1794  std::pair<int,int> offs = get_f90pntoffsets( attr);
1795 
1796  ps[0] = (char*)const_cast<void*>(attr->pointer())+offs.first;
1797  // Add pointer information for PortlandGroup Compiler
1798 
1799  COM_assertion_msg( _f90ptr_treat>=0, "No F90 pointer initalized");
1800  if ( _f90ptr_treat == FPTR_INSERT) {
1801  *plen = *(void**)((char*)const_cast<void*>(attr->pointer())
1802  +offs.second);
1803  ++lcount; ++plen;
1804  }
1805  }
1806  else
1807  ps[0] = (char*)const_cast<void*>(attr->pointer());
1808 
1809  if ( _debug)
1810  std::cerr << "VALUE OF\t@" << ps[0] << "\t\""
1811  << attr->window()->name() << '.' << attr->name() << '"';
1812  }
1813  else {
1814  ps[0] = const_cast<Attribute*>(attr);
1815  if ( _debug)
1816  std::cerr << "METADATA\t@" << ps[0] << "\t\""
1817  << attr->window()->name() << '.' << attr->name() << '"';
1818  }
1819  }
1820 
1821  for ( int i=offset; i<count; ++i) {
1822  if ( _debug) {
1823  std::cerr << std::endl << "Roccom:\t" << func->intent(i) << ": ";
1824  }
1825 
1826  if ( func->is_literal(i)) {
1827  ps[i] = args[i];
1828  COM_Type type = func->data_type(i);
1829  char intent = func->intent(i);
1830  if ( type == COM_CHARACTER || type == COM_CHAR || type == COM_STRING) {
1831  if ( type == COM_STRING) {
1832  // Make sure it is NULL terminated
1833  if (lens && (intent=='i' || intent=='I' ||
1834  intent=='b' || intent=='B') &&
1835  ( lens[li]==0 || ((char*)args[i])[lens[li]-1] != '\0')) {
1836  strs[i].resize( lens[li]+1, '\0');
1837  std::strncpy( &strs[i][0], (char*)args[i], lens[li]);
1838  ps[i] = &strs[i][0];
1839 
1840  if (intent=='b' || intent=='B') needpostproc=true;
1841  }
1842  if ( plen) { // Append the length info
1843  *plen = (char*)NULL+std::strlen((char*)ps[i]); ++plen; ++lcount;
1844  }
1845  }
1846  else if ( plen) {
1847  *plen = (char*)NULL+1; ++plen; ++lcount;
1848  }
1849  ++li;
1850  }
1851  else if ( type == COM_MPI_COMMC && !from_c) {
1852  strs[i].resize( 2*sizeof( MPI_Comm));
1853  ps[i] = &strs[i][0]+(sizeof( MPI_Comm)-
1854  ((long int)&strs[i][0])%sizeof(MPI_Comm));
1855  if (intent=='i' || intent=='I' || intent=='b' || intent=='B')
1856  *(MPI_Comm*)ps[i] = COMMPI_Comm_f2c( *(int*)args[i], MPI_Comm());
1857  if (intent=='o' || intent=='O' || intent=='b' || intent=='B')
1858  needpostproc=true;
1859  }
1860  else if ( type == COM_MPI_COMMF && from_c) {
1861  strs[i].resize( 2*sizeof( int));
1862  ps[i] = &strs[i][0]+(sizeof(int)-((long int)&strs[i][0])%sizeof(int));
1863  if (intent=='i' || intent=='I' || intent=='b' || intent=='B')
1864  *(int*)ps[i] = COMMPI_Comm_c2f( *(MPI_Comm*)args[i]);
1865  if (intent=='o' || intent=='O' || intent=='b' || intent=='B')
1866  needpostproc=true;
1867  }
1868  if (_debug) {
1869  switch (type) {
1870  case COM_STRING:
1871  std::cerr << "STRING\t@" << args[i] << "\t";
1872  if ( args[i]) std::cerr << '\"' << (char*)ps[i] << '\"';
1873  break;
1874  case COM_CHAR: case COM_CHARACTER:
1875  std::cerr << "CHAR \t@" << args[i] << "\t";
1876  if ( args[i]) std::cerr << '\'' << *(char*)args[i] << '\'';
1877  break;
1878  case COM_DOUBLE:
1879  case COM_DOUBLE_PRECISION:
1880  std::cerr << "double\t@" << args[i] << '\t';
1881  if ( args[i]) std::cerr << *(double*)args[i];
1882  break;
1883  case COM_INT:
1884  case COM_LONG:
1885  case COM_INTEGER:
1886  std::cerr << "int \t@" << args[i] << '\t';
1887  if ( args[i]) std::cerr << *(int*)args[i];
1888  break;
1889  case COM_FLOAT:
1890  case COM_REAL:
1891  std::cerr << "float \t@" << args[i] << '\t';
1892  if ( args[i]) std::cerr << *(float*)args[i];
1893  break;
1894  case COM_LOGICAL:
1895  std::cerr << "logical\t@" << args[i] << '\t';
1896  if ( args[i]) std::cerr << *(int*)args[i];
1897  break;
1898  case COM_MPI_COMMC:
1899  std::cerr << "MPI_Comm (C)\t@" << args[i] << '\t';
1900  if ( args[i]) std::cerr << *(MPI_Comm*)args[i];
1901  break;
1902  case COM_MPI_COMMF:
1903  std::cerr << "MPI_Comm (F)\t@" << args[i] << '\t';
1904  if ( args[i]) std::cerr << *(int*)args[i];
1905  break;
1906  default:
1907  std::cerr << "type(" << type << ")\t@" << args[i];
1908  }
1909  }
1910  }
1911  else {
1912  int h=*(int*)args[i];
1913  if ( h == 0 && func->intent(i)<='Z') {
1914  // Optional attribute received a 0 attribute handle
1915  ps[i] = NULL;
1916  if ( _debug)
1917  std::cerr << "ZERO ATTRIBUTE HANDLE";
1918  continue;
1919  }
1920 
1921  // attr must be const to void throwing exception when pointer is called
1922  const Attribute *attr = &get_attribute( h);
1923  if ( attr->is_const() && std::tolower(func->intent(i)) != 'i')
1925 
1926  if ( func->is_rawdata( i)) {
1927  ps[i] = const_cast<void*>(attr->pointer());
1928  if ( _debug)
1929  std::cerr << "VALUE OF\t@" << ps[i]
1930  << "\t\"" << _attr_map.name(h) << '"';
1931  }
1932  else {
1933  ps[i] = const_cast<Attribute*>(attr);
1934  if ( _debug)
1935  std::cerr << "METADATA\t@" << ps[i]
1936  << "\t\"" << _attr_map.name(h) << '"';
1937  }
1938 
1939  if ( _attr_map.is_immutable( h) &&
1940  toupper(func->intent(i)) != 'I') {
1942  }
1943  }
1944  }
1945 
1946  if (offset && func->is_rawdata(0) &&
1947  (attr = func->attribute())->data_type()==COM_F90POINTER) {
1948  COM_assertion_msg( _f90ptr_treat>=0, "No F90 pointer initalized");
1949 
1950  // Append pointer information
1951  if ( _f90ptr_treat == FPTR_APPEND) {
1952  std::pair<int,int> offs = get_f90pntoffsets( attr);
1953 
1954  // Add pointer information for Intel Compiler
1955  *plen = *(void**)((char*)const_cast<void*>(attr->pointer())+offs.second);
1956  ++lcount; ++plen;
1957  }
1958  }
1959 
1960  for ( int i=count, iend=func->num_of_args(); i<iend; ++i) {
1961  if ( !func->is_optional( i)) throw COM_exception(COM_ERR_TOO_FEW_ARGS);
1962  ps[i] = NULL;
1963  if ( _debug) {
1964  std::cerr << std::endl << "Roccom: OPT\t" << func->intent(i) << ": ";
1965  std::cerr << ps[i];
1966  }
1967  }
1968  if ( _debug) {
1969  if ( _debug) std::cerr << std::endl << "Roccom: )";
1970  std::cerr << std::endl;
1971  }
1972 
1973  // Profiling it
1974  double t = 0;
1975  if ( _profile_on) {
1976 //RAF MPI_Comm comm = func->communicator();
1977 //RAF if (comm!=MPI_COMM_NULL) MPI_Barrier( comm);
1978  t = get_wtime();
1979 #ifdef _CHARM_THREADED_
1980 //RAF if (comm!=MPI_COMM_NULL) MPI_Barrier( comm);
1981 #endif
1982  }
1983  ++_depth;
1984  if ( _debug && lcount>0) {
1985  std::cerr << "Roccom: Invoking function with " << lcount
1986  << " additional implicit arguments: " << std::endl;
1987  for ( int i=0; i<lcount; ++i) {
1988  long int p=(long int)ps[func->num_of_args()+i];
1989  if ( p<0 || p>MAX_NAMELEN)
1990  std::cerr << "Roccom:\t@" << (void *)p << std::endl;
1991  else
1992  std::cerr << "Roccom:\t" << (long int)p << std::endl;
1993  }
1994  }
1995 
1996  // Invoke the function
1997  (*func)( func->num_of_args()+lcount, ps);
1998  --_depth;
1999 
2000  if ( _profile_on) {
2001 //RAF MPI_Comm comm = func->communicator();
2002 //RAF if (comm!=MPI_COMM_NULL) MPI_Barrier( comm);
2003 
2004  double tnew = get_wtime();
2005 #ifdef _CHARM_THREADED_
2006 //RAF if (comm!=MPI_COMM_NULL) MPI_Barrier( comm);
2007 #endif
2008 
2009  _func_map.counts[wf]++;
2010 
2011  double sec = tnew-t;
2012  _func_map.wtimes_tree[wf] += sec;
2013  _func_map.wtimes_self[wf] += sec;
2014  if ( int(_timer.size()) > _depth)
2016 
2017  _timer.resize( _depth,0);
2018  if (_depth>0) _timer[_depth-1] += sec;
2019  if (_depth==0) _func_map.wtimes_tree[0] += sec;
2020  }
2021 
2022  if ( _debug) {
2023  std::cerr << "Roccom: DONE(" << _depth << ") " << std::endl;
2024  }
2025 
2026  // Copy back strings
2027  if ( needpostproc) {
2028  for ( int i=offset; i<count; ++i) {
2029  COM_Type type = func->data_type(i);
2030  char intent = func->intent(i);
2031  if ( func->is_literal(i) && type == COM_STRING) {
2032  if (intent=='b' || intent=='B') {
2033  int n = strs[i].size();
2034  if ( n>0) std::memcpy( args[i], &strs[i][0], n-1);
2035  }
2036  }
2037  else if ( type == COM_MPI_COMMC && !from_c) {
2038  if (intent=='o' || intent=='O' || intent=='b' || intent=='B')
2039  *(int*)args[i] = COMMPI_Comm_c2f( *(MPI_Comm*)ps[i]);
2040  }
2041  else if ( type == COM_MPI_COMMF && from_c) {
2042  if (intent=='o' || intent=='O' || intent=='b' || intent=='B')
2043  *(MPI_Comm*)args[i] = COMMPI_Comm_f2c( *(int*)ps[i], MPI_Comm());
2044  }
2045  }
2046  }
2047 
2048  _errorcode = 0;
2049  }
2050  catch ( COM_exception ex) {
2052  char buf[10];
2053 
2054  std::sprintf( buf, "%d", wf);
2055  std::string msg = std::string( "When processing function ");
2056  if ( wf>0) msg.append( _func_map.name(wf));
2057 
2058  msg.append( " with handle "); msg.append( buf);
2059  proc_exception( ex, msg);
2060  }
2061 }
void get_attribute(const std::string &wa_str, char *loc, int *type, int *size, std::string *unit)
Information retrieval Get the information about an attribute.
Definition: Roccom_base.C:958
int COM_Type
Indices for derived data types.
Definition: roccom_basic.h:122
A Function object corresponds to a function member of a window.
Definition: Function.h:49
int _depth
Depth of procedure calls.
Definition: Roccom_base.h:477
bool is_optional(int i) const
Check whether the ith argument is optional.
Definition: Function.h:105
#define MAX_NAMELEN
The maxinum length of name string passed by users.
Definition: roccom_basic.h:120
bool is_fortran() const
Definition: Function.h:114
An Attribute object is a data member of a window.
Definition: Attribute.h:51
#define COM_assertion_msg(EX, msg)
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
Definition: Vector_n.h:354
std::pair< int, int > get_f90pntoffsets(const Attribute *a)
Definition: Roccom_base.C:1135
T COMMPI_Comm_f2c(int c, T)
Definition: commpi.h:202
Attribute_map _attr_map
Definition: Roccom_base.h:472
C/C++ Data types.
Definition: roccom_basic.h:129
std::vector< char > verbs
Whether verbose is on.
Definition: maps.h:153
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
const std::string & name() const
Obtain the window&#39;s name.
Definition: Window.h:92
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
const std::string & name(int i) const
Name of the object.
Definition: maps.h:76
const Window * window() const
Obtain a constant pointer to the parent window of the attribute.
Definition: Attribute.C:80
Encapsulates the states of an exception.
std::vector< double > wtimes_tree
Accumulator of wall-clock time spent by itself and those functions called by it.
Definition: maps.h:155
std::string msg
Error message.
const void * pointer() const
Obtain a constant pointer to the physical address.
Definition: Attribute.h:150
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
std::vector< double > wtimes_self
Accumulator of wall-clock time spent by itself excluding functions called by it.
Definition: maps.h:154
int _f90ptr_treat
Treatement of F90 pointers.
Definition: Roccom_base.h:493
void call_function(int wf, int count, void **args, const int *lens=NULL, bool from_c=true)
Invoke a function with given arguments.
Definition: Roccom_base.C:1744
std::vector< int > counts
Counts of the number of calls.
Definition: maps.h:156
const std::string & name() const
Obtain the name of the attribute.
Definition: Attribute.h:113
bool is_literal(int i) const
Check whether the ith argument is literal type.
Definition: Function.h:101
Attribute * attribute()
Definition: Function.h:121
blockLoc i
Definition: read.cpp:79
COM_Type data_type(int i) const
Definition: Function.h:115
bool _profile_on
Indicates whether should profile.
Definition: Roccom_base.h:485
const NT & n
int COMMPI_Comm_c2f(T t)
Definition: commpi.h:190
Function & get_function(const int)
Obtains a reference to an attribute from its handle.
Definition: Roccom_base.C:2206
bool is_immutable(int i) const
whether the object mutable
Definition: maps.h:61
char intent(int i) const
Definition: Function.h:116
int _errorcode
Error code.
Definition: Roccom_base.h:483
static double get_wtime()
Definition: Roccom_base.C:1734
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
int _verbose
Indicates whether verbose is on.
Definition: Roccom_base.h:478
std::vector< double > _timer
Timers for function calls.
Definition: Roccom_base.h:476
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int num_of_args() const
Get the number of arguments.
Definition: Function.h:93
COM_Type data_type() const
Obtain the data type of each component of the attribute.
Definition: Attribute.h:197
Fortran Data types.
Definition: roccom_basic.h:133
bool is_rawdata(int i) const
Check whether the ith argument is raw.
Definition: Function.h:108
bool is_const() const
Returns whether the array is set to be read-only.
Definition: Attribute.h:253
Function_map _func_map
Definition: Roccom_base.h:473

Here is the call graph for this function:

Here is the caller graph for this function:

int check_bounds ( const std::string &  wa,
int  pane_id 
)
throw (int
)

Definition at line 1130 of file Roccom_base.C.

1132 { return 0; }
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.

824 {
825  try {
826  if ( _debug) {
827  std::cerr << "Roccom: Cloning attribute \"" << pwaname
828  << "\" onto \"" << waname << '"' << std::endl;
829  }
830  std::string pawname, paaname;
831  split_name( pwaname, pawname, paaname);
832 
833  std::string awname, aaname;
834  std::string::size_type ni = waname.find(".");
835  if ( ni == std::string::npos) {
836  awname = waname; aaname = "";
837  }
838  else
839  split_name( waname, awname, aaname);
840 
841  std::string cawname, caaname;
842  if ( cndname && *cndname!=0)
843  split_name( cndname, cawname, caaname);
844 
845  Attribute *cnd=caaname.empty()?NULL:get_window(cawname).attribute(caaname);
846  if ( !caaname.empty() && cnd==NULL)
847  throw COM_exception( COM_ERR_ATTRIBUTE_NOTEXIST, cndname);
848 
849  get_window(awname).inherit( get_window( pawname).attribute(paaname),
850  aaname, Pane::INHERIT_CLONE, withghost, cnd, val);
851  _errorcode = 0;
852  }
853  catch ( COM_exception ex) {
855  std::string s;
856  s = s + "When window " + waname + " clones attribute " + pwaname;
857  proc_exception( ex, s);
858  }
859 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
An Attribute object is a data member of a window.
Definition: Attribute.h:51
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
void clone_attribute(const std::string &wname, const std::string &pwname, int withghost=1, const char *cndname=NULL, int val=0)
Clone the subset of panes of another window of which the given pane attribute has value val...
Definition: Roccom_base.C:822
int _errorcode
Error code.
Definition: Roccom_base.h:483
Attribute * attribute(const std::string &a)
Obtain a pointer to the attribute metadata from its name.
Definition: Window.C:842
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
bool empty() const
Check whether the number of items of the attribute is zero.
Definition: Attribute.h:227
Attribute * inherit(Attribute *from, const std::string &aname, int inherit_mode, bool withghost, const Attribute *cond, int val)
Inherit the attributes of another window with a different name.
Definition: Window.C:334

Here is the call graph for this function:

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.

1096 {
1097  try {
1098  if ( _debug) {
1099  std::cerr << "Roccom: Copy array for attribute \""
1100  << wa << '"' << " on pane " << pid << std::endl;
1101  }
1102 
1103  // Invoke Window::get_size
1104  std::string wname, aname;
1105  split_name( wa, wname, aname);
1106 
1107  get_window( wname).copy_array( aname, pid, val, v_strd, v_size, offset);
1108 
1109  if ( _debug) {
1110  std::cerr << "Roccom: ";
1111  std::cerr << " stride is " << v_strd;
1112  std::cerr << " size is " << v_size;
1113  std::cerr << std::endl;
1114  }
1115 
1116  _errorcode = 0;
1117  }
1118  catch ( COM_exception ex) {
1120  std::string s;
1121  s = s + "When processing attribute " + wa;
1122  proc_exception( ex, s);
1123  }
1124 }
void copy_array(const std::string &wa, const int pane_id, void *val, int v_strd=0, int v_size=0, int offset=0)
Copy an array from an attribute on a specific pane into a given buffer.
Definition: Roccom_base.C:1093
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void copy_array(const std::string &aname, const int pane_id, void *val, int v_strd=0, int v_size=0, int offset=0) const
Copy an attribute on a specific pane into a given array.
Definition: Window.C:685
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
Encapsulates the states of an exception.
std::string msg
Error message.
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236

Here is the call graph for this function:

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().

864 {
865  try {
866  if ( _debug) {
867  std::cerr << "Roccom: Copying attribute \"" << pwaname
868  << "\" onto \"" << waname << '"' << std::endl;
869  }
870  std::string pawname, paaname;
871  split_name( pwaname, pawname, paaname);
872 
873  std::string awname, aaname;
874  std::string::size_type ni = waname.find(".");
875  if ( ni == std::string::npos) {
876  awname = waname; aaname = "";
877  }
878  else
879  split_name( waname, awname, aaname);
880 
881  std::string cawname, caaname;
882  if ( cndname && *cndname!=0)
883  split_name( cndname, cawname, caaname);
884 
885  Attribute *cnd=caaname.empty()?NULL:get_window(cawname).attribute(caaname);
886  if ( !caaname.empty() && cnd==NULL)
887  throw COM_exception( COM_ERR_ATTRIBUTE_NOTEXIST, cndname);
888 
889  get_window(awname).inherit( get_window( pawname).attribute(paaname),
890  aaname, Pane::INHERIT_COPY, withghost, cnd, val);
891  _errorcode = 0;
892  }
893  catch ( COM_exception ex) {
895  std::string s;
896  s = s + "When window " + waname + " copies attribute " + pwaname;
897  proc_exception( ex, s);
898  }
899 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
An Attribute object is a data member of a window.
Definition: Attribute.h:51
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
int _errorcode
Error code.
Definition: Roccom_base.h:483
Attribute * attribute(const std::string &a)
Obtain a pointer to the attribute metadata from its name.
Definition: Window.C:842
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
void copy_attribute(const std::string &wname, const std::string &pwname, int withghost=1, const char *cndname=NULL, int val=0)
Copy an attribute onto another.
Definition: Roccom_base.C:862
bool empty() const
Check whether the number of items of the attribute is zero.
Definition: Attribute.h:227
Attribute * inherit(Attribute *from, const std::string &aname, int inherit_mode, bool withghost, const Attribute *cond, int val)
Inherit the attributes of another window with a different name.
Definition: Window.C:334

Here is the call graph for this function:

Here is the caller graph for this function:

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().

904 {
905  try {
906  if ( _debug) {
907  std::cerr << "Roccom: Copying attribute with handle \"" << src_hdl
908  << "\" onto \"" << trg_hdl << '"' << std::endl;
909  }
910 
911  if ( trg_hdl <= 0 || src_hdl <= 0)
913 
914  if ( _attr_map.is_immutable( trg_hdl))
916 
917  Attribute *trg = &get_attribute(trg_hdl);
918  trg->window()->inherit( &get_attribute(src_hdl), trg->name(),
919  Pane::INHERIT_COPY, withghost,
920  ptn_hdl?&get_attribute(ptn_hdl):NULL, val);
921  _errorcode = 0;
922  }
923  catch ( COM_exception ex) {
925  std::ostringstream sout;
926 
927  sout << "When copying attribute " << src_hdl << " onto "
928  << trg_hdl << " with pattern attribute " << ptn_hdl;
929  proc_exception( ex, sout.str());
930  }
931 }
void get_attribute(const std::string &wa_str, char *loc, int *type, int *size, std::string *unit)
Information retrieval Get the information about an attribute.
Definition: Roccom_base.C:958
An Attribute object is a data member of a window.
Definition: Attribute.h:51
Attribute_map _attr_map
Definition: Roccom_base.h:472
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
const Window * window() const
Obtain a constant pointer to the parent window of the attribute.
Definition: Attribute.C:80
Encapsulates the states of an exception.
std::string msg
Error message.
const std::string & name() const
Obtain the name of the attribute.
Definition: Attribute.h:113
bool is_immutable(int i) const
whether the object mutable
Definition: maps.h:61
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
void copy_attribute(const std::string &wname, const std::string &pwname, int withghost=1, const char *cndname=NULL, int val=0)
Copy an attribute onto another.
Definition: Roccom_base.C:862
Attribute * inherit(Attribute *from, const std::string &aname, int inherit_mode, bool withghost, const Attribute *cond, int val)
Inherit the attributes of another window with a different name.
Definition: Window.C:334

Here is the call graph for this function:

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.

936 {
937  try {
938  if ( _debug)
939  std::cerr << "Roccom: Deallocate array for \"" << wa << "\" on pane "
940  << pid << " to" << std::endl;
941 
942  std::string wname, aname;
943  split_name( wa, wname, aname);
944 
945  get_window( wname).dealloc_array( aname, pid);
946  _errorcode = 0;
947  }
948  catch ( COM_exception ex) {
950  std::string s;
951  s = s + "When processing attribute " + wa;
952  proc_exception( ex, s);
953  }
954 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void deallocate_array(const std::string &wa, const int pid=0)
Deallocate space for an attribute in a pane, asuming the memory was allocated allocate_mesh or alloca...
Definition: Roccom_base.C:934
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
void dealloc_array(const std::string &aname, const int pane_id=0)
Deallocate memory for an attribute for a specific pane if allocated by Roccom.
Definition: Window.C:311
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
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.

549 {
550  try {
551  if ( _debug)
552  std::cerr << "Roccom: delete attribute \"" << wa << std::endl;
553 
554  // Invoke Window::new_attribute.
555  std::string wname, aname;
556  split_name( wa, wname, aname);
557 
558  get_window( wname).delete_attribute( aname);
559  _errorcode = 0;
560  }
561  catch ( COM_exception ex) {
563  std::string s;
564  s = s + "When processing attribute " + wa;
565  proc_exception( ex, s);
566  }
567 }
void delete_attribute(const std::string &aname)
Delete an existing Attribute object.
Definition: Window.C:137
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
void delete_attribute(const std::string &wa)
Delete an existing attribute from a window.
Definition: Roccom_base.C:548
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
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.

461 {
462  try {
463  if ( _debug)
464  std::cerr << "Roccom: Delete pane " << pane_id << " of window "
465  << std::endl;
466 
467  get_window( wname).delete_pane( pane_id);
468  _errorcode = 0;
469  }
470  catch ( COM_exception ex) {
472  char buf[10];
473  std::sprintf( buf, "%d", pane_id);
474  std::string msg = std::string( "When processing window ")
475  + wname + " for pane " + buf;
476  proc_exception( ex, msg);
477  }
478 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
void delete_pane(const std::string &wname, const int pid)
Deletes a pane and its associated data.
Definition: Roccom_base.C:459
std::string msg
Error message.
void delete_pane(const int pane_id)
Remove the pane with given ID.
Definition: Window.h:297
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
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.

442 {
443  try {
444  if ( _debug)
445  std::cerr << "Roccom: Deleting window \"" << name << '"' << std::endl;
446 
447  _window_map.remove_object( name);
448  _errorcode = 0;
449  }
450  catch ( COM_exception ex) {
453  std::string s;
454  s = s + "When processing window " + name;
455  proc_exception( ex, s);
456  }
457 }
void delete_window(const std::string &wname)
Deletes a window with given name.
Definition: Roccom_base.C:441
double s
Definition: blastest.C:80
Error_code ierr
Error code.
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
Window_map _window_map
Definition: Roccom_base.h:471
void remove_object(std::string name, bool is_const=false)
Remove an object from the table.
Definition: maps.h:119
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int f90ptr_treat ( ) const
inline

Definition at line 415 of file Roccom_base.h.

References _f90ptr_treat.

415 { return _f90ptr_treat; }
int _f90ptr_treat
Treatement of F90 pointers.
Definition: Roccom_base.h:493
void finalize ( )
throw (int
)
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().

197  {
198  COM::Roccom_base *ptr = get_roccom();
199  if ( !ptr) throw( COM_ERR_WASNOT_INITIALIZED);
200 
201  delete ptr;
202  set_roccom( NULL);
203 }
static void set_roccom(Roccom_base *)
Set the Roccom pointer to the given object.
Definition: Roccom_base.C:56
static Roccom_base * get_roccom()
Get a pointer to the Roccom object.
Definition: Roccom_base.h:505

Here is the call graph for this function:

Here is the caller graph for this function:

void free_buffer ( int **  buf)

Definition at line 1467 of file Roccom_base.C.

1468 { if ( buf) delete [] *buf; *buf = NULL; }
void free_buffer ( char **  buf)

Definition at line 1464 of file Roccom_base.C.

1465 { if ( buf) delete [] *buf; *buf = NULL; }
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().

1015 {
1016  Pointer_descriptor ptr(NULL);
1017  get_array( wa, pane_id, ptr, strd, cap, is_const);
1018  if (addr) *addr = ptr.ptr;
1019 }
Window::Pointer_descriptor Pointer_descriptor
Definition: Roccom_base.h:54
void get_array(const std::string &wa, const int pane_id, void **addr, int *strd=NULL, int *cap=0, bool is_const=false)
Get the address for an attribute on a specific pane.
Definition: Roccom_base.C:1012

Here is the caller graph for this function:

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.

1024  {
1025  try {
1026  if ( _debug) {
1027  std::cerr << "Roccom: Get array for attribute \""
1028  << wa << '"' << " on pane " << pid << std::endl;
1029  }
1030 
1031  // Invoke Window::get_size
1032  std::string wname, aname;
1033  split_name( wa, wname, aname);
1034 
1035  get_window( wname).get_array( aname, pid, addr, strd, cap, is_const);
1036 
1037  if ( _debug) {
1038  std::cerr << "Roccom: ";
1039  if ( strd) std::cerr << " stride is " << *strd;
1040  if ( cap) std::cerr << " capacity is " << *cap;
1041  std::cerr << std::endl;
1042  }
1043 
1044  _errorcode = 0;
1045  }
1046  catch ( COM_exception ex) {
1048  std::string s;
1049  s = s + "When processing attribute " + wa;
1050  proc_exception( ex, s);
1051  }
1052 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
void get_array(const std::string &aname, const int pane_id, Pointer_descriptor &addr, int *strd=NULL, int *cap=NULL, bool is_const=false)
Get the address associated with an attribute for a specific pane.
Definition: Window.C:641
std::string msg
Error message.
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
void get_array(const std::string &wa, const int pane_id, void **addr, int *strd=NULL, int *cap=0, bool is_const=false)
Get the address for an attribute on a specific pane.
Definition: Roccom_base.C:1012

Here is the call graph for this function:

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().

960 {
961  try {
962  if ( _debug) // Print debugging info
963  std::cerr << "Roccom: get attribute \"" << wa << "\"" << std::endl;
964 
965  // Invoke Window::get_attribute.
966  std::string wname, aname;
967  split_name( wa, wname, aname);
968 
969  get_window( wname).get_attribute( aname, loc, type, size, unit);
970  _errorcode = 0;
971 
972  if ( _debug) { // Print debugging info
973  if (loc) std::cerr << "Roccom:\tLocation: " << *loc
974  << "\nRoccom:\tType: ";
975  if (type) print_type( std::cerr, *type);
976  if ( size) std::cerr << "Roccom:\tSize: " << *size << std::endl;
977  if ( unit) std::cerr << "Roccom:\tUnit: \"" << *unit << "\"" << std::endl;
978  }
979  }
980  catch ( COM_exception ex) {
982  std::string s;
983  s = s + "When processing attribute " + wa;
984  proc_exception( ex, s);
985  }
986 }
void get_attribute(const std::string &wa_str, char *loc, int *type, int *size, std::string *unit)
Information retrieval Get the information about an attribute.
Definition: Roccom_base.C:958
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
Attribute * get_attribute(const std::string &aname, char *l, int *t, int *n, std::string *u) const
Get the meta-information about an attribute.
Definition: Window.C:462
void print_type(std::ostream &os, COM_Type type)
Definition: Roccom_base.C:480
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236

Here is the call graph for this function:

Here is the caller graph for this function:

Attribute & get_attribute ( const int  handle)
throw (COM_exception
)
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().

2176  {
2177  Attribute *attr=NULL;
2178 
2179  if ( handle > 0 && handle<_attr_map.size())
2180  attr = _attr_map[handle];
2181  if (attr==NULL) {
2182  static char buf[10];
2183  std::sprintf( buf, "%d", handle);
2186  }
2187  return *attr;
2188 }
void get_attribute(const std::string &wa_str, char *loc, int *type, int *size, std::string *unit)
Information retrieval Get the information about an attribute.
Definition: Roccom_base.C:958
An Attribute object is a data member of a window.
Definition: Attribute.h:51
Attribute_map _attr_map
Definition: Roccom_base.h:472
int size() const
Definition: maps.h:78
Encapsulates the states of an exception.
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.

Here is the call graph for this function:

const Attribute & get_attribute ( const int  handle) const
throw (COM_exception
)
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().

2191  {
2192  const Attribute *attr=NULL;
2193 
2194  if ( handle > 0 && handle<_attr_map.size())
2195  attr = _attr_map[handle];
2196  if (attr==NULL) {
2197  static char buf[10];
2198  std::sprintf( buf, "%d", handle);
2201  }
2202  return *attr;
2203 }
void get_attribute(const std::string &wa_str, char *loc, int *type, int *size, std::string *unit)
Information retrieval Get the information about an attribute.
Definition: Roccom_base.C:958
An Attribute object is a data member of a window.
Definition: Attribute.h:51
Attribute_map _attr_map
Definition: Roccom_base.h:472
int size() const
Definition: maps.h:78
Encapsulates the states of an exception.
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.

Here is the call graph for this function:

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.

1540  {
1541  int n(-1);
1542  try {
1543  if ( _debug)
1544  std::cerr << "Roccom: get handle of attribute \"" << waname << "\": ";
1545  std::string wname, aname;
1546  split_name( waname, wname, aname);
1547 
1548  Attribute *a = get_window( wname).attribute( aname);
1549 
1550  if ( a!=NULL) n=_attr_map.add_object( waname, a, false);
1551 
1552  if ( _debug) {
1553  if ( n>0) std::cerr << n << std::endl;
1554  else std::cerr << " not found" << std::endl;
1555  }
1556  }
1557  catch ( COM_exception ex) {
1559  proc_exception( ex, "");
1560  }
1561  return n;
1562 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
An Attribute object is a data member of a window.
Definition: Attribute.h:51
Attribute_map _attr_map
Definition: Roccom_base.h:472
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
int get_attribute_handle(const std::string &waname)
Definition: Roccom_base.C:1540
Encapsulates the states of an exception.
std::string msg
Error message.
const NT & n
Attribute * attribute(const std::string &a)
Obtain a pointer to the attribute metadata from its name.
Definition: Window.C:842
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int add_object(std::string name, Object t, bool is_const=false)
Insert an object into the table.
Definition: maps.h:97
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
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.

1513  {
1514  int n(-1);
1515  try {
1516  if ( _debug)
1517  std::cerr << "Roccom: get const handle of attribute \""
1518  << waname << "\": ";
1519 
1520  std::string wname, aname;
1521  split_name( waname, wname, aname);
1522 
1523  Attribute *a = get_window( wname).attribute( aname);
1524 
1525  if ( a!=NULL) n=_attr_map.add_object( waname, a, true);
1526 
1527  if ( _debug) {
1528  if ( n>0) std::cerr << n << std::endl;
1529  else std::cerr << " not found" << std::endl;
1530  }
1531  }
1532  catch ( COM_exception ex) {
1534  proc_exception( ex, "");
1535  }
1536  return n;
1537 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
An Attribute object is a data member of a window.
Definition: Attribute.h:51
Attribute_map _attr_map
Definition: Roccom_base.h:472
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
const NT & n
int get_attribute_handle_const(const std::string &waname)
Definition: Roccom_base.C:1513
Attribute * attribute(const std::string &a)
Obtain a pointer to the attribute metadata from its name.
Definition: Window.C:842
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int add_object(std::string name, Object t, bool is_const=false)
Insert an object into the table.
Definition: maps.h:97
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
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.

1351 {
1352  try {
1353  if ( _debug)
1354  std::cerr << "Roccom: get attributes of window \""
1355  << wname << '"' << std::endl;
1356 
1357  std::vector<Attribute*> as;
1358  get_window(wname).attributes( as);
1359 
1360  str.clear();
1361  if ( natts) *natts = as.size();
1362  int i=0, n=as.size();
1363  if (n) for (;;) {
1364  str = str + as[i]->name();
1365  if ( ++i<n) str.append(" ");
1366  else break;
1367  }
1368 
1369  if ( names) {
1370  *names = new char[str.size()+1];
1371  std::copy( str.begin(), str.end(), *names);
1372  (*names)[str.size()]=0;
1373  }
1374 
1375  if ( _debug)
1376  std::cerr << "Roccom: Got attribute names: " << str << std::endl;
1377 
1378  _errorcode = 0;
1379  }
1380  catch ( COM_exception ex) {
1382  std::string s;
1383  s = s + "When processing window " + wname;
1384  proc_exception( ex, s);
1385  }
1386 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
void get_attributes(const std::string &wname, int *na, std::string &str, char **names=NULL)
Obtain the user-defined attributes of the given window.
Definition: Roccom_base.C:1349
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
void attributes(std::vector< Attribute * > &as)
Obtain all the attributes of the pane.
Definition: Window.h:328
std::string msg
Error message.
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to ** copy
Definition: roccomf90.h:20
blockLoc i
Definition: read.cpp:79
const NT & n
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
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.

1128 {}
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.

1241  {
1242  try {
1243  if ( _debug)
1244  std::cerr << "Roccom: get the communicator of window \""
1245  << wname << std::endl;
1246  if ( COMMPI_Initialized()) {
1247  Window &w = get_window(wname);
1248  _errorcode = 0;
1249  return w.get_communicator();
1250  }
1251  else
1252  return MPI_COMM_NULL;
1253  }
1254  catch ( COM_exception ex) {
1255  ex.msg = append_frame( ex.msg, Roccom_base::get_window_npanes);
1256  std::string s;
1257  s = s + "When processing window " + wname;
1258  proc_exception( ex, s);
1259  }
1260  return 0;
1261 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
A Window object contains multiple panes and multiple data attributes.
Definition: Window.h:42
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
MPI_Comm get_communicator() const
Obtain the communicator of the window.
Definition: Window.h:95
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int COMMPI_Initialized()
Definition: commpi.h:168

Here is the call graph for this function:

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.

1392 {
1393  try {
1394  if ( _debug)
1395  std::cerr << "Roccom: get connectivities of window \"" << wname
1396  << "\" on pane " << pane_id << std::endl;
1397 
1398  std::vector<Connectivity*> as;
1399  get_window(wname).pane( pane_id).connectivities( as);
1400 
1401  if ( natts) *natts = as.size();
1402 
1403  str.clear();
1404  int i=0, n=as.size();
1405  if (n) for (;;) {
1406  str = str + as[i]->name();
1407  if ( ++i<n) str.append(" ");
1408  else break;
1409  }
1410 
1411  if ( names) {
1412  *names = new char[str.size()+1];
1413  std::copy( str.begin(), str.end(), *names);
1414  (*names)[str.size()]=0;
1415  }
1416 
1417  if ( _debug)
1418  std::cerr << "Roccom: Got connectivity names: " << str << std::endl;
1419 
1420  _errorcode = 0;
1421  }
1422  catch ( COM_exception ex) {
1424  std::string s;
1425  s = s + "When processing window " + wname;
1426  proc_exception( ex, s);
1427  }
1428 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to ** copy
Definition: roccomf90.h:20
void get_connectivities(const std::string &wname, int pane_id, int *nc, std::string &str, char **names=NULL)
Obtain the connectivity tables of a pane of the given window.
Definition: Roccom_base.C:1390
blockLoc i
Definition: read.cpp:79
const NT & n
void connectivities(std::vector< Connectivity * > &es)
Obtain all the element connectivities of the pane.
Definition: Pane.h:254
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
Pane & pane(const int pane_id, bool insert=false)
Find the pane with given ID. If not found, insert a pane with given ID.
Definition: Window.C:769
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int get_debug ( ) const
inline

Determines whether verbose is on.

Definition at line 381 of file Roccom_base.h.

References _debug.

381 { return _debug; }
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
static MPI_Comm get_default_communicator ( )
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().

76  { return get_roccom()->_comm; }
MPI_Comm _comm
Default communicator of Roccom.
Definition: Roccom_base.h:481
static Roccom_base * get_roccom()
Get a pointer to the Roccom object.
Definition: Roccom_base.h:505

Here is the call graph for this function:

Here is the caller graph for this function:

int get_error_code ( ) const
inline

Get the error code.

Definition at line 409 of file Roccom_base.h.

References _errorcode.

409 { return _errorcode; }
int _errorcode
Error code.
Definition: Roccom_base.h:483
std::pair< int, int > get_f90pntoffsets ( const Attribute a)
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().

1135  {
1136 
1138 
1139  COM_assertion_msg( _f90ptr_treat>=0, "No F90 pointer initalized");
1140  if ( _f90ptr_treat == FPTR_INSERT)
1141  return std::pair<int,int>(n/2-sizeof(void*), n-sizeof(void*));
1142  else
1143  return std::pair<int,int>(0,n-sizeof(void*));
1144 }
#define COM_assertion_msg(EX, msg)
int _f90ptr_treat
Treatement of F90 pointers.
Definition: Roccom_base.h:493
const NT & n
static int get_sizeof(COM_Type type, int count=1)
Definition: Attribute.C:488
int size_of_components() const
Obtain the number of components in the attribute.
Definition: Attribute.h:203

Here is the call graph for this function:

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().

1203  {
1204  try {
1205  if ( _debug)
1206  std::cerr << "Roccom: get pointer \"" << waname
1207  << " into " << ptr << std::endl;
1208 
1209  std::string wname, aname;
1210  split_name( waname, wname, aname);
1211 
1212  Attribute *a = get_window( wname).attribute( aname);
1213  if ( a->location() != 'w')
1216  if ( a->data_type() == COM_F90POINTER) {
1217  std::pair<int,int> offs = get_f90pntoffsets( a);
1218 
1219  COM_assertion_msg( _f90ptr_treat>=0, "No F90 pointer initalized");
1221  typedef void(*Func2)(void*,void*, long int, long int);
1222  (*(Func2)f)( (char*)a->pointer()+offs.first, ptr,
1223  *(long int*)((char*)a->pointer()+offs.second), len);
1224  }
1225  else {
1226  typedef void(*Func2)(void*,void*);
1227  (*(Func2)f)( a->pointer(), (char*)ptr+offs.first);
1228  }
1229  }
1230  else
1233  }
1234  catch ( COM_exception ex) {
1236  proc_exception( ex, "");
1237  }
1238 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
An Attribute object is a data member of a window.
Definition: Attribute.h:51
#define COM_assertion_msg(EX, msg)
std::pair< int, int > get_f90pntoffsets(const Attribute *a)
Definition: Roccom_base.C:1135
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Shorter_size location() const
Obtain the location of the attribute.
Definition: Attribute.h:186
Encapsulates the states of an exception.
std::string msg
Error message.
const void * pointer() const
Obtain a constant pointer to the physical address.
Definition: Attribute.h:150
int _f90ptr_treat
Treatement of F90 pointers.
Definition: Roccom_base.h:493
Attribute * attribute(const std::string &a)
Obtain a pointer to the attribute metadata from its name.
Definition: Window.C:842
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
void get_f90pointer(const std::string &waname, void *ptr, Func_ptr f, long int l)
Definition: Roccom_base.C:1202
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
COM_Type data_type() const
Obtain the data type of each component of the attribute.
Definition: Attribute.h:197

Here is the call graph for this function:

Function & get_function ( const int  handle)
throw (COM_exception
)
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().

2206  {
2207  Function *func=NULL;
2208 
2209  if ( handle > 0 && handle<_func_map.size())
2210  func = _func_map[handle];
2211 
2212  if (func==NULL) {
2213  static char buf[10];
2214  std::sprintf( buf, "%d", handle);
2217  }
2218  return *func;
2219 }
A Function object corresponds to a function member of a window.
Definition: Function.h:49
int size() const
Definition: maps.h:78
Encapsulates the states of an exception.
Function & get_function(const int)
Obtains a reference to an attribute from its handle.
Definition: Roccom_base.C:2206
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
Function_map _func_map
Definition: Roccom_base.h:473

Here is the caller graph for this function:

const Function & get_function ( const int  handle) const
throw (COM_exception
)
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().

2222  {
2223  const Function *func=NULL;
2224 
2225  if ( handle > 0 && handle<_func_map.size())
2226  func = _func_map[handle];
2227  if (func==NULL) {
2228  static char buf[10];
2229  std::sprintf( buf, "%d", handle);
2232  }
2233  return *func;
2234 }
A Function object corresponds to a function member of a window.
Definition: Function.h:49
int size() const
Definition: maps.h:78
Encapsulates the states of an exception.
Function & get_function(const int)
Obtains a reference to an attribute from its handle.
Definition: Roccom_base.C:2206
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
Function_map _func_map
Definition: Roccom_base.h:473

Here is the call graph for this 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.

1565  {
1566  int n(-1);
1567  try {
1568  if ( _debug)
1569  std::cerr << "Roccom: get handle of function \"" << wfname << "\": ";
1570  std::string wname, fname;
1571  split_name( wfname, wname, fname);
1572 
1573  Function *f = get_window( wname).function( fname);
1574 
1575  if ( f!=NULL) n=_func_map.add_object( wfname, f);
1576 
1577  if ( _debug) {
1578  if ( n>0) std::cerr << n << std::endl;
1579  else std::cerr << " not found" << std::endl;
1580  }
1581  }
1582  catch ( COM_exception ex) {
1584  proc_exception( ex, "");
1585  }
1586  return n;
1587 }
A Function object corresponds to a function member of a window.
Definition: Function.h:49
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
int add_object(const std::string &n, Function *t)
Insert a function into the table.
Definition: maps.h:138
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Function * function(const std::string &f)
Obtain the function pointer from its name.
Definition: Window.C:877
Encapsulates the states of an exception.
std::string msg
Error message.
const NT & n
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
Function_map _func_map
Definition: Roccom_base.h:473
int get_function_handle(const std::string &wfname)
Definition: Roccom_base.C:1565
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.

1322  {
1323  try {
1324  if ( _debug) {
1325  std::cerr << "Roccom: get modules";
1326  // if ( rank==-2) std::cerr << " this process";
1327  // else if ( rank==-1) std::cerr << " all processes";
1328  // else std::cerr << " process " << rank;
1329 
1330  std::cerr << std::endl;
1331  }
1332  names = _module_map.get_names();
1333  // get_window(wname).panes( paneids_vec, rank);
1334 
1335  // if ( pane_ids) {
1336  // *pane_ids = new int[paneids_vec.size()];
1337  // std::copy( paneids_vec.begin(), paneids_vec.end(), *pane_ids);
1338  // }
1339  _errorcode = 0;
1340  }
1341  catch ( COM_exception ex) {
1343  std::string s;
1344  s = s + "When processing get_modules.";
1345  proc_exception( ex, s);
1346  }
1347 }
Module_map _module_map
Definition: Roccom_base.h:470
double s
Definition: blastest.C:80
std::vector< std::string > get_names()
Definition: maps.h:88
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
void get_modules(std::vector< std::string > &)
Obtain a list of all module names.
Definition: Roccom_base.C:1322
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().

1716  {
1717  std::string wname, fname;
1718  split_name(wf, wname, fname);
1719 
1720  Function *func = get_window( wname).function( fname);
1721  if ( func==NULL)
1724  return func->num_of_args();
1725 }
A Function object corresponds to a function member of a window.
Definition: Function.h:49
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
Function * function(const std::string &f)
Obtain the function pointer from its name.
Definition: Window.C:877
Encapsulates the states of an exception.
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)
Definition: Roccom_base.C:1695
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
int num_of_args() const
Get the number of arguments.
Definition: Function.h:93
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236

Here is the call graph for this 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().

1728  {
1729  Function *func = &get_function( wf);
1730  return func->num_of_args();
1731 }
A Function object corresponds to a function member of a window.
Definition: Function.h:49
Function & get_function(const int)
Obtains a reference to an attribute from its handle.
Definition: Roccom_base.C:2206
int num_of_args() const
Get the number of arguments.
Definition: Function.h:93

Here is the call graph for this function:

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.

650 {
651  int strd;
652  get_array( wa, pid, ptr, &strd);
653 
654  if ( strd <= 1) return; else *(char**)ptr -= strd;
655 }
void get_array(const std::string &wa, const int pane_id, void **addr, int *strd=NULL, int *cap=0, bool is_const=false)
Get the address for an attribute on a specific pane.
Definition: Roccom_base.C:1012
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.

1265  {
1266  try {
1267  if ( _debug) {
1268  std::cerr << "Roccom: get pane ids of window \""
1269  << wname << "\" on ";
1270  if ( rank==-2) std::cerr << " this process";
1271  else if ( rank==-1) std::cerr << " all processes";
1272  else std::cerr << " process " << rank;
1273 
1274  std::cerr << std::endl;
1275  }
1276 
1277  get_window(wname).panes( paneids_vec, rank);
1278 
1279  if ( pane_ids) {
1280  *pane_ids = new int[paneids_vec.size()];
1281  std::copy( paneids_vec.begin(), paneids_vec.end(), *pane_ids);
1282  }
1283  _errorcode = 0;
1284  }
1285  catch ( COM_exception ex) {
1287  std::string s;
1288  s = s + "When processing window " + wname;
1289  proc_exception( ex, s);
1290  }
1291 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to ** copy
Definition: roccomf90.h:20
void get_panes(const std::string &wname, std::vector< int > &paneids_vec, int rank=-2, int **pane_ids=NULL)
Obtain the panes of a given window on a specific process.
Definition: Roccom_base.C:1264
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
static int rank
Definition: advectest.C:66
void panes(std::vector< int > &ps, int rank=-2)
Obtain all the local panes of the window.
Definition: Window.C:809
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.

1433 {
1434  try {
1435  if ( _debug)
1436  std::cerr << "Roccom: get parent of attribute \"" << waname
1437  << "\" on pane " << pane_id << std::endl;
1438 
1439  std::string wname, aname;
1440  split_name( waname, wname, aname);
1441 
1442  get_window( wname).get_parent( aname, pane_id, str);
1443 
1444  if ( name) {
1445  *name = new char[str.size()+1];
1446  std::copy( str.begin(), str.end(), *name);
1447  (*name)[str.size()]=0;
1448  }
1449 
1450  if ( _debug)
1451  std::cerr << "Roccom: Got parent name: " << str << std::endl;
1452 
1453  _errorcode = 0;
1454  }
1455  catch ( COM_exception ex) {
1457  std::string s;
1458  s = s + "When processing attribute " + waname;
1459  proc_exception( ex, s);
1460  }
1461 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to ** copy
Definition: roccomf90.h:20
void get_parent(const std::string &waname, int pane_id, std::string &str, char **name=NULL)
Obtain the parent attribute&#39;s name of a given attribute on a given pane.
Definition: Roccom_base.C:1431
void get_parent(const std::string &aname, int pane_id, std::string &name) const
Get the parent name of an attribute and load into name.
Definition: Window.C:566
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
Roccom_base * get_roccom ( )
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().

506 { return roccom_base; }
static Roccom_base * roccom_base
Definition: Roccom_base.h:499

Here is the caller graph for this function:

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.

990 {
991  try {
992  if ( _debug) {
993  std::cerr << "Roccom: Get size for attribute \""
994  << wa << '"' << " for pane " << pid << std::endl;
995  }
996 
997  // Invoke Window::get_size
998  std::string wname, aname;
999  split_name( wa, wname, aname);
1000 
1001  get_window( wname).get_size( aname, pid, nitems, ng);
1002  _errorcode = 0;
1003  }
1004  catch ( COM_exception ex) {
1006  std::string s;
1007  s = s + "When processing attribute " + wa;
1008  proc_exception( ex, s);
1009  }
1010 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void get_size(const std::string &wa_str, int pane_id, int *size, int *ng=0)
Get the sizes of an attribute. The opposite of set_size.
Definition: Roccom_base.C:988
void get_size(const std::string &aname, int pane_id, int *nitems, int *ng) const
Get the sizes of an attribute for a specific pane.
Definition: Window.C:505
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
int get_sizeof ( COM_Type  type,
int  count = 1 
)
static

Gets the size of the data type given by its index.

See Also
DDT

Definition at line 2162 of file Roccom_base.C.

References Attribute::get_sizeof().

2163 { return Attribute::get_sizeof( type, count); }
static int get_sizeof(COM_Type type, int count=1)
Definition: Attribute.C:488

Here is the call graph for this function:

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.

1056 {
1057  try {
1058  if ( _debug) {
1059  std::cerr << "Roccom: Get status for attribute \""
1060  << wa << '"' << " on pane " << pid << std::endl;
1061  }
1062 
1063  std::string wname, aname;
1064  split_name( wa, wname, aname, false);
1065 
1066  Window **w = _window_map.find( wname).second;
1067 
1068  if ( aname.empty() && pid == 0) {
1069  if ( w == NULL) return -1;
1070  else return 0;
1071  }
1072 
1073  int status = (**w).get_status( aname, pid);
1074 
1075  if ( _debug) {
1076  std::cerr << "Roccom: ";
1077  std::cerr << " status is " << status << std::endl;
1078  }
1079 
1080  _errorcode = 0;
1081  return status;
1082  }
1083  catch ( COM_exception ex) {
1085  std::string s;
1086  s = s + "When processing attribute " + wa;
1087  proc_exception( ex, s);
1088  }
1089 
1090  return 0;
1091 }
double s
Definition: blastest.C:80
A Window object contains multiple panes and multiple data attributes.
Definition: Window.h:42
std::pair< int, Object * > find(const std::string &name, bool is_const=false)
Definition: maps.h:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
Window_map _window_map
Definition: Roccom_base.h:471
int get_status(const std::string &wa_str, int pane_id)
Get the status of an attribute.
Definition: Roccom_base.C:1055
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236

Here is the call graph for this function:

int get_verbose ( ) const
inline

Determines whether verbose is on.

Definition at line 378 of file Roccom_base.h.

378 { return _verbose; }
int _verbose
Indicates whether verbose is on.
Definition: Roccom_base.h:478
Window & get_window ( const std::string &  wname)
throw (COM_exception
)
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().

2167 {
2168  Window **w = _window_map.find( wname).second;
2169  if ( w ==NULL)
2172  return **w;
2173 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
A Window object contains multiple panes and multiple data attributes.
Definition: Window.h:42
std::pair< int, Object * > find(const std::string &name, bool is_const=false)
Definition: maps.h:80
Encapsulates the states of an exception.
Window_map _window_map
Definition: Roccom_base.h:471
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.

Here is the caller graph for this function:

const Window& get_window ( const std::string &  wname) const
throw (COM_exception
)
inlineprotected

Obtains a constant reference to the Window object from its name.

Definition at line 436 of file Roccom_base.h.

References get_window().

437  { return const_cast<Roccom_base*>(this)->get_window(wname); }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
This file indirectly includes the following files: iostream, map, string, vector, and roccom_basic...
Definition: Roccom_base.h:49

Here is the call graph for this function:

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().

1471  {
1472  int n(-1);
1473  try {
1474  if ( _debug)
1475  std::cerr << "Roccom: get handle of window \"" << wname << "\": ";
1476  std::pair<int,Window**> obj = _window_map.find( wname);
1477  COM_assertion(obj.first<0 || (*obj.second)->name()==wname);
1478 
1479  if ( obj.first>=0)
1480  n = obj.first+1;
1481 
1482  if ( _debug) {
1483  if ( n>0) std::cerr << n << std::endl;
1484  else std::cerr << " not found" << std::endl;
1485  }
1486  }
1487  catch ( COM_exception ex) {
1489  proc_exception( ex, "");
1490  }
1491  return n;
1492 }
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
int get_window_handle(const std::string &wname)
Definition: Roccom_base.C:1471
std::pair< int, Object * > find(const std::string &name, bool is_const=false)
Definition: maps.h:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
Window_map _window_map
Definition: Roccom_base.h:471
const NT & n
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480

Here is the caller graph for this function:

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().

1496 {
1497  if ( hdl <= 0)
1500  return _window_map[hdl-1];
1501 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
Encapsulates the states of an exception.
Window_map _window_map
Definition: Roccom_base.h:471
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.

Here is the call graph for this function:

Here is the caller graph for this function:

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().

1505 {
1506  if ( hdl <= 0)
1509  return _window_map[hdl-1];
1510 }
Encapsulates the states of an exception.
Window * get_window_object(int hdl)
Definition: Roccom_base.C:1495
Window_map _window_map
Definition: Roccom_base.h:471
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.

Here is the call graph for this function:

Window* get_window_object ( const std::string &  wname)
throw (int
)
inline

Definition at line 301 of file Roccom_base.h.

References get_window_handle(), and get_window_object().

302  { return get_window_object( get_window_handle( wname)); }
int get_window_handle(const std::string &wname)
Definition: Roccom_base.C:1471
Window * get_window_object(int hdl)
Definition: Roccom_base.C:1495

Here is the call graph for this function:

const Window* get_window_object ( const std::string &  wname) const
throw (int
)
inline

Definition at line 303 of file Roccom_base.h.

References get_window_handle(), and get_window_object().

304  { return get_window_object( const_cast<Roccom_base*>(this)->
305  get_window_handle( wname)); }
int get_window_handle(const std::string &wname)
Definition: Roccom_base.C:1471
Window * get_window_object(int hdl)
Definition: Roccom_base.C:1495

Here is the call graph for this function:

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.

1294  {
1295  try {
1296  if ( _debug) {
1297  std::cerr << "Roccom: get windows";
1298  // if ( rank==-2) std::cerr << " this process";
1299  // else if ( rank==-1) std::cerr << " all processes";
1300  // else std::cerr << " process " << rank;
1301 
1302  std::cerr << std::endl;
1303  }
1304  names = _window_map.get_names();
1305  // get_window(wname).panes( paneids_vec, rank);
1306 
1307  // if ( pane_ids) {
1308  // *pane_ids = new int[paneids_vec.size()];
1309  // std::copy( paneids_vec.begin(), paneids_vec.end(), *pane_ids);
1310  // }
1311  _errorcode = 0;
1312  }
1313  catch ( COM_exception ex) {
1315  std::string s;
1316  s = s + "When processing get_windows.";
1317  proc_exception( ex, s);
1318  }
1319 }
double s
Definition: blastest.C:80
std::vector< std::string > get_names()
Definition: maps.h:88
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
Window_map _window_map
Definition: Roccom_base.h:471
void get_windows(std::vector< std::string > &)
Obtain a list of all window names.
Definition: Roccom_base.C:1294
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
void icall_function ( int  wf,
int  count,
void *  args[],
int *  reqid,
const int *  lens = NULL 
)
throw (int
)
inline

Nonblockingly invoke a function with given arguments.

Parameters
wfthe handle to the function.
countthe number of input arguments.
argsthe addresses to the arguments.
reqidis set to the request of the current call.
lensthe lengths of character strings.

Definition at line 364 of file Roccom_base.h.

References call_function().

366  { *reqid = 0; call_function( wf, count, args, lens); }
void call_function(int wf, int count, void **args, const int *lens=NULL, bool from_c=true)
Invoke a function with given arguments.
Definition: Roccom_base.C:1744

Here is the call graph for this function:

void init ( int *  argc,
char ***  argv 
)
throw (int
)
static

Definition at line 186 of file Roccom_base.C.

References COM_ERR_WAS_INITIALIZED, and printStackBacktrace().

Referenced by COM_F_FUNC2().

186  {
187  extern void printStackBacktrace();
188 
189  COM::Roccom_base *ptr = get_roccom();
190  if ( ptr) throw( COM_ERR_WAS_INITIALIZED);
191 
192  ptr = new COM::Roccom_base( argc, argv);
193 
194  set_roccom( ptr);
195 }
COM_BEGIN_NAME_SPACE void printStackBacktrace()
Print the stack backtrace.
static void set_roccom(Roccom_base *)
Set the Roccom pointer to the given object.
Definition: Roccom_base.C:56
static Roccom_base * get_roccom()
Get a pointer to the Roccom object.
Definition: Roccom_base.h:505

Here is the call graph for this function:

Here is the caller graph for this function:

static bool initialized ( )
inlinestatic

Checks whether Roccom has been initialized.

Definition at line 82 of file Roccom_base.h.

References get_roccom().

Referenced by COM_F_FUNC2().

82 { return get_roccom()!=NULL; }
static Roccom_base * get_roccom()
Get a pointer to the Roccom object.
Definition: Roccom_base.h:505

Here is the call graph for this function:

Here is the caller graph for this function:

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().

213 {
214 #ifndef STATIC_LINK
215  if ( _debug)
216  std::cerr << "Roccom: Loading module " << lname
217  << " with arguments " << wname << "..." << std::endl;
218 
219  void *handle;
220  std::string lname_found;
221 
222  // Obtain a reference to the library.
223  int index = _module_map.find(lname).first;
224  if ( index<0) { // Load the library
225  std::string lname_short = std::string("lib") + lname + ".so";
226  std::string lname_full = _libdir + lname_short;
227 
228  // Open the library
229  handle = dlopen( lname_full.c_str(), RTLD_LAZY);
230  if (handle == NULL)
231  std::cerr << "dlopen error: " << dlerror() << std::endl;
232 
233  if ( handle == NULL && !_libdir.empty()) {
234  handle = dlopen( lname_short.c_str(), RTLD_LAZY);
235  if (handle == NULL)
236  std::cerr << "dlopen error: " << dlerror() << std::endl;
237  lname_found = lname_short;
238  }
239  else
240  lname_found = lname_full;
241 
242 
243  if ( handle == NULL) {
244  std::string libs;
245  if ( _libdir.empty()) libs = lname_full;
246  else libs = lname_full+" or "+lname_short;
247 
249  "Roccom_base::load_module");
250  }
251 
252  // Insert a new entry into _module_map.
253  index = _module_map.add_object( lname, Module_map::value_type());
254  _module_map[index].first = handle;
255  }
256  else
257  handle = _module_map[index].first;
258 
259  // Insert the handle and the window name into _module_map.
260  _module_map[index].second.insert(wname);
261 
262  // Look for the symbol
263  std::string fname = lname + "_load_module";
264 
265  // Set the default communicator to MPI_COMM_SELF
266  MPI_Comm comm = MPI_COMM_SELF;
267  std::swap(_comm, comm);
268 
269  void *fptr = dlsym( handle, fname.c_str());
270  if ( fptr != NULL) {
271  // This is a C/C++ module
272  typedef void(*Func1)(const char*);
273  (*(Func1)fptr)( wname.c_str());
274  }
275  else {
276  // Try out different name mangling schemes to figure out automatically.
277  int ibegin= ( _f90_mangling == -1 ) ? 0 : _f90_mangling;
278  int iend = (_f90_mangling == -1) ? 4: _f90_mangling;
279 
280  // 0: lowercase
281  // 1: uppercase
282  // 2: _
283  // 3: uppercase _
284  // 4: lowercase __
285  for ( int i=ibegin; i<=iend; ++i) {
286  if ( i & 1 == 1)
287  std::transform( fname.begin(), fname.end(), fname.begin(), toupper);
288  else
289  std::transform( fname.begin(), fname.end(), fname.begin(), tolower);
290 
291  if ( i==2 || (i==3&&i==ibegin)) fname.append( "_");
292  if (i==4) { fname.append( "_"); if (ibegin == 4) fname.append( "_"); }
293 
294  fptr = dlsym( handle, fname.c_str());
295  if ( fptr) { _f90_mangling = i; break; }
296  }
297 
298  if ( fptr != NULL) {
299  // This is a Fortran module
300  typedef void(*Func2)(const char*,long int);
301  (*(Func2)fptr)( wname.c_str(), wname.size());
302  }
303  else {
304  std::string msg;
305  if ( ibegin == iend) msg = fname+" in "+lname_found;
306  else msg = fname + " or any its lowercase w/o underscore in " + lname;
307 
308  msg.append( "\nError message from libdl is: ");
309  msg.append( dlerror());
311  "Roccom_base::load_module");
312  }
313  }
314 
315  // Restore the default communicator.
316  std::swap(_comm, comm);
317 
318  if ( _debug)
319  std::cerr << "Roccom: Module " << lname << " loaded." << std::endl;
320 #endif
321 }
void swap(int &a, int &b)
Definition: buildface.cpp:88
Module_map _module_map
Definition: Roccom_base.h:470
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_COMM_SELF
int _f90_mangling
Encoding name mangling.
Definition: Roccom_base.h:487
std::pair< int, Object * > find(const std::string &name, bool is_const=false)
Definition: maps.h:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
std::string _libdir
Library directory.
Definition: Roccom_base.h:475
Encapsulates the states of an exception.
std::pair< void *, std::set< std::string > > value_type
Definition: maps.h:47
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
MPI_Comm _comm
Default communicator of Roccom.
Definition: Roccom_base.h:481
blockLoc i
Definition: read.cpp:79
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int add_object(std::string name, Object t, bool is_const=false)
Insert an object into the table.
Definition: maps.h:97

Here is the call graph for this function:

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.

521 {
522  try {
523  if ( _debug) {
524  std::cerr << "Roccom: new attribute \"" << wa
525  << "\"\nRoccom:\tLocation: " << loc << "\nRoccom:\tType: ";
526  print_type( std::cerr, type);
527  std::cerr << "\nRoccom:\tSize: " << size << "\nRoccom:\tUnit: \"" << unit << "\""
528  << std::endl;
529  }
530 
531  // Invoke Window::new_attribute.
532  std::string wname, aname;
533  split_name( wa, wname, aname);
534 
535  get_window( wname).new_attribute( aname, loc, type, size, unit);
536  _errorcode = 0;
537  }
538  catch ( COM_exception ex) {
540  std::string s;
541  s = s + "When processing attribute " + wa;
542  proc_exception( ex, s);
543  }
544 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
Attribute * new_attribute(const std::string &aname, const char loc, const int type, int ncomp, const std::string &unit)
Create a new Attribute object with given properties.
Definition: Window.C:86
void print_type(std::ostream &os, COM_Type type)
Definition: Roccom_base.C:480
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
void new_attribute(const std::string &wa, const char loc, const int data_type, int size, const std::string &unit)
Creates a new attribute for a window.
Definition: Roccom_base.C:516

Here is the call graph for this function:

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.

400 {
401  // If MPI_COMM_NULL is used, then use the default communicator.
402  if ( comm == MPI_COMM_NULL) comm = _comm;
403 
404  try {
405  if ( _debug)
406  std::cerr << "Roccom: Creating window \"" << name << '"'
407  << " with communicator " << comm << std::endl;
408 
409  if ( _window_map.find( name).second)
412 
413  _window_map.add_object( name, new Window( name, comm));
414  _errorcode = 0;
415  }
416  catch ( COM_exception ex) {
418  std::string s("When processing "); s.append(name);
419  proc_exception( ex, s);
420  }
421 }
double s
Definition: blastest.C:80
A Window object contains multiple panes and multiple data attributes.
Definition: Window.h:42
std::pair< int, Object * > find(const std::string &name, bool is_const=false)
Definition: maps.h:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
Window_map _window_map
Definition: Roccom_base.h:471
MPI_Comm _comm
Default communicator of Roccom.
Definition: Roccom_base.h:481
void new_window(const std::string &wname, MPI_Comm comm)
Creates a window with given name.
Definition: Roccom_base.C:399
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int add_object(std::string name, Object t, bool is_const=false)
Insert an object into the table.
Definition: maps.h:97
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.

2106  {
2107  if ( !_profile_on) return;
2108 
2109  if ( _debug){
2110  std::cerr << "Roccom: Appending profile into file \"" << fname
2111  << '"' << std::endl;
2112  }
2113  std::multimap< double, int> profs;
2114  typedef std::multimap< double, int>::value_type MMVT;
2115 
2116  for ( int i=1, n=_func_map.wtimes_self.size(); i<n; ++i) {
2117  if ( _func_map.wtimes_self[i] > 0.0)
2118  profs.insert( MMVT( -_func_map.wtimes_self[i], i));
2119  }
2120 
2121  std::FILE *of = NULL;
2122  if ( fname.size() == 0)
2123  of = stdout;
2124  else {
2125  of = std::fopen( fname.c_str(), "a");
2126  if ( of == NULL) {
2127  std::cerr << "Roccom: Could not open file \"" << fname
2128  << "\"\nRoccom: Giving up profiling" << std::endl;
2129  _profile_on = false; return;
2130  }
2131  }
2132  std::fputc('\n', of);
2133 
2134  if ( header.size() == 0)
2135  std::fputs( "************************Roccom simple profiling tool\
2136 ************************", of);
2137  else
2138  std::fputs( header.c_str(), of);
2139 
2140  std::fprintf( of, "\n%32s%12s%14s%14s\n", "Function", "#calls",
2141  "Time(tree)", "Time(self)");
2142  std::fputs( "-------------------------------------------------------\
2143 ---------------------\n", of);
2144 
2145  std::multimap< double, int>::const_iterator i, iend;
2146  for ( i=profs.begin(), iend=profs.end(); i!=iend; ++i) {
2147  std::fprintf( of, "%32.32s%12d%14g%14g\n",
2148  _func_map.name(i->second).c_str(),
2149  _func_map.counts[i->second],
2150  _func_map.wtimes_tree[i->second],
2151  _func_map.wtimes_self[i->second]);
2152  }
2153  std::fputs( "-------------------------------------------------------\
2154 ---------------------\n", of);
2155  std::fprintf( of, "%32s%40g\n", "Total(top level calls)",
2156  _func_map.wtimes_tree[0]);
2157 
2158  if ( of != stdout) std::fclose( of);
2159 }
const std::string & name(int i) const
Name of the object.
Definition: maps.h:76
int fclose(std::FILE *file)
Close a file, and check for possible errors.
Definition: CImg.h:5507
std::vector< double > wtimes_tree
Accumulator of wall-clock time spent by itself and those functions called by it.
Definition: maps.h:155
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
std::vector< double > wtimes_self
Accumulator of wall-clock time spent by itself excluding functions called by it.
Definition: maps.h:154
std::vector< int > counts
Counts of the number of calls.
Definition: maps.h:156
blockLoc i
Definition: read.cpp:79
bool _profile_on
Indicates whether should profile.
Definition: Roccom_base.h:485
const NT & n
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
std::FILE * fopen(const char *const path, const char *const mode)
Open a file, and check for possible errors.
Definition: CImg.h:5494
Function_map _func_map
Definition: Roccom_base.h:473

Here is the call graph for this function:

void proc_exception ( const COM_exception ex,
const std::string &  s 
)
throw (int
)
protected

Definition at line 2259 of file Roccom_base.C.

References printStackBacktrace(), and s.

Referenced by set_profiling_barrier().

2260 {
2261  extern void printStackBacktrace();
2262  _errorcode = ex.ierr;
2263 
2264  std::cerr << "\nRoccom:" << ex << s << std::endl;
2265  if ( _exception_on && _errorcode>=1000) {
2267  throw ex.ierr;
2268  }
2269 }
double s
Definition: blastest.C:80
Error_code ierr
Error code.
bool _exception_on
Indicates whether Roccom should throw exception.
Definition: Roccom_base.h:484
COM_BEGIN_NAME_SPACE void printStackBacktrace()
Print the stack backtrace.
int _errorcode
Error code.
Definition: Roccom_base.h:483

Here is the call graph for this function:

Here is the caller graph for this function:

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.

728  {
729  try {
730  if ( _debug) {
731  std::cerr << "Roccom: Resize array for \"" << wa << "\" on pane "
732  << pid << " with stride ";
733  if ( strd<0) std::cerr << "==current";
734  else if (strd) std::cerr << strd;
735  else std::cerr << "==#components";
736 
737  std::cerr << " and capacity ";
738 
739  if ( cap) std::cerr << cap;
740  else std::cerr << "==#items";
741 
742  std::cerr << std::endl;
743  }
744 
745  std::string wname, aname;
746  split_name( wa, wname, aname);
747 
748  get_window( wname).resize_array( aname, pid, addr, strd, cap);
749  _errorcode = 0;
750  }
751  catch ( COM_exception ex) {
753  std::string s;
754  s = s + "When processing attribute " + wa;
755  proc_exception( ex, s);
756  }
757 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
void resize_array(const std::string &aname, const int pane_id, void **addr, int strd=-1, int cap=0)
Resize memory for an attribute for a specific pane and set addr to the address.
Definition: Window.C:261
Encapsulates the states of an exception.
std::string msg
Error message.
void resize_array(const std::string &wa, const int pane_id=0, void **addr=NULL, int strd=-1, int cap=0)
Resize an attribute on a specific pane and return the address by setting addr.
Definition: Roccom_base.C:727
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
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.

661 {
662  try {
663  if ( _debug) {
664  std::cerr << "Roccom: Set array for \"" << wa << "\" on pane "
665  << pid << " to " << addr << " with stride ";
666  if ( strd) std::cerr << strd;
667  else std::cerr << "==#components";
668 
669  std::cerr << " and capacity ";
670 
671  if ( cap) std::cerr << cap;
672  else std::cerr << "==#items";
673 
674  std::cerr << std::endl;
675  }
676 
677  std::string wname, aname;
678  split_name( wa, wname, aname);
679 
680  get_window( wname).set_array( aname, pid, addr, strd, cap, is_const);
681  _errorcode = 0;
682  }
683  catch ( COM_exception ex) {
685  std::string s;
686  s = s + "When processing attribute " + wa;
687  proc_exception( ex, s);
688  }
689 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
void set_array(const std::string &aname, const int pane_id, void *addr, int strd=0, int cap=0, bool is_const=false)
Associate an array with an attribute for a specific pane.
Definition: Window.C:212
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
void set_array(const std::string &wa, const int pane_id, void *addr, int strd=0, int cap=0, bool is_const=false)
Associates an array with an attribute for a specific pane.
Definition: Roccom_base.C:658
void set_bounds ( const std::string &  wa,
const int  pane_id,
lbnd,
ubnd 
)
throw (int
)
inline

Definition at line 146 of file Roccom_base.h.

Referenced by set_bounds().

148  { set_bounds( wa, pane_id, (const void*)&lbnd, (const void*)&ubnd); }
void set_bounds(const std::string &wa, const int pane_id, T lbnd, T ubnd)
Definition: Roccom_base.h:146

Here is the caller graph for this function:

void set_bounds ( const std::string &  wa,
const int  pane_id,
const T *  lbnd,
const T *  ubnd 
)
throw (int
)
inline

Definition at line 151 of file Roccom_base.h.

References set_bounds().

153  { set_bounds( wa, pane_id, (const void*)&lbnd, (const void*)&ubnd); }
void set_bounds(const std::string &wa, const int pane_id, T lbnd, T ubnd)
Definition: Roccom_base.h:146

Here is the call graph for this function:

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.

693 {}
void set_debug ( bool  debug)
inline

Turns on debuging messages.

Definition at line 389 of file Roccom_base.h.

References _debug.

389  {
390  _debug = debug;
391  }
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
static void set_default_communicator ( MPI_Comm  comm)
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().

72  { get_roccom()->_comm = comm; }
MPI_Comm _comm
Default communicator of Roccom.
Definition: Roccom_base.h:481
static Roccom_base * get_roccom()
Get a pointer to the Roccom object.
Definition: Roccom_base.h:505

Here is the call graph for this function:

Here is the caller graph for this function:

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().

1148  {
1149  try {
1150  if ( _debug)
1151  std::cerr << "Roccom: set pointer \"" << waname
1152  << " to " << ptr << std::endl;
1153 
1154  std::string wname, aname;
1155  split_name( waname, wname, aname);
1156 
1157  Attribute *a = get_window( wname).attribute( aname);
1158  if ( a->location() != 'w')
1161  if ( a->data_type() == COM_F90POINTER) {
1163 
1164  std::pair<int,int> offs = get_f90pntoffsets( a);
1165  std::memcpy( a->pointer(), (char*)ptr-offs.first, offs.second);
1166 
1167  if ( offs.second<n) {
1168  *(void**)((char*)a->pointer()+offs.second) =
1169  (char*)a->pointer()+offs.first+((char*)len-(char*)ptr);
1170  }
1171 
1172  COM_assertion_msg( _f90ptr_treat>=0, "No F90 pointer initalized");
1174  typedef void(*Func2)(void*,void*, long int, long int);
1175  *(void**)((char*)a->pointer()+offs.first)=NULL;
1176  (*(Func2)f)( ptr, (char*)a->pointer()+offs.first,
1177  len, *(long int*)((char*)a->pointer()+offs.second));
1178  }
1179  else {
1180  typedef void(*Func2)(void*,void*);
1181  (*(Func2)f)( (char*)ptr+offs.first, a->pointer());
1182  }
1183 
1184  if ( _debug) {
1185  std::cerr << "Roccom: copied values ";
1186  for ( int i=0, ni=n/sizeof(void*); i<ni; ++i)
1187  std::cerr << ((void**)a->pointer())[i] << ' ';
1188  std::cerr << std::endl;
1189  }
1190  }
1191  else
1194  }
1195  catch ( COM_exception ex) {
1197  proc_exception( ex, "");
1198  }
1199 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
An Attribute object is a data member of a window.
Definition: Attribute.h:51
#define COM_assertion_msg(EX, msg)
std::pair< int, int > get_f90pntoffsets(const Attribute *a)
Definition: Roccom_base.C:1135
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Shorter_size location() const
Obtain the location of the attribute.
Definition: Attribute.h:186
Encapsulates the states of an exception.
std::string msg
Error message.
const void * pointer() const
Obtain a constant pointer to the physical address.
Definition: Attribute.h:150
int _f90ptr_treat
Treatement of F90 pointers.
Definition: Roccom_base.h:493
blockLoc i
Definition: read.cpp:79
const NT & n
Attribute * attribute(const std::string &a)
Obtain a pointer to the attribute metadata from its name.
Definition: Window.C:842
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
void set_f90pointer(const std::string &waname, void *ptr, Func_ptr f, long int l)
Definition: Roccom_base.C:1147
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
COM_Type data_type() const
Obtain the data type of each component of the attribute.
Definition: Attribute.h:197
static int get_sizeof(COM_Type type, int count=1)
Gets the size of the data type given by its index.
Definition: Roccom_base.C:2162
int size_of_components() const
Obtain the number of components in the attribute.
Definition: Attribute.h:203

Here is the call graph for this function:

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().

1592  {
1594  try {
1595  if ( _debug) {
1596  int n=intents.size();
1597  std::cerr << "Roccom: init function \"" << wfname << '"'
1598  << " to " << ptr << " with " << n << " parameters";
1599 
1600  for ( int i=0; i<n; ++i) {
1601  std::cerr << "\nRoccom:\t" << intents[i] << ":";
1602  print_type( std::cerr, types[i]);
1603  }
1604  std::cerr << std::endl;
1605  }
1606  std::string wname, fname;
1607  split_name( wfname, wname, fname);
1608 
1609  if ( intents.size() > Function::MAX_NUMARG)
1612 
1613  for ( int i=0, size=intents.size(); i<size; ++i) {
1614  if (intents[i] != 'i' && intents[i] != 'o' && intents[i] != 'b' &&
1615  intents[i] != 'I' && intents[i] != 'O' && intents[i] != 'B')
1618  if ( types[i] < COM_MIN_TYPEID || types[i] > COM_MAX_TYPEID)
1621  }
1622 
1623  get_window( wname).set_function( fname, ptr, intents, types, NULL, ff);
1624  _errorcode = 0;
1625  }
1626  catch ( COM_exception ex) {
1628  std::string s;
1629  s = s + "When processing attribute " + wfname;
1630  proc_exception( ex, s);
1631  }
1632 }
int COMMPI_Comm_rank(MPI_Comm c)
Definition: commpi.h:162
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_COMM_WORLD
void set_function(const std::string &wf, Func_ptr ptr, const std::string &intents, const COM_Type *types, bool ff=false)
Registers a function to the window.
Definition: Roccom_base.C:1589
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
blockLoc i
Definition: read.cpp:79
const NT & n
void print_type(std::ostream &os, COM_Type type)
Definition: Roccom_base.C:480
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
static int rank
Definition: advectest.C:66
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
void set_function(const std::string &fname, Func_ptr func, const std::string &intents, const COM_Type *types, Attribute *a, bool if_f90=false)
Initialize a Function record.
Definition: Window.C:59

Here is the call graph for this function:

Here is the caller graph for this function:

void set_function_verbose ( int  i,
int  level 
)
throw (int
)

Definition at line 2064 of file Roccom_base.C.

References i.

2064  {
2065  _func_map.verbs[i] = level;
2066 }
std::vector< char > verbs
Whether verbose is on.
Definition: maps.h:153
blockLoc i
Definition: read.cpp:79
Function_map _func_map
Definition: Roccom_base.h:473
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().

1700  {
1701  set_member_function_helper( wfname, ptr, waname,
1702  intents, types, ff);
1703 }
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)
Definition: Roccom_base.C:1636

Here is the caller graph for this function:

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.

1710  {
1711  set_member_function_helper( wfname, ptr, waname,
1712  intents, types, ff);
1713 }
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)
Definition: Roccom_base.C:1636
void set_member_function_helper ( const std::string &  wf,
ptr,
const std::string &  wa,
const std::string &  intents,
const COM_Type types,
bool  ff = false 
)
throw (int
)
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().

1641  {
1642  try {
1643  if ( _debug) {
1644  int n=intents.size();
1645  std::cerr << "Roccom: init function \"" << wfname << '"'
1646  << " to " << ptr << " with " << n << " parameters";
1647  for ( int i=0; i<n; ++i) {
1648  std::cerr << "\nRoccom:\t" << intents[i] << ":";
1649  print_type( std::cerr, types[i]);
1650  if ( i==0) std::cerr << "\t\"" << waname << "\"";
1651  }
1652  std::cerr << std::endl;
1653  }
1654  std::string wname, fname;
1655  split_name( wfname, wname, fname);
1656 
1657  // Allows an additional implicit argument
1658  if ( intents.size() > Function::MAX_NUMARG+1)
1661 
1662  for ( int i=0, size=intents.size(); i<size; ++i) {
1663  if (intents[i] != 'i' && intents[i] != 'o' && intents[i] != 'b' &&
1664  intents[i] != 'I' && intents[i] != 'O' && intents[i] != 'B')
1667  if ( types[i] < COM_MIN_TYPEID || types[i] > COM_MAX_TYPEID)
1670  }
1671 
1672  std::string wname1, aname1;
1673  split_name( waname, wname1, aname1);
1674 
1675  Attribute *a = get_window( wname1).attribute( aname1);
1676 
1677  if ( a==NULL)
1680  if ( !ff && a->data_type()==COM_F90POINTER)
1683 
1684  get_window( wname).set_function( fname, ptr, intents, types, a, ff);
1685  _errorcode = 0;
1686  }
1687  catch ( COM_exception ex) {
1689  std::string s;
1690  s = s + "When processing attribute " + wfname;
1691  proc_exception( ex, s);
1692  }
1693 }
void set_function(const std::string &wf, Func_ptr ptr, const std::string &intents, const COM_Type *types, bool ff=false)
Registers a function to the window.
Definition: Roccom_base.C:1589
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
An Attribute object is a data member of a window.
Definition: Attribute.h:51
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
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)
Definition: Roccom_base.C:1695
std::string msg
Error message.
blockLoc i
Definition: read.cpp:79
const NT & n
void print_type(std::ostream &os, COM_Type type)
Definition: Roccom_base.C:480
int _errorcode
Error code.
Definition: Roccom_base.h:483
Attribute * attribute(const std::string &a)
Obtain a pointer to the attribute metadata from its name.
Definition: Window.C:842
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
COM_Type data_type() const
Obtain the data type of each component of the attribute.
Definition: Attribute.h:197
void set_function(const std::string &fname, Func_ptr func, const std::string &intents, const COM_Type *types, Attribute *a, bool if_f90=false)
Initialize a Function record.
Definition: Window.C:59

Here is the call graph for this 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.

627 {
628  COM_assertion_msg( obj_addr, "Caught NULL pointer");
629  int size;
630  get_attribute( wa, NULL, NULL, &size, NULL);
631  COM_assertion_msg( size==1, "Must register a scalar with set_object");
632 
633  if ( obj_addr == casted_addr) {
634  set_array( wa, pid, obj_addr);
635  return;
636  }
637 
638  if ( _cppobj_casting == -1)
640 
641  if ( _cppobj_casting) // Use stride to store the offset
642  set_array( wa, pid, casted_addr, (char*)casted_addr-(char*)obj_addr);
643  else
644  set_array( wa, pid, obj_addr);
645 }
void get_attribute(const std::string &wa_str, char *loc, int *type, int *size, std::string *unit)
Information retrieval Get the information about an attribute.
Definition: Roccom_base.C:958
#define COM_assertion_msg(EX, msg)
static bool cast_obj()
Definition: Roccom_base.C:598
void set_array(const std::string &wa, const int pane_id, void *addr, int strd=0, int cap=0, bool is_const=false)
Associates an array with an attribute for a specific pane.
Definition: Roccom_base.C:658
int _cppobj_casting
Treatement of C++ objects.
Definition: Roccom_base.h:494

Here is the call graph for this function:

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.

2069  {
2070  if ( _debug)
2071  std::cerr << "Roccom: init profiling level to " << i << std::endl;
2072  _profile_on = i;
2073  std::fill(_func_map.wtimes_tree.begin(),_func_map.wtimes_tree.end(), 0);
2074  std::fill(_func_map.wtimes_self.begin(),_func_map.wtimes_self.end(), 0);
2075  std::fill(_func_map.counts.begin(),_func_map.counts.end(), 0);
2076 }
std::vector< double > wtimes_tree
Accumulator of wall-clock time spent by itself and those functions called by it.
Definition: maps.h:155
std::vector< double > wtimes_self
Accumulator of wall-clock time spent by itself excluding functions called by it.
Definition: maps.h:154
std::vector< int > counts
Counts of the number of calls.
Definition: maps.h:156
blockLoc i
Definition: read.cpp:79
bool _profile_on
Indicates whether should profile.
Definition: Roccom_base.h:485
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
Function_map _func_map
Definition: Roccom_base.h:473
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().

2079  {
2080  if ( hdl == 0) return;
2081  try {
2082  if ( hdl < 0 || hdl>=_func_map.size())
2084 
2085  if ( _debug){
2086  std::cerr << "Roccom: init profiling barrier for function handle " << hdl
2087  << std::endl << "Roccom:\tFunction: " << _func_map.name(hdl)
2088  << " Communicator: " << comm << std::endl;
2089  }
2090 
2091  // Set the communicator only if MPI has been initialized.
2092  if ( COMMPI_Initialized()) {
2093  if ( comm==MPI_COMM_NULL) comm = _comm;
2094  get_function( hdl).set_communicator( comm);
2095  }
2096  }
2097  catch ( COM_exception ex) {
2099  char buf[100];
2100  std::sprintf( buf, "Could not get function with handle %d", hdl);
2101  proc_exception( ex, buf);
2102  }
2103 }
void set_communicator(MPI_Comm c)
Definition: Function.h:118
int size() const
Definition: maps.h:78
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
const std::string & name(int i) const
Name of the object.
Definition: maps.h:76
Encapsulates the states of an exception.
std::string msg
Error message.
MPI_Comm _comm
Default communicator of Roccom.
Definition: Roccom_base.h:481
Function & get_function(const int)
Obtains a reference to an attribute from its handle.
Definition: Roccom_base.C:2206
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
void set_profiling_barrier(int hdl, MPI_Comm comm)
Definition: Roccom_base.C:2079
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
int COMMPI_Initialized()
Definition: commpi.h:168
Function_map _func_map
Definition: Roccom_base.h:473

Here is the call graph for this function:

void set_roccom ( Roccom_base r)
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().

56 { roccom_base = r; }
static Roccom_base * roccom_base
Definition: Roccom_base.h:499

Here is the caller graph for this function:

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.

571 {
572  try {
573  if ( _debug) {
574  std::cerr << "Roccom: Set size for attribute \""
575  << wa << '"' << " on pane " << pid
576  << " to " << nitems << " items with " << ng
577  << " ghosts" << std::endl;
578  }
579 
580  // Invoke Window::set_size
581  std::string wname, aname;
582  split_name( wa, wname, aname);
583 
584  get_window( wname).set_size( aname, pid, nitems, ng);
585  _errorcode = 0;
586  }
587  catch ( COM_exception ex) {
589  std::string s;
590  s = s + "When processing attribute " + wa;
591  proc_exception( ex, s);
592  }
593 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
void set_size(const std::string &wa_str, int pane_id, int nitems, int ng=0)
Set the sizes of an attribute.
Definition: Roccom_base.C:569
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
void set_size(const std::string &aname, int pane_id, int nitems, int ng=0)
Set the sizes of an attribute for a specific pane.
Definition: Window.C:182
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
void set_verbose ( int  v)
inline

Changes the verbose setting.

Definition at line 384 of file Roccom_base.h.

References _verb1, _verbose, and v.

384  {
385  _verbose = v; _verb1 = ( _verbose<=0) ? 0 : (_verbose+1)%2+1;
386  }
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
Definition: roccomf90.h:20
int _verb1
Indicates whether to print detailed information.
Definition: Roccom_base.h:479
int _verbose
Indicates whether verbose is on.
Definition: Roccom_base.h:478
int split_name ( const std::string &  wa,
std::string &  wname,
std::string &  aname,
bool  tothrow = true 
)
throw (COM_exception
)
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.

2238 {
2239  std::string::size_type ni = wa.find(".");
2240 
2241  if ( ni == std::string::npos)
2242  wname = wa;
2243  else {
2244  wname = wa.substr( 0, ni);
2245  aname = wa.substr( ni+1, wname.size()-ni-1);
2246  }
2247 
2248  if ( wname.empty() || aname.empty())
2249  if ( tothrow)
2252  else
2253  return 1;
2254 
2255  return 0;
2256 }
Encapsulates the states of an exception.
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
int test ( int  )
inline

Test whether a nonblocking call has finished.

Definition at line 371 of file Roccom_base.h.

371 { return 1; }
void turn_off_exception ( )
inline

Definition at line 412 of file Roccom_base.h.

References _exception_on.

412 { _exception_on = false; }
bool _exception_on
Indicates whether Roccom should throw exception.
Definition: Roccom_base.h:484
void turn_on_exception ( )
inline

Definition at line 411 of file Roccom_base.h.

References _exception_on.

411 { _exception_on = true; }
bool _exception_on
Indicates whether Roccom should throw exception.
Definition: Roccom_base.h:484
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.

325  {
326 
327 #ifndef STATIC_LINK
328  if ( _debug)
329  std::cerr << "Roccom: Unloading module " << lname << "..." << std::endl;
330 
331  // Obtain the window name corresponding to the library
332  int index = _module_map.find(lname).first;
333  if ( index<0)
335  "Roccom_base::unload_module");
336 
337  std::set<std::string> &obj = _module_map[index].second;
338 
339  // If the module was loaded multiple times but window name is not
340  // specified, then throw exception.
341  if ( wname.empty() && obj.size()>1)
343  "Roccom_base::unload_module");
344 
345  std::set<std::string>::iterator it = wname.empty()?obj.begin():obj.find( wname);
346 
347  // If wname is not found, throw exception
348  if ( it==obj.end())
350  "Roccom_base::unload_module");
351 
352  // Look for the symbol
353  std::string fname = lname + "_unload_module";
354  std::string wname_str=wname.size()?wname:*obj.begin();
355 
356  void *handle = _module_map[index].first;
357  void *fptr = dlsym( handle, fname.c_str());
358  if ( fptr != NULL) {
359  // This is a C/C++ module
360  typedef void(*Func1)(const char*);
361  (*(Func1)fptr)( wname_str.c_str());
362  }
363  else {
364  if ( _f90_mangling != -1) {
365  if ( _f90_mangling & 1 == 1)
366  std::transform( fname.begin(), fname.end(), fname.begin(), toupper);
367  else
368  std::transform( fname.begin(), fname.end(), fname.begin(), tolower);
369 
370  if ( _f90_mangling ==2 || _f90_mangling == 3) fname.append( "_");
371 
372  fptr = dlsym( handle, fname.c_str());
373  }
374 
375  if ( fptr != NULL) {
376  // This is a Fortran module
377  typedef void(*Func2)(const char*,long int);
378  (*(Func2)fptr)( wname_str.c_str(), wname_str.size());
379  }
380  else {
381  proc_exception( COM_exception(COM_ERR_COULD_FINDSYM, fname+" in "+lname),
382  "Roccom_base::unload_module");
383  }
384  }
385 
386  obj.erase( wname);
387 
388  if ( dodl && obj.size()==0) { // Unload module if all instances removed.
389  dlclose( handle);
390  _module_map.remove_object( lname);
391  }
392 
393  if ( _debug)
394  std::cerr << "Rocccom: Module " << lname << " unloaded" << std::endl;
395 #endif
396 }
Module_map _module_map
Definition: Roccom_base.h:470
int _f90_mangling
Encoding name mangling.
Definition: Roccom_base.h:487
std::pair< int, Object * > find(const std::string &name, bool is_const=false)
Definition: maps.h:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
void remove_object(std::string name, bool is_const=false)
Remove an object from the table.
Definition: maps.h:119
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
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.

784 {
785  try {
786  if ( _debug) {
787  std::cerr << "Roccom: Using attribute \"" << pwaname
788  << "\" onto \"" << waname << '"' << std::endl;
789  }
790  std::string pawname, paaname;
791  split_name( pwaname, pawname, paaname);
792 
793  std::string awname, aaname;
794  std::string::size_type ni = waname.find(".");
795  if ( ni == std::string::npos) {
796  awname = waname; aaname = "";
797  }
798  else
799  split_name( waname, awname, aaname);
800 
801  std::string cawname, caaname;
802  if ( cndname && *cndname!=0)
803  split_name( cndname, cawname, caaname);
804 
805  Attribute *cnd=caaname.empty()?NULL:get_window(cawname).attribute(caaname);
806  if ( !caaname.empty() && cnd==NULL)
807  throw COM_exception( COM_ERR_ATTRIBUTE_NOTEXIST, cndname);
808 
809  get_window(awname).inherit( get_window( pawname).attribute(paaname),
810  aaname, Pane::INHERIT_USE, withghost, cnd, val);
811  _errorcode = 0;
812  }
813  catch ( COM_exception ex) {
815  std::string s;
816  s = s + "When window " + waname + " uses attribute " + pwaname;
817  proc_exception( ex, s);
818  }
819 }
void use_attribute(const std::string &wname, const std::string &pwname, int withghost=1, const char *cndname=NULL, int val=0)
Use the subset of panes of another window of which the given pane attribute has value val...
Definition: Roccom_base.C:782
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
An Attribute object is a data member of a window.
Definition: Attribute.h:51
double s
Definition: blastest.C:80
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
int _errorcode
Error code.
Definition: Roccom_base.h:483
Attribute * attribute(const std::string &a)
Obtain a pointer to the attribute metadata from its name.
Definition: Window.C:842
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
bool empty() const
Check whether the number of items of the attribute is zero.
Definition: Attribute.h:227
Attribute * inherit(Attribute *from, const std::string &aname, int inherit_mode, bool withghost, const Attribute *cond, int val)
Inherit the attributes of another window with a different name.
Definition: Window.C:334

Here is the call graph for this function:

void wait ( int  )
inline

Wait for the completion of a nonblocking call.

Definition at line 369 of file Roccom_base.h.

369 {}
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.

425 {
426  try {
427  get_window( wname).init_done(panechanged);
428  _errorcode = 0;
429  }
430  catch ( COM_exception ex) {
432 
433  std::string msg = std::string("When completing the init of window ")+wname;
434  proc_exception( ex, msg);
435  }
436  if ( _debug)
437  std::cerr << "Roccom: Done creating window \"" << wname
438  << '"' << std::endl;
439 }
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
Encapsulates the states of an exception.
std::string msg
Error message.
void init_done(bool pane_changed=true)
Perform some final checking of the window.
Definition: Window.C:388
int _errorcode
Error code.
Definition: Roccom_base.h:483
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
void window_init_done(const std::string &wname, bool panechanged=true)
Marks the end of the registration of a window.
Definition: Roccom_base.C:424
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480

Member Data Documentation

Attribute_map _attr_map
protected

Definition at line 472 of file Roccom_base.h.

MPI_Comm _comm
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().

int _cppobj_casting
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.

bool _debug
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().

int _depth
protected

Depth of procedure calls.

Definition at line 477 of file Roccom_base.h.

int _errorcode
protected

Error code.

Definition at line 483 of file Roccom_base.h.

Referenced by get_error_code().

bool _exception_on
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().

int _f90_mangling
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.

int _f90ptr_treat
protected

Treatement of F90 pointers.

Definition at line 493 of file Roccom_base.h.

Referenced by COM_F_FUNC2(), f90ptr_treat(), and get_f90pntoffsets().

Function_map _func_map
protected

Definition at line 473 of file Roccom_base.h.

Referenced by print_profile(), set_profiling(), and set_profiling_barrier().

std::string _libdir
protected

Library directory.

Definition at line 475 of file Roccom_base.h.

Module_map _module_map
protected

Definition at line 470 of file Roccom_base.h.

bool _mpi_initialized
protected

Indicates whether MPI was initialized by Roccom.

Definition at line 482 of file Roccom_base.h.

Referenced by ~Roccom_base().

bool _profile_on
protected

Indicates whether should profile.

Definition at line 485 of file Roccom_base.h.

Referenced by print_profile(), and set_profiling().

std::vector<double> _timer
protected

Timers for function calls.

Definition at line 476 of file Roccom_base.h.

int _verb1
protected

Indicates whether to print detailed information.

Definition at line 479 of file Roccom_base.h.

Referenced by set_verbose().

int _verbose
protected

Indicates whether verbose is on.

Definition at line 478 of file Roccom_base.h.

Referenced by set_verbose().

Window_map _window_map
protected

Definition at line 471 of file Roccom_base.h.

COM_BEGIN_NAME_SPACE Roccom_base * roccom_base =NULL
staticprotected

Definition at line 499 of file Roccom_base.h.

Referenced by get_roccom(), and set_roccom().


The documentation for this class was generated from the following files: