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

Running built S-function FAST_SFunc gives undefined symbols error #1704

Open
reos-rcrozier opened this issue Jul 26, 2023 · 2 comments
Open
Milestone

Comments

@reos-rcrozier
Copy link
Contributor

Bug description

In a build from the 3.5.0 branch or the 'main' branch, the Matlab S-function FAST_SFunc is built, but attempting to run the function in a simulation results in the following error:

Invalid MEX-file '/home/rcrozier/src/openfast-reos-git/build/glue-codes/simulink/FAST_SFunc.mexa64':
        /home/rcrozier/src/openfast-reos-git/build/glue-codes/simulink/FAST_SFunc.mexa64: undefined symbol:
        __polynomialroots_MOD_quarticroots

To Reproduce

Steps to reproduce the behavior:

  1. Compile with
cmake ~/src/openfast-official-git \
  -DBUILD_FASTFARM=ON \
  -DBUILD_OPENFAST_CPP_API=ON \
  -DBUILD_OPENFAST_SIMULINK_API=ON \
  -DBUILD_SHARED_LIBS=OFF \
  -DCMAKE_INSTALL_PREFIX=/usr/local \
  -DDOUBLE_PRECISION=ON \
  -DOPENMP=OFF -DUSE_LOCAL_STATIC_LAPACK=OFF
make
  1. Add mex function to the matlab path
  2. Run OpenLoop example provided in glue-codes/simulink/examples/Run_OpenLoop.m
  3. See the error

Expected behavior
Simulation runs without error.

OpenFAST Version
I built from both the main brance and the 3.5.0 branch with the same result. I also added a test for this to the github CI with the following PR: #1703

@reos-rcrozier
Copy link
Contributor Author

reos-rcrozier commented Jul 27, 2023

With PR #1703 on the dev branch the CI test yields a slightly different undefined symbol error __seastate_types_MOD_seast_destroyparam:


  ================================================================================
  Error occurred in test_openfast_simulink/testOpenLoopRuns and it did not run to completion.
      ---------
      Error ID:
      ---------
      'Simulink:SFunctions:MexSFcnSizesInitErr'
      --------------
      Error Details:
      --------------
      Error using test_openfast_simulink/testOpenLoopRuns
      Error while obtaining sizes from MEX S-function 'FAST_SFunc' in
      'OpenLoop/FAST
      Nonlinear Wind Turbine/S-Function'.
      
      Caused by:
          Error using test_openfast_simulink/testOpenLoopRuns
          Invalid MEX-file
          '/home/runner/work/openfast/openfast/build/glue-codes/simulink/FAST_SFunc.mexa64':
      
          /home/runner/work/openfast/openfast/build/glue-codes/simulink/FAST_SFunc.mexa64:
              undefined symbol: __seastate_types_MOD_seast_destroyparam
  ================================================================================

@reos-rcrozier
Copy link
Contributor Author

reos-rcrozier commented Jul 27, 2023

I resolved the __seastate_types_MOD_seast_destroyparam in PR #1703 but the original error remains.

@andrew-platt andrew-platt added this to the v3.5.1 milestone Oct 12, 2023
@andrew-platt andrew-platt modified the milestones: v3.5.1, v4.0.0 Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants