I am able to compile my process model when using sequential kernel but not when using parellel one. The compilation error is sim_context_ptr identifier not found.

Categories:
Solution Number:
S20807
Last Modified:
2013-08-20
Issue

I am able to compile my process model when using sequential kernel but not when using parellel one. The compilation error is sim_context_ptr identifier not found.

Solution

You should not try to use State Variables before the FIN statement for functions defined outside the FSM itself (i.e. FB and also external source files).The example below will not compile when using parellel kernel types:void my_proc(void){int j = SV;FIN (my_proc);FOUT;}Function defined in FB and SV is a integer State VariableWhen using parellel kernels, an additional simulation context argument has to be used (called sim_context_ptr). This argument must be used when trying to access state variables. Since the FIN statement is also used here to provide a value for sim_context_ptr, trying to use a State Variable before the FIN statement will not compile.The code below will be compiled:void my_proc(void){int j;FIN (my_proc); j = SV;FOUT;} You will find more information in the online documentation (Concepts Reference Manual -> Simulation Design -> Parallel Simulation -> Making Models Parallel-Safe -> Simulation Context Pointer).

Environment

Compiling/Linking,DES Kernel->Process Modeling/Coding

Attachments
NOTICE: Riverbed® product names have changed. Please refer to the Product List for a complete list of product names.
Can't find an answer? Create a case