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
695 stars 460 forks source link

AeroDyn Driver runtime error #833

Closed rafmudaf closed 3 years ago

rafmudaf commented 3 years ago

Bug description Since merging #688, the AeroDyn driver fails to run when compiled in debug mode on macOS with GNU Fortran. The specific error is given below.

test 36
    Start 36: ad_timeseries_shutdown

36: Test command: /Users/rmudafor/miniconda3/bin/python3 "/Users/rmudafor/Desktop/of/reg_tests/executeAerodynRegressionCase.py" "ad_timeseries_shutdown" "/Users/rmudafor/Desktop/of/build/modules/aerodyn/aerodyn_driver" "/Users/rmudafor/Desktop/of/reg_tests/.." "/Users/rmudafor/Desktop/of/build/reg_tests/modules/aerodyn" "0.00001" "Darwin" "GNU"
36: Test timeout computed to be: 5400
36: At line 579 of file /Users/rmudafor/Desktop/of/modules/aerodyn/src/AeroDyn_Driver_Subs.f90
36: Fortran runtime error: Allocatable argument 'dvr' is not allocated
36: 

To Reproduce

Steps to reproduce the behavior: 1. Compile with GNU Fortran 11.2 on macOS 2. Run the following regression test case: ``` ctest -R ad_timeseries_shutdown -VV ``` 3. This should fail with the error above. **OpenFAST Version** The help-flag in AeroDyn Driver does run and provides this version output: ``` (base) >>mbp@~/Desktop/of/build (dev)$ ./modules/aerodyn/aerodyn_driver -h ************************************************************************************************** AeroDyn_driver Copyright (C) 2021 National Renewable Energy Laboratory Copyright (C) 2021 Envision Energy USA LTD This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY. See the "LICENSE" file distributed with this software for details. ************************************************************************************************** AeroDyn_driver-v3.0.0-207-gfef5b7ec Compile Info: - Compiler: GCC version 11.2.0 - Architecture: 64 bit - Precision: double - OpenMP: No - Date: Sep 17 2021 - Time: 16:38:18 Execution Info: - Date: 09/20/2021 - Time: 15:21:28-0500 Syntax is: AeroDyn_driver [-h] where: -h generates this help message. is the name of the required primary input file. Note: values enclosed in square brackets [] are optional. Do not enter the brackets. AeroDyn_driver terminated normally. ``` **System Information (please complete the following information):** - OS: macOS 10.15 - Compiler: GNU Fortran 11.2 - Compiler settings: Debug mode
rafmudaf commented 3 years ago

I've confirmed that this is not an issue in GNU Fortran 10. GitHub Actions uses GNU Fortran 10.3, so therefore this was not caught in the automated system.

ebranlard commented 3 years ago

I've submitted a fix above. I can make a pull request, can you maybe test my fix?

rafmudaf commented 3 years ago

Yes I'll test

rafmudaf commented 3 years ago

That works! A pull request would be great. I've also added a matrix to the regression-test-debug job in GH Actions so that we include GCC 11 (via the macOS-11 runner) as well as GCC 10. It's currently running at https://github.com/rafmudaf/openfast/actions/runs/1255145445.

ebranlard commented 3 years ago

Thanks for testing! Compiling on MacOS is a good idea!