openfast icon indicating copy to clipboard operation
openfast copied to clipboard

Errors in compilling OpenFAST/FAST.FARM on Ubuntu 20.04.5 LTS

Open venturi123 opened this issue 2 years ago • 1 comments

Bug description There were some errors when I compiled the OpenFAST package from the source on Ubuntu 20.04.

To Reproduce

git clone --recursive https://github.com/OpenFAST/OpenFAST.git 
cd OpenFAST
mkdir build
cd build/
cmake ..
ccmake ..  # See the figure below for the details of the configuration.
cmake ..
make -j32

Expected behavior Compiling successfully without error.

Screenshots, if applicable image Figure 1

OpenFAST Version <Please provide as much detail as possible including git commit. The best information is a screenshot of the OpenFAST system description that prints when running OpenFAST:>

**************************************************************************************************
 OpenFAST

 Copyright (C)  National Renewable Energy Laboratory
 Copyright (C)  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.
 **************************************************************************************************

 OpenFAST-v2.0.0
 Compile Info:
  - Architecture: 64 bit
  - Precision: double
  - Date: Nov 27 2018
  - Time: 17:19:38
 Execution Info:
  - Date: 11/29/2018
  - Time: 10:52:28-0700

System Information (please complete the following information):

  • OS: Ubuntu 20.04.5 LTS x86_64
  • Compiler: GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
  • Compiler settings: See Figure 1

Additional context None

venturi123 avatar Sep 16 '22 10:09 venturi123

The errors are shown as follows

...

[ 98%] Building CXX object glue-codes/openfast/CMakeFiles/openfast_cpp.dir/src/FAST_Prog.cpp.o
[ 98%] Building CXX object glue-codes/openfast/CMakeFiles/openfast_cpp.dir/src/FastLibAPI.cpp.o
[ 98%] Linking CXX executable openfast_cpp
/bin/ld: ../../modules/aerodyn/libaerodynlib.a(AeroDyn.f90.o): in function `__aerodyn_MOD_twrinflarray._omp_fn.0':
AeroDyn.f90:(.text+0x308b): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: AeroDyn.f90:(.text+0x34a4): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: AeroDyn.f90:(.text+0x34b1): undefined reference to `GOMP_loop_end'
/bin/ld: ../../modules/aerodyn/libaerodynlib.a(AeroDyn.f90.o): in function `__aerodyn_MOD_twrinflarray.constprop.0':
AeroDyn.f90:(.text+0x567c): undefined reference to `GOMP_parallel'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW.f90.o): in function `__fvw_MOD_fvw_init._omp_fn.0':
FVW.f90:(.text+0x12ef): undefined reference to `omp_get_thread_num_'
/bin/ld: FVW.f90:(.text+0x1311): undefined reference to `omp_get_num_threads_'
/bin/ld: FVW.f90:(.text+0x13d4): undefined reference to `omp_get_max_threads_'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW.f90.o): in function `__fvw_MOD_fvw_init':
FVW.f90:(.text+0x1b917): undefined reference to `GOMP_parallel'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_VortexTools.f90.o): in function `__fvw_vortextools_MOD_ui_tree_segment._omp_fn.0':
FVW_VortexTools.f90:(.text+0xf11): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_VortexTools.f90:(.text+0x10a1): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: FVW_VortexTools.f90:(.text+0x10ae): undefined reference to `GOMP_loop_end'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_VortexTools.f90.o): in function `__fvw_vortextools_MOD_ui_tree._omp_fn.0':
FVW_VortexTools.f90:(.text+0x1eb1): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_VortexTools.f90:(.text+0x2041): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: FVW_VortexTools.f90:(.text+0x204e): undefined reference to `GOMP_loop_end'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_VortexTools.f90.o): in function `__fvw_vortextools_MOD_ui_tree_segment':
FVW_VortexTools.f90:(.text+0x55aa): undefined reference to `GOMP_parallel'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_VortexTools.f90.o): in function `__fvw_vortextools_MOD_ui_tree':
FVW_VortexTools.f90:(.text+0x58cf): undefined reference to `GOMP_parallel'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_VortexTools.f90.o): in function `__fvw_vortextools_MOD_cut_tree_segment_parallel':
FVW_VortexTools.f90:(.text+0x5e80): undefined reference to `GOMP_parallel'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_VortexTools.f90.o): in function `__fvw_vortextools_MOD_cut_tree_parallel':
FVW_VortexTools.f90:(.text+0x6031): undefined reference to `GOMP_parallel'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_VortexTools.f90.o): in function `__fvw_vortextools_MOD_cut_tree_segment_parallel._omp_fn.0':
FVW_VortexTools.f90:(.text+0x6229): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_VortexTools.f90:(.text+0x6236): undefined reference to `GOMP_loop_end'
/bin/ld: FVW_VortexTools.f90:(.text+0x6245): undefined reference to `GOMP_barrier'
/bin/ld: FVW_VortexTools.f90:(.text+0x6268): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_VortexTools.f90:(.text+0x6342): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: FVW_VortexTools.f90:(.text+0x634f): undefined reference to `GOMP_loop_end_nowait'
/bin/ld: FVW_VortexTools.f90:(.text+0x636f): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_VortexTools.f90.o): in function `__fvw_vortextools_MOD_cut_tree_parallel._omp_fn.0':
FVW_VortexTools.f90:(.text+0x6409): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_VortexTools.f90:(.text+0x6416): undefined reference to `GOMP_loop_end'
/bin/ld: FVW_VortexTools.f90:(.text+0x6425): undefined reference to `GOMP_barrier'
/bin/ld: FVW_VortexTools.f90:(.text+0x6448): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_VortexTools.f90:(.text+0x6522): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: FVW_VortexTools.f90:(.text+0x652f): undefined reference to `GOMP_loop_end_nowait'
/bin/ld: FVW_VortexTools.f90:(.text+0x654f): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_VortexTools.f90.o): in function `__fvw_vortextools_MOD_grow_tree_segment_parallel':
FVW_VortexTools.f90:(.text+0x9f90): undefined reference to `GOMP_parallel'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_VortexTools.f90.o): in function `__fvw_vortextools_MOD_grow_tree_segment_parallel._omp_fn.0':
FVW_VortexTools.f90:(.text+0xa089): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_VortexTools.f90:(.text+0xa096): undefined reference to `GOMP_loop_end'
/bin/ld: FVW_VortexTools.f90:(.text+0xa0a5): undefined reference to `GOMP_barrier'
/bin/ld: FVW_VortexTools.f90:(.text+0xa0c8): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_VortexTools.f90:(.text+0xa1a6): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: FVW_VortexTools.f90:(.text+0xa1b3): undefined reference to `GOMP_loop_end_nowait'
/bin/ld: FVW_VortexTools.f90:(.text+0xa1d7): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_VortexTools.f90.o): in function `__fvw_vortextools_MOD_grow_tree_parallel':
FVW_VortexTools.f90:(.text+0xe0f0): undefined reference to `GOMP_parallel'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_VortexTools.f90.o): in function `__fvw_vortextools_MOD_grow_tree_parallel._omp_fn.0':
FVW_VortexTools.f90:(.text+0xe1e9): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_VortexTools.f90:(.text+0xe1f6): undefined reference to `GOMP_loop_end'
/bin/ld: FVW_VortexTools.f90:(.text+0xe205): undefined reference to `GOMP_barrier'
/bin/ld: FVW_VortexTools.f90:(.text+0xe228): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_VortexTools.f90:(.text+0xe306): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: FVW_VortexTools.f90:(.text+0xe313): undefined reference to `GOMP_loop_end_nowait'
/bin/ld: FVW_VortexTools.f90:(.text+0xe337): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_BiotSavart.f90.o): in function `__fvw_biotsavart_MOD_ui_seg._omp_fn.0':
FVW_BiotSavart.f90:(.text+0xf7): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_BiotSavart.f90:(.text+0x4f1): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: FVW_BiotSavart.f90:(.text+0x503): undefined reference to `GOMP_loop_end'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_BiotSavart.f90.o): in function `__fvw_biotsavart_MOD_ui_seg._omp_fn.1':
FVW_BiotSavart.f90:(.text+0x66b): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_BiotSavart.f90:(.text+0xac3): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: FVW_BiotSavart.f90:(.text+0xad5): undefined reference to `GOMP_loop_end'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_BiotSavart.f90.o): in function `__fvw_biotsavart_MOD_ui_seg._omp_fn.2':
FVW_BiotSavart.f90:(.text+0xc6f): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_BiotSavart.f90:(.text+0x10c0): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: FVW_BiotSavart.f90:(.text+0x10de): undefined reference to `GOMP_loop_end'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_BiotSavart.f90.o): in function `__fvw_biotsavart_MOD_ui_seg._omp_fn.3':
FVW_BiotSavart.f90:(.text+0x138d): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_BiotSavart.f90:(.text+0x17eb): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: FVW_BiotSavart.f90:(.text+0x17fd): undefined reference to `GOMP_loop_end'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_BiotSavart.f90.o): in function `__fvw_biotsavart_MOD_ui_seg._omp_fn.4':
FVW_BiotSavart.f90:(.text+0x199d): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_BiotSavart.f90:(.text+0x1dfb): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: FVW_BiotSavart.f90:(.text+0x1e0d): undefined reference to `GOMP_loop_end'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_BiotSavart.f90.o): in function `__fvw_biotsavart_MOD_ui_part_nograd._omp_fn.0':
FVW_BiotSavart.f90:(.text+0x21a9): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: FVW_BiotSavart.f90:(.text+0x251b): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: FVW_BiotSavart.f90:(.text+0x2528): undefined reference to `GOMP_loop_end'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_BiotSavart.f90.o): in function `__fvw_biotsavart_MOD_ui_part_nograd':
FVW_BiotSavart.f90:(.text+0x26ad): undefined reference to `GOMP_parallel'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_BiotSavart.f90.o): in function `__fvw_biotsavart_MOD_ui_seg':
FVW_BiotSavart.f90:(.text+0x2a0f): undefined reference to `GOMP_parallel'
/bin/ld: FVW_BiotSavart.f90:(.text+0x2b17): undefined reference to `GOMP_parallel'
/bin/ld: FVW_BiotSavart.f90:(.text+0x2bf5): undefined reference to `GOMP_parallel'
/bin/ld: FVW_BiotSavart.f90:(.text+0x2cef): undefined reference to `GOMP_parallel'
/bin/ld: ../../modules/aerodyn/libfvwlib.a(FVW_BiotSavart.f90.o):FVW_BiotSavart.f90:(.text+0x2def): more undefined references to `GOMP_parallel' follow
/bin/ld: ../../modules/inflowwind/libifwlib.a(IfW_FFWind_Base.f90.o): in function `__ifw_ffwind_base_MOD_ifw_ffwind_calcoutput._omp_fn.0':
IfW_FFWind_Base.f90:(.text+0x8bc6): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: IfW_FFWind_Base.f90:(.text+0x8e7e): undefined reference to `GOMP_critical_start'
/bin/ld: IfW_FFWind_Base.f90:(.text+0x9279): undefined reference to `GOMP_critical_end'
/bin/ld: IfW_FFWind_Base.f90:(.text+0x9299): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: IfW_FFWind_Base.f90:(.text+0x92a6): undefined reference to `GOMP_loop_end'
/bin/ld: ../../modules/inflowwind/libifwlib.a(IfW_FFWind_Base.f90.o): in function `__ifw_ffwind_base_MOD_ifw_ffwind_calcoutput':
IfW_FFWind_Base.f90:(.text+0x9465): undefined reference to `GOMP_parallel'
/bin/ld: ../../modules/inflowwind/libifwlib.a(IfW_UniformWind.f90.o): in function `__ifw_uniformwind_MOD_ifw_uniformwind_calcoutput._omp_fn.0':
IfW_UniformWind.f90:(.text+0x8b5): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_start'
/bin/ld: IfW_UniformWind.f90:(.text+0x1110): undefined reference to `GOMP_critical_start'
/bin/ld: IfW_UniformWind.f90:(.text+0x1170): undefined reference to `GOMP_critical_end'
/bin/ld: IfW_UniformWind.f90:(.text+0x11c1): undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next'
/bin/ld: IfW_UniformWind.f90:(.text+0x11ce): undefined reference to `GOMP_loop_end'
/bin/ld: ../../modules/inflowwind/libifwlib.a(IfW_UniformWind.f90.o): in function `__ifw_uniformwind_MOD_ifw_uniformwind_calcoutput':
IfW_UniformWind.f90:(.text+0x1faf): undefined reference to `GOMP_parallel'
/bin/ld: ../../modules/version/libversioninfolib.a(VersionInfo.f90.o): in function `__versioninfo_MOD_dispcompileruntimeinfo._omp_fn.0':
VersionInfo.f90:(.text+0xf): undefined reference to `omp_get_thread_num_'
/bin/ld: VersionInfo.f90:(.text+0x31): undefined reference to `omp_get_num_threads_'
/bin/ld: VersionInfo.f90:(.text+0xf4): undefined reference to `omp_get_max_threads_'
/bin/ld: ../../modules/version/libversioninfolib.a(VersionInfo.f90.o): in function `__versioninfo_MOD_dispcompileruntimeinfo':
VersionInfo.f90:(.text+0x847): undefined reference to `GOMP_parallel'
collect2: error: ld returned 1 exit status
make[2]: *** [glue-codes/openfast/CMakeFiles/openfast_cpp.dir/build.make:130: glue-codes/openfast/openfast_cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:2161: glue-codes/openfast/CMakeFiles/openfast_cpp.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 98%] Building Fortran object glue-codes/fast-farm/CMakeFiles/FAST.Farm.dir/src/FAST_Farm_IO.f90.o
[ 98%] Building Fortran object glue-codes/fast-farm/CMakeFiles/FAST.Farm.dir/src/FAST_Farm_Subs.f90.o
[ 99%] Building Fortran object glue-codes/fast-farm/CMakeFiles/FAST.Farm.dir/src/FAST_Farm.f90.o
[100%] Linking Fortran executable FAST.Farm
[100%] Built target FAST.Farm
make: *** [Makefile:130: all] Error 2

venturi123 avatar Sep 16 '22 10:09 venturi123

I was able to reproduce this issue on Ubuntu 22.04 using GNU Fortran (Ubuntu 11.2.0-19ubuntu1) 11.2.0 when building all targets with OpenMP enabled on the main branch. However, the compilation failure seems to be isolated to building openfast_cpp. The problem doesn't occur on when building all targets on the dev branch. I was not able to quickly find the commit which resolved the issue in dev.

I recommend either building openfast and FAST.farm targets specifically from the main branch; or switching to the dev branch.

deslaughter avatar Oct 20 '22 16:10 deslaughter

Closing due to lack of response. If the issue was not resolved, feel free to reopen.

deslaughter avatar Jan 09 '23 22:01 deslaughter