-
Notifications
You must be signed in to change notification settings - Fork 508
Description
I am trying to use OpenFAST with Simulink, however, I get errors when running create_FAST_SFunc.m. Some of the error message is below (the rest is similar, but for different functions).
>> create_FAST_SFunc
----------------------------
Creating ./FAST_SFunc.mexa64
Building with 'gcc'.
Error using mex
/pathToOpenFAST/openfast/install/lib/libopenfastlib.a(FAST_Library.f90.o): In function `FAST_AllocateTurbines':
FAST_Library.f90:(.text+0x48): undefined reference to `nwtc_io_mp_wrscr1_'
FAST_Library.f90:(.text+0x59): undefined reference to `nwtc_io_mp_wrscr1_'
FAST_Library.f90:(.text+0xf2): undefined reference to `for_check_mult_overflow64'
FAST_Library.f90:(.text+0x166): undefined reference to `for_alloc_allocatable'
FAST_Library.f90:(.text+0x197): undefined reference to `_intel_fast_memcpy'
FAST_Library.f90:(.text+0x1d3): undefined reference to `_intel_fast_memset'
/pathToOpenFAST/openfast/install/lib/libopenfastlib.a(FAST_Library.f90.o): In function `FAST_DeallocateTurbines':
FAST_Library.f90:(.text+0xf172): undefined reference to `for_deallocate_all'
FAST_Library.f90:(.text+0xf19d): undefined reference to `_intel_fast_memset'
/pathToOpenFAST/openfast/install/lib/libopenfastlib.a(FAST_Library.f90.o): In function `FAST_Sizes':
FAST_Library.f90:(.text+0xf1ef): undefined reference to `_intel_fast_memcpy'
FAST_Library.f90:(.text+0xf21f): undefined reference to `_intel_fast_memmove'
FAST_Library.f90:(.text+0xf233): undefined reference to `_intel_fast_memmove'
FAST_Library.f90:(.text+0xf25d): undefined reference to `for_f90_index'
FAST_Library.f90:(.text+0xf286): undefined reference to `for_cpystr'
FAST_Library.f90:(.text+0xf2a1): undefined reference to `__dtoq'
FAST_Library.f90:(.text+0xf3b5): undefined reference to `fast_subs_mp_fast_initializeall_t_'
FAST_Library.f90:(.text+0xf3c0): undefined reference to `nwtc_base_mp_aborterrlev_'
FAST_Library.f90:(.text+0xf483): undefined reference to `__qtod'
FAST_Library.f90:(.text+0xf4b2): undefined reference to `for_trim'
FAST_Library.f90:(.text+0xf4e5): undefined reference to `for_concat'
FAST_Library.f90:(.text+0xf532): undefined reference to `for_concat'
FAST_Library.f90:(.text+0xf557): undefined reference to `_intel_fast_memcpy'
FAST_Library.f90:(.text+0xf585): undefined reference to `for_cpystr'
FAST_Library.f90:(.text+0xf5aa): undefined reference to `_intel_fast_memcpy'
FAST_Library.f90:(.text+0xf5bb): undefined reference to `_intel_fast_memcpy'
FAST_Library.f90:(.text+0xf6aa): undefined reference to `_intel_fast_memset'
System Information
OS: CentOS 7
Compiler: Intel 2018.3
Matlab Version: 2017a
Matlab Compiler: gcc 4.9.4
I can successfully build the software using:
FC=ifort CC=icc CXX=icc cmake .. -DBUILD_OPENFAST_SIMULINK_API=ON
make
upon calling make install there is an error:
Error copying directory from "/pathToOpenFAST/openfast/build/ftnmods" to "/usr/local/include/openfast/".
but otherwise installs successfully (note that /usr/local/... is not available on this machine). I did try moving the folder ftnmods to openfast/install/include/openfast but it had no effect. I'm not sure what libraries the undefined references are in, so I haven't been able to look into it too much. Issue #387 had similar problems, but I have not been able to use any of the suggestions there. It seems that some of the undefined references are to functions with intel in the name, could these errors be caused by compiler differences when compiling the library vs compiling the s-function? In #387 there was an issue with using a compiler not supported by Matlab, but it isn't clear to me whether the difference in compilers causes any issues. Finally, I have edited the create_FAST_SFunc.m file to point to the correct install location.
Thanks