Prerequisites for reentrant SubVIs to run in parallel

Hello!

In my VI, two clones préallouées of a Subvi, I thought I would go in a separate thread of each. Just this sub - VI contains a reference to a double and it increments. The two clones ran in parallel, but not in separate threads. For comparison, I did a Subvi, which does not have a reference - these clones run each in own thread.

I noticed this watching the CPU usage: in the first case, has been used as a single core in the second respectively two sons were used.

(1) I wonder what are the prerequisites for a Subvi to run effectively not only in parallel, but in fact in separate threads?

(2) is there a way to discover during compilation which (Tufts) parts of a VI run in parallel, and SubVIs get making their own thread of execution?

For reference: the execution is slow. If I understand correctly, the GUI is running in its own thread, so no interfering only not with the SubVIs that multiply references. I think that there is also no locking a reference readings and writings to a reference should be very fast. Is this correct? If so, why is this slow running?

Thanks for your replies

Marco

(The test computer has a Quad-Core with Hyperthreading, using LabVIEW 2012SP1)

One thing I know is if you have any manipulation of the UI elements.

In the case you use a reference to a UI element user and properbly using the property node to insert data.
This limits LabVIEW for your sub vi of in the UI thread.

If you have transferred the values on the queue to a vi that manages all the user interface controls, then only that vi will be in the UI thread.

Who is?

Tags: NI Software

Similar Questions

  • Two Partitions of disk for both systems or running under Parallels

    I have a 27 "Quad core i7 with 8 GB and 1 hard drive I partitioned the hd in 2 partitions: the boot partition has OS X-Yosemite and works very well. However there are occasions when I need to run OS X - Snow Leopard because some devices that I need to use are not compatible with Yosemite because there is no update for the OEM driver. Frankly I do not have the budget to upgrade the devices, so I need a workaround solution.  Is the drive of the 2 score or running 2 OS under Parallels the best solution? Help, please!

    Thank you

    Joe has.

    If the system can operate in native mode of SL (outside of the virtual machine), there is nothing wrong with it.  I currently have a 480 GB SSD with 240 GB Mavericks and my original SL on another partition of 240 GB.  You have to keep 2 backups, one for each system, but that is expected.

    On the other hand, if you want both running at the same time, use VM.

    VM is usually a puzzle that I reserve for Linux and Windows that need special 'hooks' to run on an Apple and are easier to exploit, because I didn't need "both running simultaneously.

  • With the help of DAC for running no BIApps infa jobs n 2 EP running in parallel

    Hello

    We already have configuration BI Apps prod environment using DAC, Informatica and OBIEE 11 g for one of our customers.

    Now, we want to check the possibility of using the DAC for the execution of BIApps no informatica related jobs.
    (That we had only a week of the execution plan of DAC weekend and Informatica and DAC are inactive most of the time during the week)

    Customer wants a separate new small datamart be configured which meet the requirements of statement for different departments and has no links of kinship or any link with existing BI Data Warehouse applications.

    I just wanted to check if it will violate the license terms (if we use CAD to workflows not BI Apps and run another EP)?

    In addition, the DAC Build 10.1.3.4.1 is capable of running two parallel execution plans?

    We have heard long back that two parallel feature EP will be lunched in the version 11g CAD. Pointers or new in this space?

    Thanks in advance,

    From what I remember, you cannot load a 'distinct' DB instance that is NO OLIVIER. If you create a small custom datamart on the INSIDE of the OLIVIER exitsing schema, then it is acceptable. However, if you use DAC (no matter if its plan one or two plans) to load a NON-OBIA target, this may violate the license agreement. You need a self-contained separate license for Informatica and use the planner of Informatica tool. If you want to use DAC, ensure that your target is inside the DW OBIA.

    Pls correct brand...

  • You need to pass arguments to the Sub - VI which runs in parallel to the main vi.

    Please help me.

    I can pass arguments to a subvi using "call-by-reference-node" but the sub - vi will not work in parallel.  I can also run my sub - vi in parallel using "invoke the node", but then cannot pass arguments.  I can't understand how to merge these two concepts.

    When I open the reference VI, I specify the strict type, using call-by-reference-node.  When I use call node, I don't specify the type.  It seems that specifying the type strict guard screw run in parallel, but also seems necessary to pass arguments.

    I apologize for my absence of a deeper understanding of this and appreciate any help you can give me.

    Chris

    You must invoke 'Ctrl Val.Set' node.

  • Open a Subvi and run automatically

    Hello everyone,

    I ve a structure of the event in which a Subvi is called by server of VI. I Don t want the main VI to freeze I turned forward until it is turned off.

    But the Subvi is called and in edit mode. How can I call the Subvi and run automatically?

    Kind regards

    Wilbur

    Hi Wilbur,

    Good afternoon and I hope that your well today.

    Thanks for the post.

    The VI property Exec.RunOnOpen is not necessary - if you are using Server VI, this property is ignored - and your using the method run a VI in any case.

    I think that your problem is with the configuration of your reference open VI. If you set the entry to zero (0) options it works? It does for me. And if I said that admission to 8, it load in edit mode.

    The problem that I believe is in the detail of the reference open Help content. When the reference is destroyed in the server called VI VI VI is shorter.

    For example, I have a small delay between my RunVI (wait that fact - false) and the reference close VI. After the period of my called VI stops.

    What results you want to achieve? You try to call a reentrant VI? If so, please take a look at the following example

    Load and call several Copies of a Subvi using VI Server

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/4192

    Please let me know how found you this information.

  • My Subvi is running independently but do not if you called by a relative of VI.

    Greetings,

    I have a Subvi, which is called by a parent of VI.  The Subvi is running very well independently, but when she is called its parent returns 0.00000.  I'd appreciate it if someone with a little more experience could take a look and tell me why I have questions.  I've included the 4 files:

    (1) DARwire - Targets.VI (this is the parent VI)

    (2) DARwire-range Target.VI (this Subvi who runs correctly when it is called)

    (3) DARwire you to dP.VI (this is the faulty Subvi).

    (4) range.dat (it is a text file which is read by DARwire-range Target.VI to calculate the velocity of a calibration targets).

    Some general remarks:

    1. you want to change the path string in DARwire-range Target.VI to match any directory you save these files in.

    2 typical entered for DARwire-targets are the following:

    Step #: 30-37 or 40-73 (at any stage # it should return all 0.)

    Min speed: 30 kts

    Max Velocity: 150 kts

    Yaw Velocity: 120 kts (this entry is not used at the moment).

    Pressure: 30 inHg

    ATM temp: 74 deg F

    Thanks in advance!

    -BrownBrown

    I didn't know that you could add new cases to a structure of the case, for some reason, I thought that it were only T/F.  It is useful and will definitely help me clean up my code but does not solve my problem.  Crossrulz even rewrite again returned 0 go to the you to RFP Subvi.

    Highlight enforcement helped me to deduce what was going on.  When I ran the code using this option I noticed that the values this is past the ATM press. and Temp ATM. controls in you to RFP were the two 0.  Apparently I had accidentally defined as text rings not of digital controls.  After doing switch things work as expected.

    Thanks to everyone who gave input.  Well done all around.

  • Passing parameters to a reentrant Subvi

    Hello! I called a reentrant Subvi, as explained in http://digital.ni.com/public.nsf/allkb/9CE784F50F816EA18625751900775EBB. It works (I can start several instances of the Subvi), but for the good use, I need to pass the parameters to this sub - VI.

    I tried:

    (1) to use the limit to a data Jack - as seen, controls on the front panel of the show clone for a very short time, they were connected to the Jack, but after they are inactive and empty

    (2) to set the parameter of the vocation of the Subvi using 'Control Value.Set (Variant)'. In this case, I see fileds correctly initialized control on the front panel of the Subvi, but are not used - other control fields, which must be initialized with these starting values are empty.

    Before I called this "typed stricktly" Subvi, settings were connected to the inputs of the VI and everything went OK, except that I couldn't call the Subvi reentrant type stricktly - only an instance was active, then was opened when the previous one has been closed.

    What is the problem?

    Thank you in advance for the answers

    You are spawning the screw as it seems.

    The node "Call by reference" no do not work as you expect the reason is simple: the call of reference node of will end only if the VI called ended.

    I do not recommend to use datasocket for data transfer. Above, is that you don't need. You can always do it, but you must write the data to update the values. Just link it is not enough.

    Pass values using the VI Server (you must pass every parameter to a node) or using other transfermechanisms:

    -FGV, also known as AE

    -Notifier/tail

    -TCP based protocols such as STM

    hope this helps,

    Norbert

  • Upgrade to esxi 6 - running in parallel 5.5 versions Enterprise

    Hello together,

    We want to improve our Enterprise 5.5 to 6.0 Enterprise environment more.

    Can we run in parallel business with Enterprise 6.0 5.5 more ESXi hosts.

    or

    We can add the license keys for the company more than 5.5 to existing hosts without any configuration problem, then

    upgrade the esxi hosts to 6.0?

    Thank you

    There is no problem, but I recommend to keep this scenario only during migration.

  • Can't run in parallel Invoke VMScript

    Hi all!

    I create script that convert model VM, and then run VMs converted, then Invoke VMScript. After that my script restart, stop this VMs and VMs convert to patterns.


    All operations of this I have run in parallel mode of powershell.


    But when my script tries to run Invoke-VMScript in parallel mode , my script freezes on this operation. I see only - 'Inline Script runniung'


    But if I open one of the virtual machines, I see my local script on the VM run command and it's done.

    In VM events, I see the same, command done VMScript Invoke.


    How to solve this problem? What I've done wrong?


    Thanks in advance!


    My script:


    function Load-PowerCLI

    {

    Add-PSSnapin VMware.VimAutomation.Core

    Add-PSSnapin VMware.VimAutomation.Vds

    }

    Load-PowerCLI

    # Connect to Vcenter

    $vcenter = "vcenter.domain.local"

    function Connect to Vcenter

    {

    SE connect-VIServer-Server $vcenter

    }

    SE connect Vcenter

    function Unload-PowerCLI

    {

    Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue

    Remove-PSSnapin VMware.VimAutomation.Vds - ErrorAction SilentlyContinue

    }

    # Download the list template

    Function Get-FolderFromPath

    {

    (param

    [String] $Path

    )

    $chunks = $Path.Split('\')

    $root = get-View - VIObject (Get-file-name $chunks [0])

    If (-$pas?) {return}

    $chunks [1.. $chunks. Count] | % {

    $chunk = $_

    $child = $root. ChildEntity |? {$_. Type - eq "File"} |? {(Get-Folder-id ("{0}-{1}»-f ($_.)"))} Type $_. (Value))). Name - eq $chunk}

    If ($child - eq $null) {throw "File '$chunk' not found"}

    $root = get-View - VIObject (Get-Folder-Id ("{0}-{1}" f ($child. ")) Type, $child. Value)))

    If (-$pas?) {return}

    }

    return (Get-Folder-Id ("{0}-{1}" f ($root. ")) MoRef.Type, $root. MoRef.Value)))

    }

    $Templateslist = (get-FolderFromPath-path 'DC\Templates\Windows' |) Get-model? ({$_.name - eq 'TEST'}). name

    $Templateslist

    # Convert templates of virtual machines

    workflow convert-models-to-vm {}

    (param

    [string []] models of $,.

    [string] $vcenter,

    [string] $session,

    [string] $user,.

    [string] $pass

    )

    for each-parallel ($template in $templates)

    {

    $run = {InlineScript

    Add-PSSnapin VMware.VimAutomation.Core

    SE connect-VIServer-Server $Using: vcenter-Session $Using: session

    Entire-Template - Template $Using: model ToVM.

    Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue

    }

    $run

    }

    }

    Convert-models-to-vm - $Templateslist - vcenter $vcenter models - session $global: DefaultVIServer.SessionSecret

    # PowerOn VMs

    workflow poweron-vms {}

    (param

    [string []] models of $,.

    [string] $vcenter,

    [string] $session,

    [string] $user,.

    [string] $pass

    )

    for each-parallel ($vm in $templates)

    {

    $run = {InlineScript

    Add-PSSnapin VMware.VimAutomation.Core

    SE connect-VIServer-Server $Using: vcenter-Session $Using: session

    Start-VM - VM $Using: vm | Waiting-Tools

    Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue

    }

    $run

    }

    }

    PowerOn-vms-models $Templateslist - vcenter $vcenter - session $global: DefaultVIServer.SessionSecret

    # Wait 1 minute

    sleep of the 1960s

    # Run the command update Script

    {of workflow run-update

    (param

    [string []] models of $,.

    [string] $vcenter,

    [string] $session,

    [string] $script,

    [string] $guestuser,

    [string] $guestpass

    )

    for each-parallel ($vm in $templates)

    {

    $run = {InlineScript

    Add-PSSnapin VMware.VimAutomation.Core

    SE connect-VIServer-Server $Using: vcenter-Session $Using: session

    Invoke VMScript - ScriptText ' $Using: script "-VM" $Using: vm "-Server" $Using: vcenter '-GuestUser ' $Using: guestuser '-GuestPassword ' $Using: guestpass»

    Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue

    }

    $run

    }

    }

    $script = "c:\update.ps1".

    $guestuser = "administrator."

    $guestpass = "myPASS".

    Run-update - $Templateslist - vcenter $vcenter models - session $global: DefaultVIServer.SessionSecret - $script - $guestuser guestuser - guestpass $guestpass script

    # Restart virtual machines

    workflow restart-vms {}

    (param

    [string []] models of $,.

    [string] $vcenter,

    [string] $session,

    [string] $user,.

    [string] $pass

    )

    for each-parallel ($vm in $templates)

    {

    $run = {InlineScript

    Add-PSSnapin VMware.VimAutomation.Core

    SE connect-VIServer-Server $Using: vcenter-Session $Using: session

    Restart-VMGuest - VM $Using: vm | Waiting-Tools

    Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue

    }

    $run

    }

    }

    restart vms models $Templateslist - vcenter $vcenter - session $global: DefaultVIServer.SessionSecret

    stop # VMs

    workflow stop-vms {}

    (param

    [string []] models of $,.

    [string] $vcenter,

    [string] $session,

    [string] $user,.

    [string] $pass

    )

    for each-parallel ($vm in $templates)

    {

    $run = {InlineScript

    Add-PSSnapin VMware.VimAutomation.Core

    SE connect-VIServer-Server $Using: vcenter-Session $Using: session

    Stop-VMGuest - VM "$Using: vm '-confirm: $false

    Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue

    }

    $run

    }

    }

    stop-vms-models $Templateslist - vcenter $vcenter - session $global: DefaultVIServer.SessionSecret

    sleep 120

    # Convert models of virtual machines

    {to convert vm-to-model of workflow

    (param

    [string []] models of $,.

    [string] $vcenter,

    [string] $session,

    [string] $user,.

    [string] $pass

    )

    for each-parallel ($template in $templates)

    {

    $run = {InlineScript

    Add-PSSnapin VMware.VimAutomation.Core

    SE connect-VIServer-Server $Using: vcenter-Session $Using: session

    Set-VM - VM "$Using: model"-ToTemplate-confirm: $false

    Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue

    }

    $run

    }

    }

    Convert-vm-to-models - models $Templateslist - vcenter $vcenter - session $global: DefaultVIServer.SessionSecret

    Unload PowerCLI

    The problem in this part:

    {of workflow run-update

    (param

    [string []] models of $,.

    [string] $vcenter,

    [string] $session,

    [string] $script,

    [string] $guestuser,

    [string] $guestpass

    )

    for each-parallel ($vm in $templates)

    {

    $run = {InlineScript

    Add-PSSnapin VMware.VimAutomation.Core

    SE connect-VIServer-Server $Using: vcenter-Session $Using: session

    Invoke VMScript - ScriptText ' $Using: script "-VM" $Using: vm "-Server" $Using: vcenter '-GuestUser ' $Using: guestuser '-GuestPassword ' $Using: guestpass»

    Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue

    }

    $run

    }

    }

    $script = "c:\update.ps1".

    $guestuser = "administrator."

    $guestpass = "myPASS".

    Run-update - $Templateslist - vcenter $vcenter models - session $global: DefaultVIServer.SessionSecret - $script - $guestuser guestuser - guestpass $guestpass script

    I found the solution!

    I just add this string - $WarningPreference = "SilentlyContinue" in an inline script

    Like this:

    {of workflow run-update

    (param

    [string []] models of $,.

    [string] $vcenter,

    [string] $session,

    [string] $script,

    [string] $guestuser,

    [string] $guestpass

    )

    for each-parallel ($vm in $templates)

    {

    $run = {InlineScript

    $WarningPreference = "SilentlyContinue".

    Add-PSSnapin VMware.VimAutomation.Core

    SE connect-VIServer-Server $Using: vcenter-Session $Using: session

    Invoke VMScript - ScriptText ' $Using: script "-VM" $Using: vm "-Server" $Using: vcenter '-GuestUser ' $Using: guestuser '-GuestPassword ' $Using: guestpass»

    Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue

    }

    $run

    }

    }

    $script = "c:\update.ps1".

    $guestuser = "administrator."

    $guestpass = "myPASS".

    Run-update - $Templateslist - vcenter $vcenter models - session $global: DefaultVIServer.SessionSecret - $script - $guestuser guestuser - guestpass $guestpass script

  • Concurrent program is not running in parallel

    Hello

    There is a simultaneous custom program that must be run in order, sometimes and sometimes it should be able to run in parallel. The program was defined initially to be incompatible with itself and it is used to run only in sequence, as planned, but when the incompatibility with the self has been deleted or disabled can still, he runs in the order but does not run in parallel. What could be the reason?

    As a temporary solution, I tried to remove the simultaneous program and recreate and defined without any inconsistency and it works in parallel. But it won't help the incompatibility could be switched on/off often enough and recreate the simultaneous program every time is not a good idea.

    Thanks in advance.

    Kind regards
    RAM

    There is a simultaneous custom program that must be run in order, sometimes and sometimes it should be able to run in parallel. The program was defined initially to be incompatible with itself and it is used to run only in sequence, as planned, but when the incompatibility with the self has been deleted or disabled can still, he runs in the order but does not run in parallel. What could be the reason?

    The CM has been revived after doing the above?

    As a temporary solution, I tried to remove the simultaneous program and recreate and defined without any inconsistency and it works in parallel. But it won't help the incompatibility could be switched on/off often enough and recreate the simultaneous program every time is not a good idea.

    Whenever you toggle incompatibilities, please make sure that you bounce the CM.

    Establish rules of incompatibility for Custom Reports [107224.1 ID]

    Thank you
    Hussein

  • List of jobs run in parallel

    Hello
    I use DBMS_FILE_TRANSFER. PUT_FILE as part of my portable from tablesspace shell script
    my intermediate dwh instance to my instance of dwh report.

    The problem is that I face the data files after one.
    There are about 20 files of data, and each of them is 10 gigabytes in size.
    I would like to copy the files in parallel and not after one.

    I thought to create dynamically 20 jobs/Scheduler (based on the number of data files) and all run togther.
    This way I could actually run in parallel.
    Bellows is part of my TTS shell script.
    The for loop generates the list of data files that I need to copy.
    the DBMS_FILE_TRANSFER. PUT_FILE copy one after one.

    Can you suggest how can I changed the plsql block below to create
    and present in parallel a job for each data file?

    Thank you.
    sqlplus -s "sys/${SourceSysPass}@${SOURCE_ORACLE_SID}  as sysdba" << EOF 
    whenever sqlerror exit 1
    declare
       v_link varchar2(30);
    begin
      select db_link
      into   v_link
      from   dba_db_links 
      where  db_link like '%TTS%';
    
      for x in (  select  fname, ltrim(rtrim(substr(fname,1,instr(fname,'.')-1)))||'_'||rownum nf_name
                  from   (select substr(file_name,instr(file_name,'/',-1)+1) fname 
                          from   dba_data_files
                          where  tablespace_name in ('${TableSpacesList}') 
                          order by file_id)
               ) 
      loop
           DBMS_FILE_TRANSFER.PUT_FILE('source_tts',
                                       x.fname,
                                       'target_tts',
                                       x.nf_name,
                                       v_link);
      end loop;
    
    
    exception
    when others then
        raise;
    end;
    /
    EOF

    Hello

    I'm happy that it worked. Don't worry, in this case, this setting is not necessary

    Kind regards
    Christian Balz

  • Running in parallel to the interfaces

    Hello. In the package of the ODI, I can locate my interfaces and join each two of them in two lines: 'ok' (successful) and "ko" (unsuccessful). So I get a sequential execution of these interfaces. How can I make ODI run in parallel?

    To do this, create a scenario for each of the interfaces (right button of the mouse on the interface, generate scenario) and drag the scenario on the package, and not the interface. This will give you a script to execute tool, which you set to execute asynchronously. run each of the interfaces and then use an OdiWaitForChildSession tool to wait for the complketion of the child sessions. If only some of the tasks that you run asynchronously are on the critical path, you can use tags when you start the executions and the tool of waiting. For those who are on the critical path, give a keyword CP. The tool to wait, wait with the key word CP.

  • How can I get IWorks or Pages and Numbers for my MACBOOK PRO running Mavricks?

    How can I get IWorks or Pages and Numbers for my MACBOOK PRO running Mavricks?

    They are available in the Mac App Store.

  • Firfox download for Win 7 - get "run" but not the start - cannot load Firefox

    My rd Hard Drive crashed... I installed Win 7 64 bit again. I can't get Firefox to install. It happens at installation and stops - it won't work.
    I had Firefox for years and have run it fine on the 64 bit of Windows 7 without problem...
    What can I do to get Firefox on my PC?

    Try the complete installation program.

  • Have Windows 7 running on Parallels Desktop with a Mac. Get "setup.exe is not a valid Win32 application" when trying to download a program with Windows Explorer. I can download from these sites with Vista and XP with other computers.

    Have Windows 7 running on Parallels Desktop with a Mac. Get "setup.exe is not a valid Win32 application" when trying to download a program with Windows Explorer. I can download from these sites with Vista and XP with other computers. Now, I can't download the programs that are supposed to solve the problem! including FoxFire

    Try to download from this site:

Maybe you are looking for