OpenFAST / openfast

Main repository for the NREL-supported OpenFAST whole-turbine and FAST.Farm wind farm simulation codes.
http://openfast.readthedocs.io
Apache License 2.0
680 stars 456 forks source link

Bug report - Error when the "TMax" of ".fst" file is relatively large #1765

Closed ZL6462 closed 1 year ago

ZL6462 commented 1 year ago

Dear all,

I met a bug when using the OpenFAST 3.5.0 & rc-3.5.1. The simulation object is the monopile IEA-15MW wind turbine downloaded from "https://github.com/IEAWindTask37/IEA-15-240-RWT/tree/master/OpenFAST". The error informantion is "forrtl: severe (157): Program Exception - access violation8:30:36." image

MOST IMPORTANT: The error occur when generating the checkpoint file. That is to say if I don't generate the the checkpoint file, there is no such error.

These are some trying and statements:

  1. I only conduct the aerodynamic simulation of the wind turbine, namely the hydro, servo is turn off, besides, the deflection of the blades and tower are also NOT considered, and the aero model is OLAF or BEMT.
  2. When the "TMax" of ".fst" file is set to 300s, there is no such error. While when the "TMax" is set to 3000s the error occur.
  3. When I clear all the output variables in the "AeroDyn15.dat", there is no such error.
  4. When we use a relatively large DT, there is no such error.
  5. Related input files are attached: IEA-15-240-RWT.txt IEA-15-240-RWT_AeroDyn15.txt IEA-15-240-RWT-Monopile_ElastoDyn.txt

So I guess the error occur due to a certain variable of the program is too large when generating the checkpoint file, because I output almost all the variables of Aerodyn.

Some Information of the executable program is given as follows:

OpenFAST version 3.5.0 or the latest rc-3.5.1. Complied with "Intel(R) Fortran Compiler 1800" with OpenMP on.

Maybe this issue is related to the issue we discussed last week "https://github.com/OpenFAST/openfast/issues/1746".

Thank you for your attention.

deslaughter commented 1 year ago

Is the output stored in a binary or text file? If binary, please try writing to a text file.

ZL6462 commented 1 year ago

Dear @deslaughter

Follow your advice, this problem is solved.

Thank for your attention

deslaughter commented 1 year ago

For anyone else who arrives at this issue, the problem is caused by OpenFAST trying to allocate enough memory to store all output data for the entire simulation when OutFileFmt is 2 or 3 (binary output) in the main .fst file. Simulations with lots of output variables or small time steps or both can cause OpenFAST to request more memory than the system has available. The easiest solution is to use text based output files by setting OutFileFmt to 1.

bjonkman commented 1 year ago

@deslaughter , FYI, in pull request https://github.com/OpenFAST/openfast/pull/1733 to the dev branch, I moved where the binary file is written so it is AFTER some variables are deallocated (see https://github.com/OpenFAST/openfast/pull/1733/commits/005b8e56055e9f773b54f7eb073651aac9a0e84b). This allows larger binary files to be written. Depending on how large the output file is, though, it still may not solve the issue.