Continuous Integration

cancel
Showing results for 
Search instead for 
Did you mean: 

Run multiple LabVIEW CLI command in the same time

Hi there,

 

When I try to run 2 commands in 2 separate PowerShell windows I get the following error:

 

Error code : -350052
Error message : LabVIEW CLI: (Hex 0xFFFAA89C) You cannot initialize the logger multiple times.

 

I tried to set -LogToConsole flag to FALSE, but it didn't work.

 

As far as "RunOperation" vis are set to reentrant execution I was pretty sure I could do that.

Any idea on what's going wrong here ?

 

(Note: I'm LV2019 64-bit)

 

 

Thanks in advance for your help.


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 1 of 14
(5,598 Views)

By default, the LabVIEW application itself cannot be opened multiple times, so it seems reasonable that you shouldn't be able to do two CLI Operations simultaneously as well. 

 

What are you trying to accomplish, maybe you can write a custom operation that does multiple things.

 


Edited to add the "By Default" disclaimer after being corrected. 😉

Nathan Murphy
0 Kudos
Message 2 of 14
(5,554 Views)

It is possible to open multiple application instances simultaneously:

https://labviewwiki.org/wiki/Multiple_Instances_of_LabVIEW

Message 3 of 14
(5,549 Views)

@RkTrey wrote:

It is possible to open multiple application instances simultaneously:

https://labviewwiki.org/wiki/Multiple_Instances_of_LabVIEW


Thanks for correcting me! Maybe this can solve OPs problem. 

Nathan Murphy
0 Kudos
Message 4 of 14
(5,545 Views)

Thanks for your inputs.

 

Just a bit of context. I've been setting up a CI configuration with Gitlab, where mutiple pipelines can be triggered in the same time. The problem here is that I need to be certain that a pipeline starts only if no others are running. This need to be done to prevent different pipelines (running on the same runner/build server) to override the context (in this case a specific vipc applyed during the first job of the pipeline) of the running pipeline.

 

My goal is to have a custom operation checking current pipelines status and waiting for no pipeline were running to start to let the it execute. The custom operation is working but I can't run it multiple time.

 

Activating AllowMultipleInstances key doesn't work.


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 5 of 14
(5,525 Views)

@Olivier-JOURDAN  a écrit :

Error code : -350052
Error message : LabVIEW CLI: (Hex 0xFFFAA89C) You cannot initialize the logger multiple times.

 


I'd really like to know what "logger" is referring to in this error message?


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 6 of 14
(5,524 Views)

Hi Olivier,

 

Could this be handled by the agent configuration instead? This article mentions the relevant settings: https://stackoverflow.com/questions/51828805/configure-runner-to-run-multiple-jobs-at-the-same-time

 

(This is what I do under Jenkins to avoid this issue)

 

Cheers,

James

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 7 of 14
(5,520 Views)

Hi James,

Actually, these settings only affect jobs execution not pipelines (pipelines can contain multiple jobs). As far as can read here --> https://gitlab.com/gitlab-org/gitlab-foss/-/issues/41560 there's no way, so far, to configure this kind of behavior.


My plan at this point isto try G-CLI to run concurrent "wait for no pipeline running" actions in order to wait the pipeline execution. If it doesn't work, I will have to do this in shell script 😞

 

I'll keep you post with the result of my tests as soon as possible!

 

Have a good day.


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 8 of 14
(5,503 Views)

State of the art:

 

G-CLI can run 2 (or more?) command in parallel 👍

G-CLI cannot run the same command in parallel. Not surprise cause James was quite sure of that.

 

So I have the solution to duplicate the vi and adapt the command each time I need to run it. Good. A better way to that would have been to be able to run a vit instead of a vi, but it's not supported by G-CLI.

 

Anyway, I'm going to be able to do what I want with G-CLI. Thank you for this tool James 🙂

 

James, I opened an issue for vit execution on the G-CLI project --> https://github.com/JamesMc86/G-CLI/issues/88

 

 

 


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 9 of 14
(5,475 Views)

Hi Olivier,

 

Thats a great idea for a workaround. I'll have to do some tests and see if there is an easy way to get LabVIEW to open as a new instance (or what it does in any case!)

 

Cheers,

James

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 10 of 14
(5,469 Views)