When I install or start COMSOL I get the following error message on Windows (or a similar message on Linux):
An error has occurred.
See the log file C:\Users\my_name\.comsol\v55\configuration\comsol\1234123423424.log.
There are several situations where this problem can occur:
A: Write problems in home or temp directory
If you have limited disk space in your home directory, or if you do not have write permissions, this message may appear because COMSOL cannot write during solution time. The log file typically includes error messages like these:
No space left on device
Solution disk cache write error
Cannot open native file
Disk error while writing to temporary solution file
Problem with OOC file
Also, the system temp directory is used by COMSOL during solution and can cause problems. The temp directory may be smaller than you expect, especially on Linux systems.
Here is how you change the directory to which COMSOL writes temporary files:
- Start COMSOL Multiphysics, go to the menu Options>Preferences>Files and change the folders for recovery and temporary files. It is also possible to turn off the saving of recovery files. The new folder locations need to have plenty of disk space available, and write permissions.
Alternatively, change the location of the COMSOL preferences folder, not only temporary files and recovery files:
- Add the following command switches to the COMSOL command:
-prefsdir D:\work\comsol55data -tmpdir D:\work\comsol55data -configuration D:\work\comsol55data\configuration\comsol
D:\work is an area where you have plenty of disk space available, and write permissions.
In Windows, the simplest way to do this is to right-click the COMSOL shortcut and select Properties. In the Target edit field, add the switches above after comsol.exe, separated by spaces. The target can for example look like:
"C:\Program files\COMSOL\COMSOL55\Multiphysics\bin\win64\comsol.exe" -prefsdir D:\work\comsol55data -tmpdir D:\work\comsol55data -configuration D:\work\comsol55data\configuration\comsol
On Linux, just add the switches to the
comsol command. For example, if you have plenty of disk space available in
/scratch, the command would look like this:
/usr/local/comsol55/multiphysics/bin/comsol -prefsdir /scratch/comsol55data -tmpdir /scratch/comsol55data -configuration /scratch/comsol55data/configuration/comsol
You can write a small script or define an alias that does this automatically.
Permanent command switches
If you are using MacOS or Linux, you can apply the switches permanently by editing the file comsol.ini that resides in the same directory as comsol, typically
/usr/local/comsol55/multiphysics/bin/glnxa64 (for Linux). Add the following two switches starting with -Dcs one by one on separate lines:
Now save comsol.ini. Repeat the process above for the other .ini files in the same directory.
Note: this option requires write permission to the COMSOL installation directory.
For Windows, you can currently do the same if you are using the Java GUI. If you are using the default .NET GUI, some files will still be written to the default directory. Using the command line switches work as expected.
Personal command switches
An alternative is to use your own, personal comsol.ini file (for example, if you do not have write permissions to the installation directory). Make a copy of the comsol.ini file, for example as
c:\work\mycomsol.ini. Now, start COMSOL with the following target:
"C:\Program files\COMSOL\COMSOL55\Multiphysics\bin\win64\comsol.exe" -comsolinifile c:\work\mycomsol.ini
B: Visual Studio runtime libraries not installed
When you install COMSOL on Windows from the DVD, runtime components of Visual C++ Libraries required to run COMSOL are automatically installed on the machine. One situation when this can fail is if you start COMSOL directly from a network disk by double-clicking comsol.exe, without having run the COMSOL installation program at least once. You will get the error message in the title of this solution.
In the log file you may find the following error messages:
Can't find dependent libraries
Error loading native library
Could not load native library
In some rare cases, the redistributables fail to install even if you run the COMSOL installer DVD. Another situation when this may occur is if you run on a Windows HPC Server 2008 compute cluster. The runtime libraries will need to be installed on each compute node as shown below.
Find the COMSOL installation DVD or download the offline installer, which is a DVD image of the installation DVD, from the Product Download page.
extsubdirectory of the DVD (for example D:), you will find the files
Double-click each of them and answer yes or OK to any questions. If you run on a Windows HPC Server 2008 cluster, use the
clusruncommand to install on all nodes in the cluster.
- Start COMSOL.
Browse by CategoryError Messages (63)
Structural Mechanics (3)
Fluid Dynamics (1)
ALE / Parameterized Geometry (1)
Product Information (2)
User Models (1)
COMSOL makes every reasonable effort to verify the information you view on this page. Resources and documents are provided for your information only, and COMSOL makes no explicit or implied claims to their validity. COMSOL does not assume any legal liability for the accuracy of the data disclosed. Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark details.