Skip to content

RAT seems to crash with multiple custom models defined... #422

Closed

Description

@arwelHughes

Using the custom layers example (customLayersDSPC_script), if we add a second custom model (even if unused), RAT crashes on entering the mex.

If a second model is added within the script as follows:

`%%
% Add the custom file to the project....

problem.addCustomFile('DSPC Model','customBilayerDSPC.m','matlab',pwd);
problem.addCustomFile('DSPC Model 2','customBilayerDSPC.m','matlab',pwd);`

..when we try to run it, it fails with an error:

`>> [problem,results] = RAT(problem,controls);
Starting RAT ______________________________________________________________________________________________

Incorrect size for expression 'problemStruct.customFiles': expected [1x:10000] but found [2x1].

Error in RATMain_mex

Error in [RAT](matlab:matlab.lang.internal.introspective.errorDocCallback('RAT', '/Users/arwel/Documents/coding/RAT_fork/API/RAT.m', 75)) ([line 75](matlab: opentoline('/Users/arwel/Documents/coding/RAT_fork/API/RAT.m',75,0)))
[problemStruct,result,bayesResults] = RATMain_mex(problemStruct,controls);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^`

Activity

  1. added theissue type on Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions