IBM Support

PI48960: S-FUNCTION GENERATED FROM <<STRUCTUREDSIMULINKBLOCK>> HAS NON-DETERMINISTIC BEHAVIOR AT START-UP IN SIMULINK SIMULATION.

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

APAR status

  • Closed as program error.

Error description

  • S-Function generated from <<StructuredSimulinkBlock>> has
    non-deterministic behavior at the start-up in Simulink
    simulation. The issue seems to be caused by a race condition
    between the S-Function wrapper and the Rhapsody OXF thread.
    User had to change the S-Function wrapper, replacing an IF with
    a WHILE (see line labeled MAXFIX).
    With the original code the execution was going past the wait()
    statement even when the bShouldWait was still set to true (so,
    bShouldWait was true both in the IN and OUT printout that was
    added).
    Also observed that the issue does not show up when you do a
    "step" in Simulink before hitting run (so, the step seems to
    avoid the non-determinism at the beginning of the execution).
    
    The modified code follows:
    
    static void checkAndWaitForIdle(void)
    {
           /* if the 'bShouldWait' flag is on we need to wait till
    Rhapsody notifies Idle */
           std::cout << "IN checkAndWaitForIdle: " <<
    "bShouldWait:" << bShouldWait << " waitSignal:" << waitSignal <<
    std::endl;
           while(bShouldWait && waitSignal) //MAXFIX (changed from
    if to while - otherwise do not wait for signal, gets out with
    bShouldWait still to true)
           {
                  waitSignal->wait(-1);
           }
           std::cout << "OUT checkAndWaitForIdle: " <<
    "bShouldWait:" << bShouldWait << " waitSignal:" << waitSignal <<
    std::endl;
    }
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Rhapsody 8.1.2.1                                             *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * S-FUNCTION GENERATED FROM <<STRUCTUREDSIMULINKBLOCK>> HAS    *
    * NON-DETERMINISTIC BEHAVIOR AT START-UP IN SIMULINK           *
    * SIMULATION.                                                  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • Fixed in 8.1.4
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI48960

  • Reported component name

    TLOGIC RHAPSODY

  • Reported component ID

    5724V74RP

  • Reported release

    812

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2015-09-17

  • Closed date

    2015-12-16

  • Last modified date

    2015-12-16

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    TLOGIC RHAPSODY

  • Fixed component ID

    5724V74RP

Applicable component levels

  • R812 PSY

       UP



Document information

More support for: Rational Rhapsody

Software version: 8.1.2

Reference #: PI48960

Modified date: 16 December 2015