Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

switch off saving of recovery files in Matlab code

Please login with a confirmed email address before reporting spam

Hello community,

I am running Comsol through the Matlab interface. My problem is that the directory assigned to the recovery files is to small to save them which terminates my calculations.

I would like to know how I can change that. I know that I can just uncheck the button on the COMSOL interface but I need the matlab command.

I tried relocating the recovery folder when starting up comsol in the terminal ( I use LINUX) with

comsol matlab -prefsdir /path
and
comsol server matlab -prefsdir /path

but both didn't work. I tried to relocate the folder in my home file
/voglerd/.comsol/v42/recoveries
by changing the file prefs.dir that was under /voglerd/.comsol/v42/
by rewriting the line
general.recovery.recoverydir=/<path/voglerd/.comsol/v42/recoveries>
to
general.recovery.recoverydir=/<newpath>

All that didn't work. Is there a command that you can write into your code before the solver configurations that switches off the saving of recovery files???

Any help would be much appreciated.

Best,

Daniel

3 Replies Last Post Jun 4, 2014, 2:21 p.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 21, 2011, 2:49 p.m. EDT
Hello,

in case anybody ever gets the same problem, here the answer from COMSOL support:



Dear Daniel,

Thank you for the update. There is a currently undocumented option called
"-autosave" that can be given to the COMSOL Server to turn off recovery
file creation. In

comsol server -autosave off


This means that we can not use "comsol server matlab" to start the LiveLink
to MATLAB, instead use the an alternative method: start a COMSOL server
first, then MATLAB , and finally connect MATLAB to the COMSOL server. Here
are the steps:

In a command window, execute

/usr/local/comsol42/bin/comsol server -autosave off

This will start a COMSOL server process. Next, start MATLAB with the
standard
MATLAB command. At the MATLAB prompt, first add the path where the mphstart
function is saved (it should be under the mli folder in the COMSOL 4.2
installation directory):
addpath /usr/local/comsol42/mli
Next, call the function mphstart
mphstart
Hello, in case anybody ever gets the same problem, here the answer from COMSOL support: Dear Daniel, Thank you for the update. There is a currently undocumented option called "-autosave" that can be given to the COMSOL Server to turn off recovery file creation. In comsol server -autosave off This means that we can not use "comsol server matlab" to start the LiveLink to MATLAB, instead use the an alternative method: start a COMSOL server first, then MATLAB , and finally connect MATLAB to the COMSOL server. Here are the steps: In a command window, execute /usr/local/comsol42/bin/comsol server -autosave off This will start a COMSOL server process. Next, start MATLAB with the standard MATLAB command. At the MATLAB prompt, first add the path where the mphstart function is saved (it should be under the mli folder in the COMSOL 4.2 installation directory): addpath /usr/local/comsol42/mli Next, call the function mphstart mphstart

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Aug 30, 2012, 11:53 a.m. EDT
Good information.

Just noticed this problem after crashing one of my HDDs. Fortunately I have a basic Raid setting. So a backup!

When the model has a large recovery file size to read and write onto HDDs and I constantly put the model into a 1K step loop for parametric sweep, I need to delete all the temp recovery files every 12 hours to clear the disk space and the lifetime of HDD is significant shortened with 5-10+MB/s read and write all the time.



Good information. Just noticed this problem after crashing one of my HDDs. Fortunately I have a basic Raid setting. So a backup! When the model has a large recovery file size to read and write onto HDDs and I constantly put the model into a 1K step loop for parametric sweep, I need to delete all the temp recovery files every 12 hours to clear the disk space and the lifetime of HDD is significant shortened with 5-10+MB/s read and write all the time.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 4, 2014, 2:21 p.m. EDT
Thanks, this was very helpful.

I found that (at least in 4.3b), you can still launch MATLAB at the same time, with
comsol server -autosave off matlab
Thanks, this was very helpful. I found that (at least in 4.3b), you can still launch MATLAB at the same time, with comsol server -autosave off matlab

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.