2 Replies Latest reply: Aug 3, 2016 6:10 PM by Paul Conway RSS

Using Boost Threading with Opnet

Loren Garavaglia

I'm trying to create a thread with one of my nodes using the boost library. My intent is that this thread will continue running in the background collecting input data for the node while to node does the more intensive processing, however, after my thread completes its first loop I receive the following error from OPNET.

 

<<< Program Abort >>>

  * Time:      22:14:41 Thu May 19 2016

  * Product:   modeler (64-bit)

  * Program:   op_runsim (Version 14.5.A PL8 Build 7808 64-bit)

  * System:    Windows NT 6.2 Build 9200

  * Package:   process (wlan_mac_interface) at module (top.Office Network.node_1.wlan_mac_intf)

  * Function:  wlan_mac_interface [init enter execs]

  * Error:     Standard function stack imbalance

               wlan_mac_interface [init enter execs]

               T (0), EV (16), MOD (top.Office Network.node_1.wlan_mac_intf)

 

 

  * Function call stack: (builds down)

    ------------------------------------------------------------

             Call   Block

             Count  Line#  Function

    ------------------------------------------------------------

     0)          1    152  0x532b4e02 [name not available]

     1)          1   2211  0x00004c00 [name not available]

     2)          1   1358  0x0000c400 [name not available]

     3)          1    399  m3_main

     4)          1   1074  sim_main

     5)          1   2894  sim_ev_loop

     6)         17    910  sim_obj_qps_intrpt

     7)          1     14  wlan_mac_interface [init enter execs]

    ------------------------------------------------------------

 

Would anyone know if my intended use case is possible with OPNET? I've run a version of my threaded code separate from OPNET and it works fine.

  • Re: Using Boost Threading with Opnet
    Paul Conway

    I recommend you read the Modeling Framework section of the Modeling Concepts documentation.  Give special attention to the subsections one Modeling System Structure and Event-Scheduled Simulation.

     

    The use case you describe - having a background process that collects data and a foreground process that uses this data to perform more intensive processing is possible with Modeler.  However, not through threads.

     

    Modeler is a discrete event simulator.  Meaning that the simulation performs discrete events at a picosecond granularity.  Modeler controls time and runtime may not be the same as simulation time.  You use multiple process models and interrupts to provide the illusion of independent execution threads.

  • Re: Using Boost Threading with Opnet
    Paul Conway

    Loren,

      Given the time between your question and now, no one has indicated using Boost Threads with Riverbed Modeler is possible.  Above I described why threaded code is inconsistent with a discrete event simulator.

     

      I hope this answers your question.