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.

change the directory of temporary file

Please login with a confirmed email address before reporting spam

Hi,

have you guys noticed that as comsol is solving ,there will be a lot of temporary files showing in the directory

~/.comsol/v41/configuration/comsol/org.eclipse.osgi/bundles/.

is there a way to change the location of this directory to someplace else ?

i tried the startup argument of comsol like '-tmpdir and '-prefsdir, it seems that they don't help.

20 Replies Last Post Sep 23, 2012, 9:51 p.m. EDT
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 21, 2010, 2:40 a.m. EST
Hi

I have also niticed that COMSOL adds many file in your "profile", I have understood these are related to the help files and the indexing thereof (not sure). Unfortunately I have no info on how to change that, but try to ask support.

As I do not have a "roaming profile" on my PC I do not have any great problem, but I'm an exception at work and it is true that if I had had a roaming profil my IP administrator would have blocked the use of COMSOL for a long time ago, so it is somewhat a nuisance I agree

--
Good luck
Ivar
Hi I have also niticed that COMSOL adds many file in your "profile", I have understood these are related to the help files and the indexing thereof (not sure). Unfortunately I have no info on how to change that, but try to ask support. As I do not have a "roaming profile" on my PC I do not have any great problem, but I'm an exception at work and it is true that if I had had a roaming profil my IP administrator would have blocked the use of COMSOL for a long time ago, so it is somewhat a nuisance I agree -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 21, 2010, 7:00 a.m. EST
Well,

especially i find the roaming can be disastrous if a very small home directory is allocated by the IP manager
of the working place, which is less than 1 G in my case.

Sometimes the COMSOL solving process will be terminated because the continuously growing size of the directory
'bundles' used up all my home directory then gives 'disk quota exceeded' error.

currently , the only way i am using is running a bash script which is monitoring the existence of the directory 'bundles' and deleting it
as soon as it appears. It seems that it works out quite well without any problems.
Well, especially i find the roaming can be disastrous if a very small home directory is allocated by the IP manager of the working place, which is less than 1 G in my case. Sometimes the COMSOL solving process will be terminated because the continuously growing size of the directory 'bundles' used up all my home directory then gives 'disk quota exceeded' error. currently , the only way i am using is running a bash script which is monitoring the existence of the directory 'bundles' and deleting it as soon as it appears. It seems that it works out quite well without any problems.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 21, 2010, 7:11 a.m. EST
Hi

you should report this to "support" as it's of general importance as a "strong" suggestion for next release (to use the temp folders and not the profile)

--
Good luck
Ivar
Hi you should report this to "support" as it's of general importance as a "strong" suggestion for next release (to use the temp folders and not the profile) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 22, 2010, 8:27 a.m. EST
Hi,

I have the same problem and asked the support today. If someone gets a solution early then I, please be so kind and post it. When I get a solution, I will post it.

kind regards,

Martin Siegele
Hi, I have the same problem and asked the support today. If someone gets a solution early then I, please be so kind and post it. When I get a solution, I will post it. kind regards, Martin Siegele

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 23, 2010, 9:29 a.m. EST
COMSOL Support:

The '.comsol\configuration' and '.comsol\workspace' folders can be moved to another location by changing the following lines in the 'COMSOL41\bin\win64\comsol.ini' file:
-Dosgi.configuration.area=@user.home/.comsol/v41/configuration/comsol
-Dosgi.instance.area=@user.home/.comsol/v41/workspace/comsol

to read, for example:
-Dosgi.configuration.area=C:/Temp/comsol/v41/configuration/comsol
-Dosgi.instance.area=C:/Temp/comsol/v41/workspace/comsol

In case you are running 32-bit COMSOL, this ini file is 'COMSOL41\bin\win32\comsol.ini' instead.
COMSOL Support: The '.comsol\configuration' and '.comsol\workspace' folders can be moved to another location by changing the following lines in the 'COMSOL41\bin\win64\comsol.ini' file: -Dosgi.configuration.area=@user.home/.comsol/v41/configuration/comsol -Dosgi.instance.area=@user.home/.comsol/v41/workspace/comsol to read, for example: -Dosgi.configuration.area=C:/Temp/comsol/v41/configuration/comsol -Dosgi.instance.area=C:/Temp/comsol/v41/workspace/comsol In case you are running 32-bit COMSOL, this ini file is 'COMSOL41\bin\win32\comsol.ini' instead.

Jim Freels mechanical side of nuclear engineering, multiphysics analysis, COMSOL specialist

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 26, 2010, 8:19 a.m. EST
There is also a tmp switch you can add on the command line that may take care of some of the larger files that get created during a typical COMSOL execution.
There is also a tmp switch you can add on the command line that may take care of some of the larger files that get created during a typical COMSOL execution.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 7, 2011, 1:22 a.m. EST
I am having a problem which might sound familiar to people discussing the original topic. Although I just posted it to support, I will appreciate if there can be a quick reply here.

For some reason related to the organization of our linux cluster, I have to change $HOME from the regular /home/shakeeb/ to a new location /lustre/vol/shakeeb. All applications I have used until now used to notice this change without any trouble. However, Comsol 4.0a has some issues with it as it still tries to access /home/shakeeb/ which is no longer available. I even tried -tmpdir switch but no avail. As a result, I always get the following error:

-bash-3.2$ HOME=/lustre/vol/shakeeb/
-bash-3.2$ export HOME
-bash-3.2$ echo $HOME
/lustre/vol/shakeeb/
-bash-3.2$ /cluster/comsol40a/bin/comsol server -np 12 -mpmode owner
!SESSION 2011-01-07 06:28:06.246 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: server -install ../.. -np 12 -mpmode owner
Command-line arguments: -os linux -ws gtk -arch x86_64 server -install ../.. -np 12 -mpmode owner

!ENTRY org.eclipse.osgi 4 0 2011-01-07 06:28:06.634
!MESSAGE Error reading configuration: /home/shakeeb/.comsol/v40a/configuration/comsol/org.eclipse.osgi/.manager/.fileTableLock (No such file or directory)
!STACK 0
java.io.FileNotFoundException: /home/shakeeb/.comsol/v40a/configuration/comsol/org.eclipse.osgi/.manager/.fileTableLock (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.Locker_JavaNio.lock(Locker_JavaNio.java:32)
at org.eclipse.osgi.storagemanager.StorageManager.lock(StorageManager.java:388)
at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:686)
at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initFileManager(BaseStorage.java:213)
at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initialize(BaseStorage.java:147)
at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(BaseAdaptor.java:121)
at org.eclipse.osgi.framework.internal.core.Framework.initialize(Framework.java:185)
at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:157)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:286)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Username: shakeeb
Password:
Confirm password:

ERROR: Could not start COMSOL Application. See log file: null
I am having a problem which might sound familiar to people discussing the original topic. Although I just posted it to support, I will appreciate if there can be a quick reply here. For some reason related to the organization of our linux cluster, I have to change $HOME from the regular /home/shakeeb/ to a new location /lustre/vol/shakeeb. All applications I have used until now used to notice this change without any trouble. However, Comsol 4.0a has some issues with it as it still tries to access /home/shakeeb/ which is no longer available. I even tried -tmpdir switch but no avail. As a result, I always get the following error: -bash-3.2$ HOME=/lustre/vol/shakeeb/ -bash-3.2$ export HOME -bash-3.2$ echo $HOME /lustre/vol/shakeeb/ -bash-3.2$ /cluster/comsol40a/bin/comsol server -np 12 -mpmode owner !SESSION 2011-01-07 06:28:06.246 ----------------------------------------------- eclipse.buildId=unknown java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US Framework arguments: server -install ../.. -np 12 -mpmode owner Command-line arguments: -os linux -ws gtk -arch x86_64 server -install ../.. -np 12 -mpmode owner !ENTRY org.eclipse.osgi 4 0 2011-01-07 06:28:06.634 !MESSAGE Error reading configuration: /home/shakeeb/.comsol/v40a/configuration/comsol/org.eclipse.osgi/.manager/.fileTableLock (No such file or directory) !STACK 0 java.io.FileNotFoundException: /home/shakeeb/.comsol/v40a/configuration/comsol/org.eclipse.osgi/.manager/.fileTableLock (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.(Unknown Source) at org.eclipse.core.runtime.internal.adaptor.Locker_JavaNio.lock(Locker_JavaNio.java:32) at org.eclipse.osgi.storagemanager.StorageManager.lock(StorageManager.java:388) at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:686) at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initFileManager(BaseStorage.java:213) at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initialize(BaseStorage.java:147) at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(BaseAdaptor.java:121) at org.eclipse.osgi.framework.internal.core.Framework.initialize(Framework.java:185) at org.eclipse.osgi.framework.internal.core.Framework.(Framework.java:157) at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:286) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311) Username: shakeeb Password: Confirm password: ERROR: Could not start COMSOL Application. See log file: null

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 7, 2011, 2:10 a.m. EST
Hi

often its quicker to reinstall the software, and COMSOL is rather easy to install. Note that you should get hands on the latest version, its much smoother, check with your COMSOL rep

--
Good luck
Ivar
Hi often its quicker to reinstall the software, and COMSOL is rather easy to install. Note that you should get hands on the latest version, its much smoother, check with your COMSOL rep -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 7, 2011, 5:04 a.m. EST
Hi,

I am afraid re-installing the software won't redress the problem. To explain it further, I log into the front end of cluster and there all users have their home directories as /home/user. Comsol is installed at front end so it also sees that /home/user is the default directory.

Then I submit a job to queue scheduler. If a slot is empty, the job gets into execution and *then* it realizes that /home/user which was available before is not mounted anymore. That is why before starting actual job, I manually modify $HOME variable to reflect this change. However, Comsol is adamant upon using the old one.

Any tips, tricks or solution :)
Hi, I am afraid re-installing the software won't redress the problem. To explain it further, I log into the front end of cluster and there all users have their home directories as /home/user. Comsol is installed at front end so it also sees that /home/user is the default directory. Then I submit a job to queue scheduler. If a slot is empty, the job gets into execution and *then* it realizes that /home/user which was available before is not mounted anymore. That is why before starting actual job, I manually modify $HOME variable to reflect this change. However, Comsol is adamant upon using the old one. Any tips, tricks or solution :)

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 7, 2011, 5:08 a.m. EST
Hi

best is to ask support ;)

--
Good luck
Ivar
Hi best is to ask support ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 20, 2011, 8:47 a.m. EDT
Hi !

I have faced similar problem!
When running long calculation, the folder /.comsol (under Linux) becomes huge due to the continues saving of the COMSOL recovery files.
This is annoying when you have a quota for your home/user directory.
A simple solution is to switch off the option "save recovery file" and the files are not created anymore. Don't forget to restart COMSOL after changing this option.

I hope it helps
Cheers
Hi ! I have faced similar problem! When running long calculation, the folder /.comsol (under Linux) becomes huge due to the continues saving of the COMSOL recovery files. This is annoying when you have a quota for your home/user directory. A simple solution is to switch off the option "save recovery file" and the files are not created anymore. Don't forget to restart COMSOL after changing this option. I hope it helps Cheers

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 20, 2011, 8:51 a.m. EDT
For changing the location of the tmp folder, which can also get bigger if running long calculation, try:
comsol -tmpdir /new_location/tmp

This can be found in the Doc!
Cheers
For changing the location of the tmp folder, which can also get bigger if running long calculation, try: comsol -tmpdir /new_location/tmp This can be found in the Doc! Cheers

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 25, 2011, 3:43 a.m. EDT
To move the Bundles files to another location, perform the changes suggested by nitram but do the changes to
COMSOLCLASSKIT.ini instead. Changes to the COMSOL.ini file does not change the location of the Bundles directory.
To move the Bundles files to another location, perform the changes suggested by nitram but do the changes to COMSOLCLASSKIT.ini instead. Changes to the COMSOL.ini file does not change the location of the Bundles directory.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 8, 2011, 2:49 p.m. EDT
Hi I am having the exact same problem. (Although for me it is creating Recovery files which are much too large and consequently force my program to quit prematurely.) Did you receive any information about how to fix this?
Hi I am having the exact same problem. (Although for me it is creating Recovery files which are much too large and consequently force my program to quit prematurely.) Did you receive any information about how to fix this?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 8, 2011, 2:49 p.m. EDT
Sorry double post.
Sorry double post.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 28, 2011, 3:43 p.m. EDT
After trying several times, I find the solution as follows,

Comsol 4.1 temporary files are saved into the system defaut temporary folder, which is specified by the system environment variable of tmp. So in order to save the temporary files such as the big solution files into another folder, we can change the system environment variable, tmp.

For example, if we want to save these big files into D:\Temp, we can create a dos batch file comsol_myrun.cmd in the folder where we can find comsol.exe, the main file to run comsol, the content of the file is as follows,

set tmp=D:\Temp
start comsol.exe

If you want, you can create a shortcut for this .cmd file on your desktop. When you run comsol by double clicking on this shortcut or the .cmd file, comsol will create a subfolder like D:\Temp\cs<xxxxx> to save big temporary files such as mesh, solution, model files, and D:\Temp\hsperfdata_<username> to save other information, where <xxxxx> is a five digit random number, <username> is your real username.

By the way, the recovery files are saved in <homedir>\.comsol\v41\recoveries. You may need to delete the old recovery files to save disk space.
After trying several times, I find the solution as follows, Comsol 4.1 temporary files are saved into the system defaut temporary folder, which is specified by the system environment variable of tmp. So in order to save the temporary files such as the big solution files into another folder, we can change the system environment variable, tmp. For example, if we want to save these big files into D:\Temp, we can create a dos batch file comsol_myrun.cmd in the folder where we can find comsol.exe, the main file to run comsol, the content of the file is as follows, set tmp=D:\Temp start comsol.exe If you want, you can create a shortcut for this .cmd file on your desktop. When you run comsol by double clicking on this shortcut or the .cmd file, comsol will create a subfolder like D:\Temp\cs to save big temporary files such as mesh, solution, model files, and D:\Temp\hsperfdata_ to save other information, where is a five digit random number, is your real username. By the way, the recovery files are saved in \.comsol\v41\recoveries. You may need to delete the old recovery files to save disk space.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 3, 2012, 8:58 a.m. EST
[..]
Any tips, tricks or solution :)


I know that the tread is quite old, but since I did not find this solution anyplace else, thought I would post it anyways, if someone searches for similar problem.

I am also using COMSOL (v4.2a) on cluster system, that change the home directory after assigning the node, namely from ~./ to ~./pfs. And after that action the directory ~./ is NOT writable, but IS readable (!).

Tried to persuade the COMSOL to use new home directory, with no luck. Found some useful command line options (namely -configuration, -data), but that only got me till reading project file and compiling equations. Failed as soon as wanted to start solver.

Universal solution: make symbolic link from your main home directory, to your working directory, in my case:
ln -s ./pfs/.comsol .comsol

Using such trick I was able to run COMSOL on cluster nodes with no problems (didn't need even -configure and -data options).

If someone in future founds this helpful, I am glad. :)
[QUOTE][..] Any tips, tricks or solution :) [/QUOTE] I know that the tread is quite old, but since I did not find this solution anyplace else, thought I would post it anyways, if someone searches for similar problem. I am also using COMSOL (v4.2a) on cluster system, that change the home directory after assigning the node, namely from ~./ to ~./pfs. And after that action the directory ~./ is NOT writable, but IS readable (!). Tried to persuade the COMSOL to use new home directory, with no luck. Found some useful command line options (namely -configuration, -data), but that only got me till reading project file and compiling equations. Failed as soon as wanted to start solver. Universal solution: make symbolic link from your main home directory, to your working directory, in my case: ln -s ./pfs/.comsol .comsol Using such trick I was able to run COMSOL on cluster nodes with no problems (didn't need even -configure and -data options). If someone in future founds this helpful, I am glad. :)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 16, 2012, 3:51 a.m. EDT
This is the best solution that worked for me after days of search.

Thanks
This is the best solution that worked for me after days of search. Thanks

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 21, 2012, 12:27 p.m. EDT
Hello James,

Tips on this thread was pretty useful. However, It would be great if you could explain how to add temp switch for comsol execution. I do not know where is command line in the COMSOL installation files.

Thanks a lot.
-COMSOL User
Hello James, Tips on this thread was pretty useful. However, It would be great if you could explain how to add temp switch for comsol execution. I do not know where is command line in the COMSOL installation files. Thanks a lot. -COMSOL User

Jim Freels mechanical side of nuclear engineering, multiphysics analysis, COMSOL specialist

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 23, 2012, 9:51 p.m. EDT
I use linux on all my computers, so adding switches to the command line is quite common there.

Windows users can have the same effect by either modifying the icon settings to include switches on the commands embedded within the icon, or by opening a console window and running the commands that are included in the icon.

The COMSOL installation and operations manual explains how to do this for all the operating systems supported.
I use linux on all my computers, so adding switches to the command line is quite common there. Windows users can have the same effect by either modifying the icon settings to include switches on the commands embedded within the icon, or by opening a console window and running the commands that are included in the icon. The COMSOL installation and operations manual explains how to do this for all the operating systems supported.

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.