Suppress recovery files writing from Matlab

Please login with a confirmed email address before reporting spam

Dear Support, I'm running Comsol 6.1, and doing simulations from Matlab. I am running a different Matlab/Comsol instance for each of the 32 cores of my workstation, and each is running a loop. The problem I have is that each is loading the hard drive with writing recovery files. Besides of the wasted space, I worry this is going to reduce its life, and I want to suppress all unnecessary writing. How can it be done? Looking at the names of the files, there seem to be geometry files, mesh files, etc. I got the impression that each Comsol server instance opened its own folder in the AppData/Local/Temp folder, and wrote recovery information for each loop step, which quickly amounted more than 100Gb of unneeded data.

Best regards, Javier


2 Replies Last Post 05.08.2025, 02:05 MESZ
Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 5 days ago 31.07.2025, 14:19 MESZ
Updated: 5 days ago 31.07.2025, 14:44 MESZ

Hi Javier

You can use the -autosave argument when starting COMSOL with Matlab.

https://doc.comsol.com/6.3/docserver/#!/com.comsol.help.comsol/comsol_ref_running.38.31.html?highlight=autosave

-------------------
Lars Gregersen
Comsol Denmark
Hi Javier You can use the -autosave argument when starting COMSOL with Matlab. https://doc.comsol.com/6.3/docserver/#!/com.comsol.help.comsol/comsol_ref_running.38.31.html?highlight=autosave

Please login with a confirmed email address before reporting spam

Posted: 5 hours ago 05.08.2025, 02:05 MESZ

Dear Lars,

Sorry for the delay in following up. Your support system used to send an e-mail when there was a reply, but I see that now is an option on the page (and I was waiting for it!).

I had already seen this -autosave feature, and I'm using it. However, Comsol is writing the mesh and the geometry (and solver steps until I entered the solver settings and chose minimal logging) in the AppData\Local\Temp folder. It creates a csmphserverXXXX folder, which contains files named csoooc***** , geomXXXXXXXXXX.cache, meshXXXXXXX.cache (the later is the most annoying because of its size, but any writing is eating my computational resources and degrading my disk).

It is also writing recovery files in \Users\Username.comsol\v61\recoveries, named MPHRecoveryXXXXXXXX.mph, which contain two savepoints (I imagine from the two steps of my solver sequence).

The calling command I'm using is comsolmphserver.exe -np 1 -autosave off matlab run('C:\Users\Javier\myMatlab') -nodesktop -mlnosplash

How can I suppress both writes? What am I doing amiss?

Bests, Javier

Dear Lars, Sorry for the delay in following up. Your support system used to send an e-mail when there was a reply, but I see that now is an option on the page (and I was waiting for it!). I had already seen this -autosave feature, and I'm using it. However, Comsol is writing the mesh and the geometry (and solver steps until I entered the solver settings and chose minimal logging) in the AppData\Local\Temp folder. It creates a csmphserverXXXX folder, which contains files named csoooc***** , geomXXXXXXXXXX.cache, meshXXXXXXX.cache (the later is the most annoying because of its size, but any writing is eating my computational resources and degrading my disk). It is also writing recovery files in \Users\Username\.comsol\v61\recoveries, named MPHRecoveryXXXXXXXX.mph, which contain two savepoints (I imagine from the two steps of my solver sequence). The calling command I'm using is comsolmphserver.exe -np 1 -autosave off matlab run('C:\Users\Javier\myMatlab') -nodesktop -mlnosplash How can I suppress both writes? What am I doing amiss? Bests, Javier

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.