Changeset 683050ef in OpenModelica


Ignore:
Timestamp:
2019-01-19T14:00:54+01:00 (5 years ago)
Author:
hudson <openmodelica@…>
Branches:
Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
Children:
8cd9743
Parents:
0ef03fc
git-author:
David Polak <git@…> (01/19/19 14:00:54)
git-committer:
hudson <openmodelica@…> (01/19/19 14:00:54)
Message:

Fix FMU hybrj_ function signature

3rdParty/CMinpack/hybrj_.c has void return value, FMU export uses int.

EMCC linking and WebAssembly runtime errors out on incorrect function signature.

Belonging to [master]:

  • OpenModelica/OMCompiler#2806
Location:
SimulationRuntime/c/simulation/solver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • SimulationRuntime/c/simulation/solver/nonlinearSolverHybrd.c

    re7d386d r683050ef  
    5757};
    5858
    59 static int wrapper_fvec_hybrj(const integer* n, const double* x, double* f, double* fjac, const integer* ldjac, const integer* iflag, void* data);
     59static void wrapper_fvec_hybrj(const integer* n, const double* x, double* f, double* fjac, const integer* ldjac, const integer* iflag, void* data);
    6060
    6161/*! \fn allocate memory for nonlinear system solver hybrd
     
    306306 *
    307307 */
    308 static int wrapper_fvec_hybrj(const integer* n, const double* x, double* f, double* fjac, const integer* ldjac, const integer* iflag, void* dataAndSysNum)
     308static void wrapper_fvec_hybrj(const integer* n, const double* x, double* f, double* fjac, const integer* ldjac, const integer* iflag, void* dataAndSysNum)
    309309{
    310310  int i,j;
     
    401401    break;
    402402  }
    403 
    404   return 0;
    405403}
    406404
  • SimulationRuntime/c/simulation/solver/nonlinearSolverHybrd.h

    ra892206 r683050ef  
    4646
    4747extern
    48 int hybrj_( int(*) (const integer*, const double*, double*, double *, const integer*, const integer*, void*),  const integer *n, double *x, double *fvec, double *fjac, const integer *ldfjac,
     48void hybrj_( void(*) (const integer*, const double*, double*, double *, const integer*, const integer*, void*),  const integer *n, double *x, double *fvec, double *fjac, const integer *ldfjac,
    4949  const double *xtol, const integer *axfev, double *diag, const integer *mode,
    5050  const double *factor, const integer *nprint, integer *info, integer *nfev, integer *njev,
Note: See TracChangeset for help on using the changeset viewer.