The COMSOL Multiphysics batch mode, when launched from a command-line interface, supports using models stored in a Model Manager database as both source input and target output for the simulation run. You specify a model version as input using the command-line argument -inputfile with a model version location as its value — see
Copying Model and File Locations. The output is specified using the command-line argument
-outputfile and a second model version location. The output of the simulation run is saved as a new version for the same model and branch that the version specified by the output argument belongs to. You may skip the output argument altogether, in which case it defaults to that of the input argument. You may also combine a model version in a database as input with an MPH file on the file system as output, and vice versa.
You can stop a batch run involving a model version by launching a new batch process using the same arguments as the first process but with an additional -stop argument. The batch run can be restarted using an additional
-continue argument. For the case when the output is saved to a database, however, it becomes important to use the model version that was saved when the previous batch run was stopped as a new argument value for
-inputfile. Otherwise, you will end up recomputing all solutions already obtained by the previous batch run. You would typically find the saved model version as the latest version of the model by browsing the corresponding branch in the Model Manager workspace, or via the Model Manager API using the
-outputfile argument of the previous run as an “anchor” — see
Navigating a Model Manager Database.