Cluster Computing
To enable this option in the context menu, click the Show button () and select Advanced Study Options.
Use the Cluster Computing () study when you want to submit COMSOL Multiphysics batch jobs to a job scheduler that in turn runs the batch job on a second computer or cluster. For more information, see Cluster Computing (Job Configurations) and its related functionality. Also see Figure 19-5.
Use Cluster Computing to utilize a cluster or cloud to solve a single large model using distributed memory. For maximum performance, the COMSOL cluster implementation can utilize shared-memory multicore processing on each node in combination with the Message Passing Interface (MPI) based distributed memory model. This brings a major performance boost by making the most out of the computational power available.
Cluster Computing is also intended as an interface for setting up distributed COMSOL Multiphysics batch jobs on the computer where the COMSOL Desktop is running. If you are running in distributed mode interactively, the Cluster Computing node is not needed.
Once you have specified the settings, click Compute  to start a COMSOL process that solves the current study.
When the cluster computing process starts, the COMSOL Desktop follows the progress in The External Process Window. When the process finishes (or you click the Detach Job button to no longer follow the process), an External Process node is selected that represents the current running process. If you are running COMSOL Multiphysics in distributed mode, the model runs in the current process. In this case it is recommended that you do not create a Cluster Computing study step.
Figure 19-6: An example of the two kinds of Cluster Computing nodes available under Study and Job Configurations.
Micromixer — Cluster Version: Application Library path: COMSOL_Multiphysics/Tutorials/micromixer_cluster
Batch Settings
After making these settings, click the Save as Default () button on the Settings window toolbar to save the current directory settings as the default preference.
Choose the Scheduler type: General (the default), HPCS 2008/2012, WCCS 2003, OGS/GE, SLURM, or Not distributed.
General
Select General (the default) to configure to run on many types of clusters and schedulers, including Linux clusters.
When General is selected, and you have started a multiprocessor daemon (MPD) on the computer, click to select the MPD is running check box.
The entry in the Host file field specifies the host file used for the job. If left empty, MPD looks for a file mpd.hosts in the Linux home directory.
Enter the Number of nodes (physical nodes) to use (default is 1 node).
HPCS 2008/2012 or WCCS 2003
Select HPCS 2008/2012 to use the Windows HPC Server 2008 and HPC Pack 2012 job scheduler to submit the batch job. Select WCCS 2003 to use the Windows Compute Cluster Server 2003 job scheduler to submit the batch job.
When WCCS 2003 or HPCS 2008/2012 is selected:
The entry in the Scheduler field is the IP address of the enterprise adapter of the head node or the DNS name of the head node. The default is localhost.
The entry in the User field is the user account that COMSOL Multiphysics uses for submitting the job. You provide the password in a separate command window that opens at execution time with the possibility to save the credentials.
Enter the Number of nodes (physical nodes) to use (default is 1 node).
OGS/GE
Select OGS/GE to use the open grid scheduler/grid engine job scheduler to submit the batch job. When OGS/GE is selected:
Specify the Number of slots and the name of the scheduler queue in Queue name.
Enter the Queue name for the cluster queue.
SLURM
Select SLURM to use the SLURM job scheduler to submit the batch job. When SLURM is selected:
The entry in the Scheduler field is the IP address of the enterprise adapter of the head node or the DNS name of the head node. The default is localhost.
The entry in the User field is the user account that the COMSOL software uses for submitting the job.
Enter the Number of nodes (physical nodes) to use (default is 1 node).
Enter the Queue name for the cluster queue.
Not Distributed
Select Not distributed when you want to submit a batch job to a job scheduler without running a distributed job. Enter details for the Filename and Directory Settings for all Cluster Types and Use Batch License Settings for all Cluster Types.
Filename and Directory Settings for all Cluster Types
Specify the file in which to store the model in the Filename field. Choose the mounted file system directory in which to store the model in the Directory field by entering it directly or by clicking the Browse button to choose a batch directory. The Directory refers to the location where the client (COMSOL Desktop) reads and writes data.
If you are connected to a COMSOL Multiphysics server on another computer, you can control the working directory used by the COMSOL Multiphysics server if you select the Specify server directory path check box and enter the path to the server Directory or Browse for the path. Otherwise a temporary directory on the COMSOL Multiphysics server is used to save files. The server directory path refers to the location where the COMSOL Multiphysics server reads and writes the corresponding data (assuming a client-server configuration).
If the batch job has another path to the directory, select the Specify external COMSOL batch directory path check box and enter the path to the external process (batch) directory in the Directory field or click Browse. The cluster job uses this path from the compute node to access the input file and write back the result. On Windows this must be a fully qualified UNC path, for example, \\head1\shared\clusterprojects. The external COMSOL batch directory path refers to the location where the batch process reads and writes the data.
If the COMSOL software is installed in a directory other than where the COMSOL Desktop runs, select the Specify external COMSOL installation directory path check box and then specify the installation directory (click Browse or enter the path to the Directory). This can occur if you are submitting jobs to a job scheduler. Typically on Windows this is the UNC path to the COMSOL installation root directory for the compute nodes to access the required COMSOL binaries — for example, \\head1\shared\COMSOL53.
See How to Specify Directory Paths for Batch Jobs and Cluster Jobs for some examples of which paths to specify for some common cluster or batch job configurations.
Use Batch License Settings for all Cluster Types
Select the Use batch license check box to run using batch licenses. Batch licenses can be used to run multiple batch jobs for different models that only depend on a parameter. Usually you should use the Cluster Sweep node.
Cluster Settings
If you are running a parametric sweep and want to distribute it by sending one parameter value to each compute node, select the Distribute parametric sweep check box. This requires that your study includes a parametric sweep.
Remote and Cloud Access
Enable the Run remote check box if you want to run COMSOL Multiphysics on a remote machine using a remote start command such as SSH and using a file transfer program such as SCP to transfer the files to and from the remote computer. This allows you to run on a machine installed on your network without a client-server connection or on a machine installed on a remote cloud.
COMSOL Multiphysics must be installed on the remote machine and all settings must be specified correctly in the Specify external COMSOL batch directory path and Specify external COMSOL installation directory path settings according to how COMSOL Multiphysics is installed on the remote machine and the remote machines working directories.
Choose the method for starting COMSOL Multiphysics remotely in Remote invoke command. You can choose None, SSH, or User defined. For the SSH setting you can choose between using SSH, Putty, or a User defined SSH command. You can select the SSH commands installation directory in the SSH directory if the SSH command is not available on the PATH. The SSH key file directory is set in the SSH key file setting. You can set ports you want to forward in Forward ports and the host you want to forward the ports to in Port host. This is useful when you have the license manager installed locally, but the machine where COMSOL Multiphysics is running cannot access the license manager; for instance, if the machine is in the cloud. Specify the user name to use on the remote machine with SSH user. For the User defined Remote invoke command, you can enter a command in the Command setting. In the Command setting, any use of the keyword {remotehost} is replaced by the name of the remote host when COMSOL Multiphysics starts.
Choose the method for transferring files to the remote computer in File transfer command. You can choose None, SCP, or User defined. For the SCP setting, you can choose between using SCP, Putty, or a User defined SCP command. You can select the SCP commands installation directory in SCP directory if the SCP command is not available on the PATH. The SCP key file directory is set in the SCP key file setting. Specify the user name to use on the remote machine with SCP user. For the User-defined File transfer command, you can enter a command in the To remote command for the transfer of files from the local computer to the remote machine and From remote command for the transfer of files from the remote machine to the local computer. In the settings, any use of the keyword {remotehost} is replaced by the name of the remote host. Any use of the keyword {localfile} is replaced by the name of the local file, and any use of the keyword {remotefile} is replaced by the name of the remote file.
Use the Remote hosts to list the host you want to run on. If several hosts are listed, COMSOL Multiphysics allocates a job on the first host that is free. Use the Remote OS to specify if the remote computer is running the same OS (Native) or is running Linux or Windows.
For information about using COMSOL with the Amazon Elastic Compute Cloud™, see Running COMSOL on the Amazon Cloud. This PDF can be accessed as follows:
In COMSOL Multiphysics, press Ctrl+F1 to open the Documentation window and scroll to locate the PDF under Cloud Computing.
Study Extensions
Select the Use graphics check box when the batch process should run results nodes that create graphical contents such as exporting to file.
Enter the Number of simultaneous jobs. The default is 1. This is the maximum number of batch processes that are allowed to run simultaneously.
Enter the Number of job restarts. The default is 0. This is the maximum number of times the job can be restarted if it fails to complete.
Enter a value for the Alive time (seconds). The default is 300 seconds. This is the longest time the process is allowed to run before it must inform that it is still running. Failure to do so means that the process is considered dead, and a new process is started unless the maximum number of job restarts is reached.