FAST.Farm


Thank you very much for your reply,I’m trying to solve the problem of violating the boundary of wind array.

Best regards,

Hi Binbin,

Regarding your error: Did you place a turbine (or any output probe) at Y = 1098.7 ? That would be outside your domain in Y direction because your domain seems like between Y = [-500, 500].

As a side note: I can see in your screenshot “OpenMP: No”
When I run FAST.Farm, I get there: OpenMP: Yes.

It looks like when you compiled the code, you did not use the OpenMP flag, meaning that your code cannot run in parallel. Maybe you can compile again with OpenMP, if you want to use multiple turbines, so you can run with multiple CPU’s.

Best regards,

1 Like

Hello,

I downloaded the OpenFAST v3.2.1 from github and compiled in Visual Studio 2017 (using release x64) and it works perfectly for my simulations.

Now, I want to utilize different cores of my PC by running the simulations in parallel using OpenMP. The steps I am following is as below:

First compile the openfast code using release_OMP, x64 in Visual Studio 2017. I have Intel oneAPI Base toolkit, HPC toolkit, DPC++/C++ compiler, Intel Fortran compiler runtime, Microsoft Visual C++ 2015-2022 redistributable (x64). I got the FAST.Farm_x64_OMP.exe in my bin folder. Then I try to use the same input file(.fstf) as I was using without the OMP and I could not get it running. I also tried running through Intel oneAPI command prompt. The program gets called but it doesn’t start the simulation.

I am not sure what is missing but I am not successful yet in making it work. Would greatly appreciate if any suggestions.

Thank you!

Regards,
Devesh

Davesh,

It does actually start with the OMP version you are showing: I see that it started two instances of turbines, but then it looks like it just ends. Typically this indicates some sort of memory access issue.

Have you tried using the pre-compiled OMP executable from the OpenFAST release: Release OpenFAST v3.2.1 · OpenFAST/openfast · GitHub?

If that doesn’t work, you could try building with static libraries. There may be some issue with the libraries in the version of the compiler you are running (or it could be something else, too).

Dear Bonnie,

Thank you for your reply. Yes, I started with the two turbines only for testing. I tried running with the precompiled OMP executable file from GitHub. This time I am getting below errors. I will try checking other things. In the meantime, please let me know if something else comes in your mind.

Thank you for your time.

Regards,
Devesh

image
image

Dear @Devesh.Kumar,

To run the precompiled FAST.Farm binary with OpenMP provided by NREL (FAST.Farm_x64_OMP.exe), you will need the redistributable libraries documented here: Releases · OpenFAST/openfast · GitHub.

Best regards,

Thank you for the reply Dr. Jonkman!

I understand I don’t have the version of compilers mentioned in the link to run the precompiled FAST.Farm binary.

But, when I try to build the FAST.Farm (OpenMP) in my PC, that also is not working. I do have those packages (with Visual Studio 2017) as below:


I am not sure what else is required.

Thanks and Regards,
Devesh

Dear @Devesh.Kumar,

My guess is that when you try to execute the OMP version of FAST.Farm that it cannot find the required Intel libraries, which are needed to run the OMP version and are not compiled into the executable statically. My guess is the proper environment paths are not set properly, e.g., you are not executing FAST.Farm from an Intel command prompt.

Best regards,

Dear Dr. Jonkman,

I am executing from the Intel oneAPI command prompt as mentioned in FAST.Farm - #386 by Devesh.Kumar.

Thank you!

Regards,
Devesh

Hi Devesh,

I took a look at the executable for Windows OMP and encountered the same issue. After some debugging, I traced it back to the way the OMP code handled some arrays. I don’t think that code was “wrong” per se (it does work fine on linux systems), but when I wrote it a little differently, it seemed to fix the issue on Windows+Intel.

The executable I built is here: https://github.com/bjonkman/openfast/releases/download/v3.2.1/FAST.Farm_x64_OMP_v2.exe. It uses the same version of the Intel redistributable as the the other binary assets on that release.

The code that I changed is on this branch: GitHub - bjonkman/openfast at test/OMP_FF, if you want to build it yourself.

2 Likes

Dear Bonnie,

Thank you so much for taking time out and looking into it.

I downloaded and compiled the code you gave. I am getting below error now. Do you have any suggestions related to this? Looks like may be some access error on my PC? I checked that location and didn’t find the fort.13 file. Is it related to some installation?

Regards,
Devesh

Dear @Devesh.Kumar,

Can you compile in debug mode, which should hopefully provide more clarity on what the actual issue is?

Best regards,

Davesh,

Do you get this same error every time you run the simulation?

When you open a file for reading or writing in Fortran, you have to provide a unit number. Typically that number is associated with a file name, but if it isn’t, Fortran assumes the file is called “fort.#” where # is the unit number.

I would guess that the OMP version is having some issues with file I/O and not actually supposed to be looking for fort.13. You could try to run the code again and see if this error persists, also try to change what kind of output file(s) you are writing and/or the frequency that it writes the files.

You could also add some print *, "text" statements at various parts of the code where it opens files so that you can pinpoint which files are causing the issue.

Dear Dr. Jonkman,

Thank you for your suggestion. I tried running in the debug mode. The simulation starts and runs as usual (taking more time as expected).

Regards,
Devesh

Dear Bonnie,

Yes, I am getting the same error every time.

Thank you so much for your attention. I will try doing as suggested and will let you know.

Regards,
Devesh

One other thing that may help you is to add debugging information to the Release OMP version you are running. I added it to the Release_OMP | x64 configuration of the FAST.Farm Visual Studio solution file on my test/OMP_FF branch of my OpenFAST fork. It may give you the name of the routine where it is getting the access error when it runs, and that may help figure out what file is causing the problem.

1 Like

Hi,

It is giving errors while creating vtp files. I turned the visualization off but it always creates a vtk folder at the location of fast farm input file (.fstf) and stores these vtp files. Getting error in different files now.

The OMP version ran correctly if I turned OFF the write VTK in the OpenFAST input files (.fst). So, it is working if I don’t save the animation.

Thank you so much for the help, this seems 4-5x faster.

Regards,
Devesh



Dear @Devesh.Kumar,

It looks like it is a known issue that enabling visualization of the wind turbines in OpenFAST can result in an error when OpenFAST is called within FAST.Farm. See: Bug report (FAST.Farm): Fortran runtime error: Cannot write to file opened for READ · Issue #822 · OpenFAST/openfast · GitHub. Hopefully we can get this fixed soon.

Best regards,

Thank you for the reply Dr. Jonkman!

Regards,
Devesh