NREL / ROSCO

A Reference Open Source Controller for Wind Turbines
https://rosco.readthedocs.io/en/latest/
Apache License 2.0
116 stars 93 forks source link

Is ROSCO safe for multiprocessing? #344

Closed borjanavascues closed 6 months ago

borjanavascues commented 6 months ago

Good morning,

I'm currently using the ROSCO controller in OrcaFlex while running a big batch of simmulations using the multiprocessing python library. I just wanted to make sure that the ROSCO dynamic library is safe for parallel simulations running simultaneously using the same dll file.

Additionally, when running the simulations from the cmd (either in OrcaFlex or FAST) the controller prints some status messages on the command prompt; is there any way to deactivate this?

Thank you in advance!

dzalkind commented 6 months ago

Hi,

Yes, we run OpenFAST in parallel often using the same dynamic library.

There's currently no way to deactivate the ROSCO print statements at this time, but it's a reasonable request for a future feature.

In the meantime, the print statements can be commented out at the following locations

Alternatively, in python, when you execute OrcaFlex/OpenFAST, you can send the standard output to a file, like we do here: https://github.com/WISDEM/WEIS/blob/6a377837d7ba16150dd2b3f015b16c326a249df6/weis/aeroelasticse/FAST_wrapper.py#L47

I hope this helps. I'll leave this open for feedback on this features request.

Best, Dan

abhineet-gupta commented 6 months ago

Just to quickly add here for future discussions. If zeromq mode is enabled, then ROSCO might encounter some issues while running in parallel with the same DLL file.