-
Notifications
You must be signed in to change notification settings - Fork 465
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
Running OpenFAST in Simuling on ubuntu 22.04 #2185
Comments
I still don't understand why I can not run create_FAST_SFunc but I found out I might not need to From #1740 I learned "Note that you do not need to use the create_FAST_SFunc.m to build the mex file, it will be generated in build/glue-codes/simulink when building with CMake." So now I have OpenFAST running in Simulink but got some new error. I can struggle a bit with those. Maybe I need to get a DISCON for ubuntu manually? Error:Error reported by S-function 'FAST_SFunc' in 'SystemSimulation/FAST Nonlinear Wind Turbine/S-Function': |
@TorbenKnudsen As you found, you do not need to run As for the second issue, not being able to find |
Thanks for the quick response. ~/OpenFAST/build $ cmake .. -DBUILD_TESTING=ON
does not contain a CMakeLists.txt file. CMake Error at reg_tests/CMakeLists.txt:89 (file): CMake Error at reg_tests/CMakeLists.txt:89 (file): CMake Error at reg_tests/CMakeLists.txt:89 (file): CMake Error at reg_tests/CMakeLists.txt:89 (file): CMake Error at reg_tests/CMakeLists.txt:89 (file): CMake Error at reg_tests/CMakeLists.txt:89 (file): CMake Error at reg_tests/CMakeLists.txt:94 (file): CMake Error at reg_tests/CMakeLists.txt:100 (file): CMake Error at /usr/share/cmake-3.22/Modules/ExternalProject.cmake:2882 (message): /home/tk/OpenFAST/unit_tests/pfunit is not an existing non-empty directory. Please specify one of:
-- Configuring incomplete, errors occurred! |
I also have the below problem which might relate to the above I have triedd to run Run_OpenLoop.m both in a local directory and where it was
OpenFAST Copyright (C) 2024 National Renewable Energy Laboratory This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY. OpenFAST-v3.5.3
OpenFAST completed. Error using Run_OpenLoop (line 12) I then tried to collect the files from ~/OpenFAST/build $ cmake .. -DBUILD_TESTING=ON
does not contain a CMakeLists.txt file. |
@TorbenKnudsen based on those messages, it looks like the submodules haven't been initialized. The regression tests are stored in a separate repository which is referenced as a submodule in the |
Thanks again. You brought me a step further to a new problem with a matlab crash as follows.
OpenFAST Copyright (C) 2024 National Renewable Energy Laboratory This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY. OpenFAST-v3.5.3
OpenFAST input file heading: Running ElastoDyn. FAST_InitializeAll:InflowWind_Init:IfW_UniformWind_Init: Could not read upflow column in uniform Time: 0 of 60 seconds. Xcb GLX gl-integration successfully initialized Xcb GLX gl-integration successfully initialized Xcb GLX gl-integration successfully initialized
Configuration: Fault Count: 3 Abnormal termination: Current Thread: 'MCR 0 interpret' id 140590064780864 Register State (from fault): R8 = 00007fe7fe79efc0 R9 = 00000000aaaaaab3 RIP = 00007fdd386aee61 EFL = 0000000000010246 CS = 0033 FS = 0000 GS = 0000 Stack Trace (from fault): Abnormal termination: Current Thread: 'MCR 0 interpret' id 140597096609344 Register State (from fault): R8 = 00007fe2a9249a00 R9 = 00000000aaaaaab8 RIP = 00007fdd386aee61 EFL = 0000000000010246 CS = 0033 FS = 0000 GS = 0000 Stack Trace (from fault): Abnormal termination: Current Thread: 'MCR 0 interpret' id 140595723413056 Register State (from fault): R8 = 00007fdd53cf4500 R9 = 0000000000000004 RIP = 00007fdd386aef3a EFL = 0000000000010287 CS = 0033 FS = 0000 GS = 0000 Stack Trace (from fault): This error was detected while a MEX-file was running. If the MEX-file
MATLAB is exiting because of fatal error M-Shell killed |
Are you compiling with the Intel compilers and MKL? Based on the stack trace something is failing in the MKL when calling |
I'm not perfectly sure what options I have used now but I have attached the file /home/tk/OpenFAST/CMakeLists.txt Below you see the result of doing what I think you ask me to ~/OpenFAST/build $ cmake .. -DBLA_STATIC=ON -- Configuring incomplete, errors occurred! |
I have been running Run_OpenLoop.m both in where it was after installing. I tried both the options you suggested ~/OpenFAST/build $ cmake .. -DBLA_STATIC=ON -DLAPACK_LIBRARIES="/usr/lib/x86_64-linux-gnu/liblapack.so" ~/OpenFAST/build $ cmake .. -DBLA_STATIC=OFF -DUSE_LOCAL_STATIC_LAPACK=ON -DLAPACK_LIBRARIES="/usr/lib/x86_64-linux-gnu/liblapack.so" unfortunately both produced Segmentation violation. Moreover, the stack trace Stack Trace (from fault): Thanks for the help so far |
These stack traces show an issue with OpenMP. Please try disabling it with
‘-DOPENMP=OFF’. OpenMP is more useful for FAST.Farm than OpenFAST.
…On Tue, May 7, 2024 at 6:28 AM Torben Knudsen ***@***.***> wrote:
I have been running Run_OpenLoop.m both in where it was after installing.
I tried both the options you suggested
~/OpenFAST/build $ cmake .. -DBLA_STATIC=ON
-DLAPACK_LIBRARIES="/usr/lib/x86_64-linux-gnu/liblapack.so"
-- Enabling Fortran 2008 features
-- Found LAPACK: /usr/lib/x86_64-linux-gnu/liblapack.so
-- Setting system file as: src/SysGnuLinux.f90
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tk/OpenFAST/build
~/OpenFAST/build $
~/OpenFAST/build $ cmake .. -DBLA_STATIC=OFF -DUSE_LOCAL_STATIC_LAPACK=ON
-DLAPACK_LIBRARIES="/usr/lib/x86_64-linux-gnu/liblapack.so"
-- Enabling Fortran 2008 features
-- Downloading and building LAPACK as static libraries for linking with
OpenFAST
-- Using LAPACK libraries:
/home/tk/OpenFAST/build/dependencies/src/lapack-build/lib/liblapack.a;/home/tk/OpenFAST/build/dependencies/src/lapack-build/lib/libblas.a
-- Setting system file as: src/SysGnuLinux.f90
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tk/OpenFAST/build
~/OpenFAST/build $
unfortunately both produced Segmentation violation. Moreover, the stack
trace
looks very similar and still with Matlab files
Stack Trace (from fault):
[ 0] 0x00007f1ea4b33e61
/usr/local/MATLAB/R2024a/bin/glnxa64/mkl.so+20979297
mkl_blas_avx2_xidamax_nonan+00000417
[ 1] 0x00007f1ea4a8e520
/usr/local/MATLAB/R2024a/bin/glnxa64/mkl.so+20301088
mkl_blas_avx2_xidamax+00000064
[ 2] 0x00007f1ea3de342e
/usr/local/MATLAB/R2024a/bin/glnxa64/mkl.so+07017518
mkl_blas_idamax+00001006
[ 3] 0x00007f1ea45badbf
/usr/local/MATLAB/R2024a/bin/glnxa64/mkl.so+15240639
mkl_lapack_dgetf2_team+00000975
[ 4] 0x00007f1ea45ba92c
/usr/local/MATLAB/R2024a/bin/glnxa64/mkl.so+15239468
mkl_lapack_dgetrf_local_team+00002812
[ 5] 0x00007f1ea45ba0eb
/usr/local/MATLAB/R2024a/bin/glnxa64/mkl.so+15237355
mkl_lapack_dgetrf_local_team+00000699
[ 6] 0x00007f1ea45ba0eb
/usr/local/MATLAB/R2024a/bin/glnxa64/mkl.so+15237355
mkl_lapack_dgetrf_local_team+00000699
[ 7] 0x00007f1ea45ba0eb
/usr/local/MATLAB/R2024a/bin/glnxa64/mkl.so+15237355
mkl_lapack_dgetrf_local_team+00000699
[ 8] 0x00007f1ea45ba0eb
/usr/local/MATLAB/R2024a/bin/glnxa64/mkl.so+15237355
mkl_lapack_dgetrf_local_team+00000699
[ 9] 0x00007f1ea45ba0eb
/usr/local/MATLAB/R2024a/bin/glnxa64/mkl.so+15237355
mkl_lapack_dgetrf_local_team+00000699
[ 10] 0x00007f1ea3cd49fe
/usr/local/MATLAB/R2024a/bin/glnxa64/mkl.so+05908990
mkl_lapack_dgetrf+00001934
[ 11] 0x00007f209f955893
/usr/local/MATLAB/R2024a/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+01398931
__kmp_invoke_microtask+00000147
[ 12] 0x00007f209f8c8cb3
/usr/local/MATLAB/R2024a/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00822451
[ 13] 0x00007f209f8c7bf2
/usr/local/MATLAB/R2024a/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00818162
[ 14] 0x00007f209f956603
/usr/local/MATLAB/R2024a/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+01402371
[ 15] 0x00007f20c6af3ac3 /lib/x86_64-linux-gnu/libc.so.6+00608963
[ 16] 0x00007f20c6b85850 /lib/x86_64-linux-gnu/libc.so.6+01206352
Thanks for the help so far
—
Reply to this email directly, view it on GitHub
<#2185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCSATOLXPTM6LZCJE4HSH3ZBCUDPAVCNFSM6AAAAABHIU56ICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJYGAYTCMZZGU>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
I then tried and got Stack Trace (from fault): This error was detected while a MEX-file was running. If the MEX-file
MATLAB is exiting because of fatal error |
I verified the method for building OpenFAST Simulink module on an CentOS 7 linux system with MATLAB 2023a. Let's try the following:
If this doesn't work, please post the full output of the CMake configure step so I can see which compilers you're using. |
I had the below result in matlab which is good.
OpenFAST Copyright (C) 2024 National Renewable Energy Laboratory This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY. OpenFAST-v3.5.3-dirty
OpenFAST input file heading: Running ElastoDyn. FAST_InitializeAll:InflowWind_Init:IfW_UniformWind_Init: Could not read upflow column in uniform Time: 0 of 60 seconds. Time: 5 of 60 seconds. Estimated final completion at 17:57:60. Time: 10 of 60 seconds. Estimated final completion at 17:57:37. Time: 15 of 60 seconds. Estimated final completion at 17:57:37. Time: 20 of 60 seconds. Estimated final completion at 17:57:37. Time: 25 of 60 seconds. Estimated final completion at 17:57:37. Time: 30 of 60 seconds. Estimated final completion at 17:57:37. Time: 35 of 60 seconds. Estimated final completion at 17:57:37. Time: 40 of 60 seconds. Estimated final completion at 17:57:37. Time: 45 of 60 seconds. Estimated final completion at 17:57:37. Time: 50 of 60 seconds. Estimated final completion at 17:57:37. Time: 55 of 60 seconds. Estimated final completion at 17:57:37. Time: 60 of 60 seconds. Estimated final completion at 17:57:37. OpenFAST completed. |
@TorbenKnudsen Now that it's working you can run |
Thanks a lot. I will work on it tomorrow as my time is 7:50pm. I will let you know the result. |
1 similar comment
Thanks a lot. I will work on it tomorrow as my time is 7:50pm. I will let you know the result. |
Dear Derek I haven't got any recent routine with Simulink so I still only know that Run_Openloop works. However, I suppose that is enough to close this issue. I am not sure if I am supposed to do that but I will give it a try. Thanks a lot again and you will probably hear more from me. |
I tried to adapt a simulink model from windows to run on ubuntu. I got the below error
I can only find dll versions of DISCON in my OpenFAST. |
Dear @TorbenKnudsen, We only provide the Windows versions of the DISCON dlls. For linux, you will need to compile the DISCON libraries. To compile these, run We had considered distributing the DISCON controllers on other platforms, but found there are too many differences in the installed system libraries between linux systems for that to be practical. Regards, |
Dear Andrew I tried to follow your instruction and got the error below. I also tried to follow something from https://github.com/openfast/r-test?tab=readme-ov-file#note-external-servodyn-controllers-for-5mw_baseline-cases but did only get a dll file which confuses me. Welcome to the Emacs shell ~ $ cd OpenFAST/ |
@TorbenKnudsen the output above says that the controller was built so you should see a file named |
Thanks for this. It seems to work now. |
Dear supporters
I need to run OpenFAST in MATLAB Simulink under ubuntu 22.04. So far I have not
been able to produce a mex file FAST_SFunc.mexa64 so I would very much apriciate
some help.
I have tried to follow
https://openfast.readthedocs.io/en/main/source/install/index.html#compile-from-source.
Initially I have installed via anaconda. However, recently I followe
"2.3. Compile from source".
I can run the simple test with the below terminal output:
(base) tk@AAU118294:~/OpenFAST/install/bin$ ./openfast -v
OpenFAST
Copyright (C) 2024 National Renewable Energy Laboratory
Copyright (C) 2024 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-v3.5.3
Compile Info:
Execution Info:
I got the impression that both BUILD_OPENFAST_SIMULINK_API and BUILD_SHARED_LIBS
should be on but cmake said this is not possible so I tried both combinations:
cmake .. -DBUILD_OPENFAST_SIMULINK_API=on -DBUILD_SHARED_LIBS=off and
cmake .. -DBUILD_OPENFAST_SIMULINK_API=off -DBUILD_SHARED_LIBS=on
In none of the cases I could make a mex function using create_FAST_SFunc
Finally I tried:
cmake .. -DBUILD_OPENFAST_SIMULINK_API=off -DBUILD_SHARED_LIBS=on
make openfastlib
make install
This did give a file libopenfastlib.so in
/home/tk/OpenFAST/build/modules/openfast-library/
This did not give a file libopenfastlib.so in
/home/tk/OpenFAST/modules/openfast-library/
Running the create_FAST_SFunc I still get
Creating ./FAST_SFunc.mexa64
Building with 'gcc'.
Error using mex
/usr/bin/ld: cannot find -lopenfastlib_mex: No such file or directory
collect2: error: ld returned 1 exit status
Let me know if you need more information to help
The text was updated successfully, but these errors were encountered: