Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenFAST with linux #401

Closed
caroledaniel opened this issue Feb 27, 2020 · 26 comments
Closed

OpenFAST with linux #401

caroledaniel opened this issue Feb 27, 2020 · 26 comments
Assignees

Comments

@caroledaniel
Copy link

Hello im very new to OpenFAST and linux, im using ubuntu 18, this is my graduation project so please help me. i need to run OpenFAST on the terminal then on simulink. i only installed OpenFAST. Otherwise there's nothing working. if someone could help me ,please do so

@caroledaniel
Copy link
Author

@NRELAdmin @rafmudaf

@jjonkman
Copy link
Collaborator

jjonkman commented Feb 27, 2020

I doubt I can help with problems on Linus / Ubuntu, but I would suggest to at least summarize what issue(s) you are running into. Saying "there's nothing working" doesn't provide many clues as to the problem(s).

@caroledaniel
Copy link
Author

Okay, so i installed OpenFast by cloning the link and i built all the files. coming to cloning the test files, in which directory should i clone them? in 'home' or in 'openfast'?

@caroledaniel
Copy link
Author

@bmazetto

@andrew-platt
Copy link
Collaborator

I'm guessing you have already looked at the documentation on https://openfast.readthedocs.io. If not, take a look at these directions:
https://openfast.readthedocs.io/en/dev/source/install/index.html#compile-from-source

Then to compile the tests:
https://openfast.readthedocs.io/en/dev/source/testing/index.html (note the tip here on cloning the test files)
https://openfast.readthedocs.io/en/dev/source/testing/regression_test.html#executing-with-ctest

Note that the above documentation contains information for multiple scenarios. So you will need to read it carefully to find what applies to your configuration.

The simulink build will be more complicated. There are a couple previous questions regarding how to build with simulink that you may find helpful:

@caroledaniel
Copy link
Author

~/OpenFAST/reg_tests/build$ make test
Running tests...
Test project /home/carole/OpenFAST/reg_tests/build
Start 1: AWT_YFix_WSt
1/36 Test #1: AWT_YFix_WSt .............................***Failed 0.95 sec
Start 2: AWT_WSt_StartUp_HighSpShutDown
2/36 Test #2: AWT_WSt_StartUp_HighSpShutDown ...........***Failed 0.20 sec
Start 3: AWT_YFree_WSt
3/36 Test #3: AWT_YFree_WSt ............................***Failed 0.20 sec
Start 4: AWT_YFree_WTurb
4/36 Test #4: AWT_YFree_WTurb ..........................***Failed 0.20 sec
Start 5: AWT_WSt_StartUpShutDown
5/36 Test #5: AWT_WSt_StartUpShutDown ..................***Failed 0.20 sec
Start 6: AOC_WSt
6/36 Test #6: AOC_WSt ..................................***Failed 0.19 sec
Start 7: AOC_YFree_WTurb
7/36 Test #7: AOC_YFree_WTurb ..........................***Failed 0.19 sec
Start 8: AOC_YFix_WSt
8/36 Test #8: AOC_YFix_WSt .............................***Failed 0.20 sec
Start 9: UAE_Dnwind_YRamp_WSt
9/36 Test #9: UAE_Dnwind_YRamp_WSt .....................***Failed 0.20 sec
Start 10: UAE_Upwind_Rigid_WRamp_PwrCurve
10/36 Test #10: UAE_Upwind_Rigid_WRamp_PwrCurve ..........***Failed 0.20 sec
Start 11: WP_VSP_WTurb_PitchFail
11/36 Test #11: WP_VSP_WTurb_PitchFail ...................***Failed 0.20 sec
Start 12: WP_VSP_ECD
12/36 Test #12: WP_VSP_ECD ...............................***Failed 0.20 sec
Start 13: WP_VSP_WTurb
13/36 Test #13: WP_VSP_WTurb .............................***Failed 0.20 sec
Start 14: SWRT_YFree_VS_EDG01
14/36 Test #14: SWRT_YFree_VS_EDG01 ......................***Failed 0.20 sec
Start 15: SWRT_YFree_VS_EDC01
15/36 Test #15: SWRT_YFree_VS_EDC01 ......................***Failed 0.20 sec
Start 16: SWRT_YFree_VS_WTurb
16/36 Test #16: SWRT_YFree_VS_WTurb ......................***Failed 0.20 sec
Start 17: 5MW_Land_DLL_WTurb
17/36 Test #17: 5MW_Land_DLL_WTurb .......................***Failed 0.20 sec
Start 18: 5MW_OC3Mnpl_DLL_WTurb_WavesIrr
18/36 Test #18: 5MW_OC3Mnpl_DLL_WTurb_WavesIrr ...........***Failed 0.20 sec
Start 19: 5MW_OC3Trpd_DLL_WSt_WavesReg
19/36 Test #19: 5MW_OC3Trpd_DLL_WSt_WavesReg .............***Failed 0.20 sec
Start 20: 5MW_OC4Jckt_DLL_WTurb_WavesIrr_MGrowth
20/36 Test #20: 5MW_OC4Jckt_DLL_WTurb_WavesIrr_MGrowth ...***Failed 0.20 sec
Start 21: 5MW_ITIBarge_DLL_WTurb_WavesIrr
21/36 Test #21: 5MW_ITIBarge_DLL_WTurb_WavesIrr ..........***Failed 0.20 sec
Start 22: 5MW_TLP_DLL_WTurb_WavesIrr_WavesMulti
22/36 Test #22: 5MW_TLP_DLL_WTurb_WavesIrr_WavesMulti ....***Failed 0.19 sec
Start 23: 5MW_OC3Spar_DLL_WTurb_WavesIrr
23/36 Test #23: 5MW_OC3Spar_DLL_WTurb_WavesIrr ...........***Failed 0.20 sec
Start 24: 5MW_OC4Semi_WSt_WavesWN
24/36 Test #24: 5MW_OC4Semi_WSt_WavesWN ..................***Failed 0.19 sec
Start 25: 5MW_Land_BD_DLL_WTurb
25/36 Test #25: 5MW_Land_BD_DLL_WTurb ....................***Failed 0.20 sec
Start 26: WP_Stationary_Linear
26/36 Test #26: WP_Stationary_Linear .....................***Failed 0.25 sec
Start 27: Ideal_Beam_Fixed_Free_Linear
27/36 Test #27: Ideal_Beam_Fixed_Free_Linear .............***Failed 0.20 sec
Start 28: Ideal_Beam_Free_Free_Linear
28/36 Test #28: Ideal_Beam_Free_Free_Linear ..............***Failed 0.20 sec
Start 29: 5MW_Land_BD_Linear
29/36 Test #29: 5MW_Land_BD_Linear .......................***Failed 0.20 sec
Start 30: bd_5MW_dynamic
30/36 Test #30: bd_5MW_dynamic ...........................***Failed 0.19 sec
Start 31: bd_5MW_dynamic_gravity_Az00
31/36 Test #31: bd_5MW_dynamic_gravity_Az00 ..............***Failed 0.19 sec
Start 32: bd_5MW_dynamic_gravity_Az90
32/36 Test #32: bd_5MW_dynamic_gravity_Az90 ..............***Failed 0.20 sec
Start 33: bd_curved_beam
33/36 Test #33: bd_curved_beam ...........................***Failed 0.20 sec
Start 34: bd_isotropic_rollup
34/36 Test #34: bd_isotropic_rollup ......................***Failed 0.20 sec
Start 35: bd_static_cantilever_beam
35/36 Test #35: bd_static_cantilever_beam ................***Failed 0.20 sec
Start 36: bd_static_twisted_with_k1
36/36 Test #36: bd_static_twisted_with_k1 ................***Failed 0.20 sec

0% tests passed, 36 tests failed out of 36

Label Time Summary:
aerodyn14 = 2.13 secproc (7 tests)
aerodyn15 = 3.80 sec
proc (19 tests)
beamdyn = 2.16 secproc (11 tests)
dynamic = 0.58 sec
proc (3 tests)
elastodyn = 5.73 secproc (25 tests)
hydrodyn = 1.37 sec
proc (7 tests)
linear = 0.84 secproc (4 tests)
map = 0.59 sec
proc (3 tests)
moordyn = 0.19 secproc (1 test)
openfast = 6.52 sec
proc (29 tests)
servodyn = 5.88 secproc (26 tests)
static = 0.79 sec
proc (4 tests)
subdyn = 0.59 sec*proc (3 tests)

Total Test time (real) = 7.95 sec

The following tests FAILED:
1 - AWT_YFix_WSt (Failed)
2 - AWT_WSt_StartUp_HighSpShutDown (Failed)
3 - AWT_YFree_WSt (Failed)
4 - AWT_YFree_WTurb (Failed)
5 - AWT_WSt_StartUpShutDown (Failed)
6 - AOC_WSt (Failed)
7 - AOC_YFree_WTurb (Failed)
8 - AOC_YFix_WSt (Failed)
9 - UAE_Dnwind_YRamp_WSt (Failed)
10 - UAE_Upwind_Rigid_WRamp_PwrCurve (Failed)
11 - WP_VSP_WTurb_PitchFail (Failed)
12 - WP_VSP_ECD (Failed)
13 - WP_VSP_WTurb (Failed)
14 - SWRT_YFree_VS_EDG01 (Failed)
15 - SWRT_YFree_VS_EDC01 (Failed)
16 - SWRT_YFree_VS_WTurb (Failed)
17 - 5MW_Land_DLL_WTurb (Failed)
18 - 5MW_OC3Mnpl_DLL_WTurb_WavesIrr (Failed)
19 - 5MW_OC3Trpd_DLL_WSt_WavesReg (Failed)
20 - 5MW_OC4Jckt_DLL_WTurb_WavesIrr_MGrowth (Failed)
21 - 5MW_ITIBarge_DLL_WTurb_WavesIrr (Failed)
22 - 5MW_TLP_DLL_WTurb_WavesIrr_WavesMulti (Failed)
23 - 5MW_OC3Spar_DLL_WTurb_WavesIrr (Failed)
24 - 5MW_OC4Semi_WSt_WavesWN (Failed)
25 - 5MW_Land_BD_DLL_WTurb (Failed)
26 - WP_Stationary_Linear (Failed)
27 - Ideal_Beam_Fixed_Free_Linear (Failed)
28 - Ideal_Beam_Free_Free_Linear (Failed)
29 - 5MW_Land_BD_Linear (Failed)
30 - bd_5MW_dynamic (Failed)
31 - bd_5MW_dynamic_gravity_Az00 (Failed)
32 - bd_5MW_dynamic_gravity_Az90 (Failed)
33 - bd_curved_beam (Failed)
34 - bd_isotropic_rollup (Failed)
35 - bd_static_cantilever_beam (Failed)
36 - bd_static_twisted_with_k1 (Failed)
Errors while running CTest
Makefile:72: recipe for target 'test' failed
make: *** [test] Error 8
can someone help me with this error?

@caroledaniel
Copy link
Author

@andrew-platt thank you. yes i've read them but im still a little confused with such error like the above one.

@andrew-platt
Copy link
Collaborator

Did you do make install before running ctest?

@rafmudaf
Copy link
Collaborator

Also, just run a single test with verbose output

ctest -V -R AWT_YFix_WSt

My bet is you don't have numpy installed...

@caroledaniel
Copy link
Author

@andrew-platt yes i executed this step, and yes @rafmudaf , i guess the problem is numpy is uninstalled according to this:
1: Test command: /usr/bin/python3 "/home/carole/OpenFAST/reg_tests/executeOpenfastRegressionCase.py" "AWT_YFix_WSt" "/home/carole/OpenFAST/build/glue-codes/openfast/openfast" "/home/carole/OpenFAST/reg_tests/.." "/home/carole/OpenFAST/build/reg_tests/glue-codes/openfast" "0.00001" "Linux" "GNU"
1: Test timeout computed to be: 5400
1: Traceback (most recent call last):
1: File "/home/carole/OpenFAST/reg_tests/executeOpenfastRegressionCase.py", line 34, in
1: import pass_fail
1: File "/home/carole/OpenFAST/reg_tests/lib/pass_fail.py", line 22, in
1: import numpy as np
1: ModuleNotFoundError: No module named 'numpy'
1/1 Test #1: AWT_YFix_WSt .....................***Failed 0.20 sec

so how do i install numpy?

@caroledaniel
Copy link
Author

also i have this error while executing beamdyn_utest :
OpenFAST/build/unit_tests$ make beamdyn_utest
[ 10%] Built target pfunit
make[3]: *** No rule to make target '/path/to/lapack', needed by 'modules/nwtc-library/libnwtclibs.so'. Stop.
CMakeFiles/Makefile2:1531: recipe for target 'modules/nwtc-library/CMakeFiles/nwtclibs.dir/all' failed
make[2]: *** [modules/nwtc-library/CMakeFiles/nwtclibs.dir/all] Error 2
CMakeFiles/Makefile2:2977: recipe for target 'unit_tests/CMakeFiles/beamdyn_utest.dir/rule' failed
make[1]: *** [unit_tests/CMakeFiles/beamdyn_utest.dir/rule] Error 2
Makefile:172: recipe for target 'unit_tests/CMakeFiles/beamdyn_utest.dir/rule' failed
make: *** [unit_tests/CMakeFiles/beamdyn_utest.dir/rule] Error 2

@andrew-platt
Copy link
Collaborator

That's odd. Does make openfast complete properly?

@caroledaniel
Copy link
Author

@andrew-platt when i make openfast , it gives me the same error as beamdyn_utest:
make[2]: *** No rule to make target '/path/to/lapack', needed by 'modules/nwtc-library/libnwtclibs.so'. Stop.
CMakeFiles/Makefile2:1531: recipe for target 'modules/nwtc-library/CMakeFiles/nwtclibs.dir/all' failed
make[1]: *** [modules/nwtc-library/CMakeFiles/nwtclibs.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

@rafmudaf
Copy link
Collaborator

@caroledaniel It looks like you simply copied the command in this section of the documentation. However, be sure to follow the instruction after that command...

The paths given should be to the directory which contains the libraries, not to the libraries themselves.

In this case, path/to/lapack is a placeholder that you need to configure yourself for the correct path on your system. Did you install lapack and blas? If so, how did you do so? If you used apt, you could Google for the default install location of packages using that package manager.

@caroledaniel
Copy link
Author

@rafmudaf i copied that line 'cmake .. -DBLAS_LIBRARIES="/path/to/blas" -DLAPACK_LIBRARIES="/path/to/lapack"' in openfast/build and it built, what's the next step to be done?
and also can you tell me how to fix this #401 (comment) , thank you

@rafmudaf
Copy link
Collaborator

and it built

Prove it. Copy the output from running the compiled executable at /home/carole/OpenFAST/build/glue-codes/openfast/openfast.

If there is no executable there, then it did not build. In that case, I suggest reading through the installation instructions carefully as it seems like you've skipped some steps. Specifically, the dependencies section will help with your LAPACK/BLAS error. Then, since you've already downloaded the code, you could move to CMake for Linux.

On installing Python packages, there are a few ways to do as it's dependent on your system's setup and environment. Being that this is a general Linux usage question and outside the scope of support for OpenFAST, you should do some searching on the internet for configuring your Python environment. Here's a good start.

@caroledaniel
Copy link
Author

is there a directory in openfast another one called openfast? because if so, then i dont have it

@andrew-platt
Copy link
Collaborator

The executable would be openfast inside the build/glue-codes/openfast/ directory.

From what I can tell in this discussion, you are missing some prerequisites needed to compile and run OpenFAST. Exactly which prerequisites is very difficult for us to know from a distance like this. Is there someone else where you are that is familiar with installing and compiling software on linux that might be able to help (perhaps your professor or another student)? I suspect you will be able to get further with someone helping in person there rather than through this issue page.

@caroledaniel
Copy link
Author

do i need to have a bin directory in my OpenFAST directory?

@caroledaniel
Copy link
Author

@andrew-platt unfortunately no. im working alone

@caroledaniel
Copy link
Author

Hello all , i have this error now with compiling fast v8 on ubuntu 18
../bin/libmap-1.20.10.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
makefile:739: recipe for target '../bin/FAST_glin32' failed
make: *** [../bin/FAST_glin32] Error 1

@caroledaniel
Copy link
Author

I also have this problem once i compiled matlab to create the S function:
Error using mex
/home/carole/OpenFAST/glue-codes/simulink/src/FAST_SFunc.c:32:10: fatal error: FAST_Library.h: No such file or
directory
#include "FAST_Library.h"
^~~~~~~~~~~~~~~~
compilation terminated.

Error in create_FAST_SFunc (line 60)
mex('-largeArrayDims', ...

@andrew-platt
Copy link
Collaborator

If mex isn't finding the header file, you may need to pass the location of the include directory to it. I have not built mex functions before, but you might find what you need here: https://www.mathworks.com/matlabcentral/answers/58788-mex-compilation-with-header-files

@caroledaniel
Copy link
Author

collect2: fatal error: cannot find 'ld'
compilation terminated.
i have tried everything and still doesnt work, please hep me

@bjonkman
Copy link
Contributor

It sounds like Matlab can't find the linker for your compiler. Did you run mex -setup first?

@bjonkman
Copy link
Contributor

Also, if you were unable to find the FAST_Library.h file, please make sure you have read the instructions at the top of the create_FAST_SFunc.m file you are running:

%% INSTRUCTIONS
% Before running this script, you must have compiled OpenFAST for Simulink to create a DLL (i.e., a shared library like .so, .dylib, .lib, etc.).
% - If cmake was used, make sure the install directory is specified properly in the `installDir` variable below,
%   and if using Windows, set `built_with_visualStudio` to false.
% - If the Visual Studio Solution file contained in the vs-build directory was used to create the DLL on Windows,
%   make sure `built_with_visualStudio` is set to true.
% - The name of the library that was generated must match the `libname` variable below
%   and should be located in the directory specified by `libDir`.
% - The `includeDir` variable must specify the directory that contains the following header files:
%   "FAST_Library.h", "OpenFOAM_Types.h", and "SuperController_Types.h"
% - The `outDir` variable indicates where the resulting mex file will reside.
%
% Run `mex -setup` in Matlab to configure a C compiler if you have not already done so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants