COMSOL Compiler™

COMSOL Multiphysics® version 5.4 introduces COMSOL Compiler™. This new product allows you to create standalone applications that anyone can run, without a license file requirement. Read more about the capabilities and features of COMSOL Compiler™ below.

Creating a Standalone Application

By using COMSOL Compiler™, applications created with the Application Builder in COMSOL Multiphysics® can be compiled to standalone applications for the Windows® and Linux® operating systems and macOS. Such compiled applications can then be provided to any user and run with no license file requirement. Compiling an application is as simple as a click in the Application Builder user interface. You can customize a compiled application with its own icon and splash screen.

The Application Builder is included in the Windows® version of COMSOL Multiphysics® and is accessible from the COMSOL Desktop® environment. However, once you have created an application with the Application Builder, you can also compile that MPH-file from the command line, which is helpful for Linux® and macOS users.

An example of creating a standalone application with COMSOL Compiler.

The image analysis application, with custom icon and splash screen, shown as an executable file after clicking the Compile button in the Executable Settings window.

The image analysis application, with custom icon and splash screen, shown as an executable file after clicking the Compile button in the Executable Settings window.

Video: How to Compile an Application

The COMSOL Compiler™ License

COMSOL Compiler™ is available as a named single-user license, CPU-locked license, or floating network license, as an add-on to a COMSOL Multiphysics® license of the same type. Compiled applications do not support the batch processing or cluster computing options of a regular COMSOL Multiphysics® floating network license. Note that with the COMSOL Compiler™ License, you can compile as many applications as you would like and distribute the resulting standalone application to as many people as you would like.

Command Line Arguments

Let users of your application supply command line arguments as inputs when launching the app. Command line arguments are automatically written to the declarations you reference inside the Application Builder, and can be used to, for example, supply input data or configuration settings. This can be used for compiled applications, but also when launching the application together with COMSOL Multiphysics® or COMSOL Server™. To call a compiled application you write, for example:

myapp.exe -appargnames freq -appargvalues 400

for an application that has an input argument freq that takes a numeric value 400 (a double, in this case).

The corresponding command using COMSOL Multiphysics® would be:

comsol.exe -run myapp.mph -appargnames freq -appargvalues 400

With COMSOL Server™, you simply provide the arguments directly in the URL: http:///app/myapp_mph?appargnames=freq&appargvalues=400

An example of setting up an input argument with the Application Builder. Setup of an input argument for the target frequency.
Setup of an input argument for the target frequency.

Linux is a registered trademark of Linus Torvalds in the U.S. and other countries. macOS is a trademark of Apple Inc., in the U.S. and other countries. Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.