HPC/Applications/comsol: Difference between revisions

From CNM Wiki
Jump to navigation Jump to search
Line 5: Line 5:


== Access ==
== Access ==
Our installation of COMSOL is availbale ''to Argonne employees only'', in compliance with its license agreement.
=== COMSOL Multiphysics ===
 
Our installation of the main [http://www.comsol.com/products/multiphysics/ '''COMSOL Multiphysics'''] product (the full graphical user interface and its batch computing application) is generally available ''to Argonne employees only'', in compliance with its license agreement.
* To request access, send a request to [mailto:[email protected]?Subject=Access%20to%20COMSOL [email protected]].
* To request access, send a request to [mailto:[email protected]?Subject=Access%20to%20COMSOL [email protected]].
* Of the [http://www.comsol.com/products/multiphysics/ available features] we have licensed a subset, shown at right.
* Of the available features, we have licensed a subset, shown at right.
* To have a native desktop version installed, please contact [mailto:[email protected]?Subject=COMSOL%20license%20access%20request CNM support]. Make sure to review [http://www.comsol.com/support/updates/ Product Updates].
* To have a native desktop version installed, please contact [mailto:[email protected]?Subject=COMSOL%20license%20access%20request CNM support]. Make sure to review [http://www.comsol.com/support/updates/ Product Updates].
=== COMSOL Server Application ===
The complementary [https://www.comsol.com/comsol-server '''COMSOL Server'''] product offers an alternative but more narrow means of access.
All users, including ''Non-Argonne persons'' may be able to run, over a web interface in their browser, frozen-code simulations that were made with the COMSOL Application Builder (Requires Windows).
Please contact [mailto:[email protected]?Subject=COMSOL%20server%20use CNM support] to discuss using [https://www.comsol.com/comsol-server COMSOL Server].


== Ways to run COMSOL ==
== Ways to run COMSOL ==

Revision as of 18:33, January 19, 2017

Introduction

HPC Comsol licensed modules.png

The COMSOL Multiphysics product is available for Mac, Windows, and Linux.

Access

COMSOL Multiphysics

Our installation of the main COMSOL Multiphysics product (the full graphical user interface and its batch computing application) is generally available to Argonne employees only, in compliance with its license agreement.

  • To request access, send a request to [email protected].
  • Of the available features, we have licensed a subset, shown at right.
  • To have a native desktop version installed, please contact CNM support. Make sure to review Product Updates.

COMSOL Server Application

The complementary COMSOL Server product offers an alternative but more narrow means of access.

All users, including Non-Argonne persons may be able to run, over a web interface in their browser, frozen-code simulations that were made with the COMSOL Application Builder (Requires Windows). Please contact CNM support to discuss using COMSOL Server.

Ways to run COMSOL

There are several ways of running COMSOL.

Running the desktop application

Model development and analysis is done using the COMSOL graphical user interface (GUI), which itself be run in several ways:

  1. Run on Carbon, display on your desktop using the X Window system (X11).
    • Requires an X11 Server application running on your client machine, and SSH X11 forwarding.
    • The X11 protocol can be slow over LAN.
  2. Run on Carbon within a virtual desktop environment (VNC).
    • Requires a VNC client on your machine.
    • It can be confusing where VNC and the app runs.
    • The virtual desktop presents a (deliberatly) sparse windowing environment – Copy&Paste can be difficult to use.
  3. Run on your own computer, remotely checking out Carbon's license.
    • Requires a full installation of COMSOL on your client machine.
    • Access to the license servers requires VPN (fairly easy) or SSH license tunneling (can be intimidating for first-time users).

Running a batch calculation

When the computational stage of models takes longer than a few minutes to complete, it will be beneficial to submit save the model file and run it in parallel on Carbon. See the section below.

Support

For questions on how to run or start COMSOL, contact CNM IT support - see HPC/FAQ.

For questions related to COMSOL data or scripts, you may contact COMSOL support directly.

Export control
If your support question might contain data that is subject to US Export Control, contact support@us.comsol.com instead.

Use with X11

For casual use, and with X11 tunneling to Carbon set up, simply add to your ~/.bashrc file on Carbon:

module load comsol

Then, from the command line on a Carbon login node, start the COMSOL GUI:

comsol &

Comsol will use a number of cores to run calculations multithreaded by default. (On Carbon, COMSOL_NUM_THREADS is set.)

Quit the application as soon as you are done. Only one user can use Comsol at a time.

Use with VNC

See general instructions on using VNC, and the COMSOL example therein.

Running native desktop version

To get the fastest response from the COMSOL GUI, run a native COMSOL version on your desktop machine. You will have to configure it to check out a license from the Comsol license server running on Carbon.

  • Edit the text file <COMSOLDIR>/license/license.dat, where <COMSOLDIR> is located by default at:
    • Windows: C:\Program files\COMSOL\COMSOL44
    • Linux: /usr/local/comsol44
    • Mac: /Applications/COMSOL44
  • Have it read:
SERVER carbonmgmt.cnm.anl.gov ANY 1718
USE_SERVER
  • The server is reachable only from within the CNM, or possibly VPN.
  • If you're adventurous, try the 3-server redundant license setup.
SERVER cmgmt3.cnm.anl.gov ANY 1718
SERVER cmgmt4.cnm.anl.gov ANY 1718
SERVER csched1.cnm.anl.gov ANY 1718
USE_SERVER
  • Caveat
    At least up to v4.4, server selection failed when the master server runs on the second node shown.

Only the first two servers may actually serve licenses, with a primary server active most of the time and a secondary one which can take over as needed. CNM machines can talk to the Carbon license servers directly.

Running native desktop version, non-CNM networks

Machines outside CNM networks need the following procedure to reach the license servers.

Configure port forwarding

  • On your desktop machine, set up SSH tunneling. This step is only needed once.
    • Windows: Configure PuTTY
    • Linux/Mac/Cygwin: edit the file ~/.ssh/config and add to the Host clogin section:
Host clogin
	
	# COMSOL licensing
	# Initial ("negotiation") ports of FlexLM's lmgrd; may be forwarded to different local port numbers.
	LocalForward 33318 carbonmgmt:1718
  • Stop any previous connection that you might have to clogin.
  • Connect to clogin. This will start the port forwarding configured in the previous step.
    • On PuTTY, open the Clogin session.
    • On Linux/Mac/Cygwin, type:
ssh -v clogin

Configure COMSOL to use forwarded ports

  • Start the Comsol installer on your machine. When asked for licensing use the following type:
    • License type: networked server
    • Port 33318
    • Host localhost
  • Complete the installer.
  • Locate and start the COMSOL Multiphysics application.

Preparing to run COMSOL

  • Have an SSH connection to clogin active. It provides the forwarded ports to your machine.
  • Then start the COMSOL application normally.

Multiple CPU cores

Ways to start multi-core (from http://www.comsol.com/support/knowledgebase/1096/)

comsol -np 8
export COMSOL_NUM_THREADS=8    # automatically provided on Carbon
comsol
  • COMSOL does not benefit from hyperthreading (oversubscribing the physical core count).

Batch jobs

Sample Job file

See:

$COMSOL_HOME/sample.job