Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6104541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:51:14+00:00 2026-05-23T13:51:14+00:00

With Mathematica 7 and 8 we have discovered that Mathematica fails to properly Save

  • 0

With Mathematica 7 and 8 we have discovered that Mathematica fails to properly Save and Get the result of a fitting routine. I am hoping someone here knows: What is the best practice workaround for this bug?

Our task is that we are fitting lots of data sets with NonlinearModelFit, which returns a FittedModel for each data set. These fits take a while and we tried using Save and DumpSave to memorize the results to a file. Subsequent analysis uses Get to pull the FittedModel(s) back in.

Mathematica executes the Save & Get without warnings but the FittedModel that comes back is buggy. We call Get and load a FittedModel from disk, call the result “foo”. Trying foo[10] evaluates the fitted model with input 10. The bug we see is that foo[“BestFitParameters”] should return a list a rules but instead plugs the string into the function as it it were a number like 10. Trying foo[{“BestFitParameters”,”BestFitParameters”}] should give the rules twice in a list, but stays unevaluated with the buggy foo.

There is a strange and misleading behavior on top of this, depending on whether we Remove/Clear foo or quit the kernel:

  • Compute the FittedModel as foo
  • Save or DumpSave foo to disk
  • Remove and/or Clear foo
  • Get foo from disk
  • foo works fine

But if we restart the kernel it fails

  • Compute the FittedModel as foo
  • Save or DumpSave foo to disk
  • Kill and restart the kernel
  • Get foo from disk
  • foo is buggy

Has anyone seen this kind of behavior before?

Is there a good explanation behind this bug?

Is there a good workaround?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:51:15+00:00Added an answer on May 23, 2026 at 1:51 pm

    This is a known bug, and luckily there is an easy workaround. Before evaluating Get to read the saved FittedModel, evaluate a dummy fitted model code.

    In[1]:= NonlinearModelFit[Range[5], a x, x, a];
    
    In[2]:= Get[FileNameJoin[{$HomeDirectory, "Desktop", "bignlm.mx"}]];
    
    In[3]:= AbsoluteTiming[nlm["BestFitParameters"]]
    
    Out[3]= {17.6010000, {a -> 1.45015, b -> 2.33999}}
    

    If this initial evaluation is skipped, the fitted model does not appear to work correctly as stated reportedly due to failure to automatically load all the dependent code that implements the functionality. The evaluation of In[1] basically forces the loading.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I get Mathematica to export/save/write a text file with proper Fortan77 formatting,
Possible Duplicate: Best practices in error reporting (Mathematica) Assume that I have a function
Does mathematica have something like select any that gets any element of a list
I have a very complicated mathematica expression that I'd like to simplify by using
I'm using Mathematica 7. I have an interpolated function, here's an example: pressures =
I have to implement this algorithm in Mathematica: My problem is that I don't
I have learned recently that Export in Mathematica uses by default the Printout screen
I have some expressions in Mathematica that are defined in terms of other expressions.
I have several expressions I have generated in Mathematica that I would like to
In Mathematica if I have a symbolic algebra equation, how can I get the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.