Some of the routines in the FEM framework have different requirements or meanings depending on where they are called from. When a routine is described as being ``called from driver'', this means it is called in the parallel context--from driver() itself, any subroutine called by driver(), or from whatever routine is run by the FEM-attached TCHARM threads. When a routine is described as being ``called from init'', this means it is called in the serial context--from init() itself, from any subroutine called from init(), from a routine called by FEM_Update_mesh, or from whatever TCHARM code executes before the FEM_Attach.
int FEM_Num_partitions();
INTEGER FUNCTION :: FEM_Num_partitions()
Return the number of mesh chunks in the current computation. Can only be called from the driver routine.
int FEM_My_partition();
INTEGER FUNCTION :: FEM_My_partition()
Return the number of the current chunk, from 0 to num_partitions-1. Can only be called from the driver routine.
double FEM_Timer();
DOUBLE PRECISION FUNCTION :: FEM_Timer()
Return the current wall clock time, in seconds. Resolution is machine-dependent, but is at worst 10ms.
void FEM_Print_partition();
SUBROUTINE FEM_Print_partition()
Print a debugging representation of the current chunk's mesh. Prints the entire connectivity array, and data associated with each local node and element.
void FEM_Print(const char *str);
SUBROUTINE FEM_Print(str)
CHARACTER*, INTENT(IN) :: str
Print the given string, with "[<chunk number>]" printed before the text.
This routine is no longer required: you can now use the usual printf, PRINT, or WRITE statements.
November 23, 2009
FEM Homepage
Charm Homepage