COMSOL Multiphysics® Running COMSOL Multiphysics® with Amazon Elastic Compute Cloud™
Running COMSOL Multiphysics® with Amazon Elastic Compute Cloud™ © 1998–2015 COMSOL Protected by U.S. Patents listed on www.comsol.com/patents, and U.S. Patents 7,519,518; 7,596,474; 7,623,991; 8,457,932; and 8,954,302. Patents pending. This Documentation and the Programs described herein are furnished under the COMSOL Software License Agreement (www.comsol.com/comsol-license-agreement) and may be used or copied only under the terms of the license agreement.
1 Running COMSOL Multiphysics® with Amazon Elastic Compute Cloud™ This guide describes how to use COMSOL Multiphysics® with the Amazon Elastic Compute Cloud™ service.
Running COMSOL Multiphysics® with Amazon™ Elastic Compute Cloud™ Amazon Elastic Compute Cloud™, also known as Amazon EC2™, allows you to dynamically allocate virtual computer resources at a small hourly fee. If you have access to a COMSOL® Floating Network License (FNL), you can run one or several computations in the cloud.
• Shut Down and Delete Your Stacks • Troubleshooting Nomenclature The following terms are used in this guide: • AWS™, Amazon Web Services™. • AWS CloudFormation™, Amazon's tool for launching collections of AWS™ resources from a pre-defined template. • EC2™, Amazon Elastic Compute Cloud™. • AMI, An Amazon™ Machine Image is a special type of pre-configured operating system and virtual application software, which is used to create a virtual machine within the Amazon Elastic Compute Cloud™ (EC2™).
3 Create Key for Use in PuTTY (Optional). 4 Create a COMSOL® License Server on EC2™. 5 Create login.properties File for EC2™ (Optional) 6 Forward Ports From Your On Premise License Server. 7 Create a COMSOL Multiphysics® server. 8 Connect to the COMSOL Multiphysics® Server. 9 Disconnect from the COMSOL Multiphysics® Server 10 Shut Down and Delete Your Stacks. Please note that Amazon.com Inc. charges for the time that the machines exists, independent of whether you are connected to them or not.
Create a Key Pair In this section you will learn how to create a key pair on AWS™ in order to be able to connect to it with SSH and COMSOL. To connect securely with your Amazon™ virtual machines you need a key pair. You can create a key pair using the following steps: 1 Go to https://console.aws.amazon.com/. If you aren‘t logged in to AWS™, you will be redirected to the AWS™ login screen. Log in with your AWS™ account and navigate to https://console.aws.amazon.com/. 2 Click the EC2™ icon.
9 Save the file to your computer, e.g. as My_Keypair.ppk. 10 Close PuTTYgen. Create a COMSOL® License Server on EC2™ In this section you will learn how to use AWS CloudFormation™ to create a COMSOL license server on EC2™. In order to start a COMSOL instance on Amazon EC2™, you need a license server. There are two possible ways to start a COMSOL license server in the cloud. One way is to create a license server through which you access your on premise license server.
6 You now need to specify some parameters controlling the creation of the COMSOL license server. a InstanceType - Specify what instance type you want to use for your COMSOL license server. The recommended type is t1.micro. b KeyDir - Specify the local directory where your key file resides. Observe that a trailing backslash, or a trailing slash if you use Linux® or Mac, is needed. c KeyName - Specify the name of the key pair that you want to use.
a LicenseSecurityGroup - The security group created for your servers. b LicenseServerIP - The IP address of the license server. c LicenseServer - The host name of the license server. d LoginBucketID - The name of the Amazon S3™ bucket created for the file login.properties. e SSHAccess - Command for forwarding ports using SSH. f PuTTYAccess - Command for forwarding ports using PuTTY. g Instructions - Instructions on how to forward the ports to the license server.
You have now created a security group. You will now need to create an Elastic Network Interface in your security group. To do so, follow the steps below: 1 Navigate to https://console.aws.amazon.com/ and click EC2. 2 Click Network Interfaces 3 Click Create Network Interface. 4 If wanted, write a description for the ENI, e.g. ENI for my COMSOL license server. 5 Choose a subnet from the list in order to use this with your ENI.
2 Click Create New Stack. 3 Write a name for your stack—for example, My-COMSOL-License-Server. 4 Navigate to the folder where you saved the Cloud Formation templates and choose the file COMSOL_AmazonLicenseServer.json. 5 You now need to specify some parameters controlling the creation of the COMSOL license server. a AcceptLicense - Write yes if you have read through and accept the COMSOL Software License Agreement, available at http://www.comsol.com/shared/ downloads/sla.pdf.
9 Review your settings and make sure that they are correct. 10 Click Create. 11 The creation process has started. Wait until it is done. 12 After the stack has been created you can find some helpful information in the Output section. It is recommended that you save all of the output in a text document for future use. The different output data are described in the list below. a LicenseSecurityGroup - The security group created for your servers. b LicenseServerIP - The IP address of the license server.
2 Enter a username and password of your choice when prompted. If you are not prompted for a username and password, a login.properties file already exists in your home folder. 3 Write close in the Command Prompt window to close the COMSOL Multiphysics server. You have now created a login.properties file. CREATE LOGIN.PROPERTIES (LINUX® AND MAC OS X) 1 Open a terminal window. 2 Navigate to the COMSOL installation directory. 3 Run the command ./bin/comsol mphserver.
Forward Ports From Your On Premise License Server In this section you will learn how to use an ssh client to forward access to your on premise license server. This step is only necessary if you have chosen to forward your on premise license server. The port forwarding is needed to give the Amazon cloud™ access to your on premise license server. The easiest way to start the port forwarding is to use the command listed in the Outputs for the COMSOL license server stack.
To create a COMSOL Multiphysics server, use the AWS CloudFormation™ tool and the script COMSOL_CloudServer.json, which is provided by COMSOL. 1 Go to https://comsol.aws.amazon.com/ and click the AWS CloudFormation™ icon. 2 Click Create Stack. 3 Write a name for your stack— for example, My-COMSOL-MPH-Server. 4 Choose Upload a template to Amazon S3. 5 Navigate to the folder where you saved the AWS CloudFormation™ templates and choose the file COMSOL_CloudServer.json. 6 Specify the needed parameters.
(Memory Optimized) category. To find more information, please refer to http:/ /aws.amazon.com/ec2/instance-types/. For a new user, Amazon™ provides micro instances free of charge (Free Usage Tier). These are useful for experimenting and verifying that everything works as expected. h KeyDir - Specify the local directory where your key file is residing. Observe that you need to include a trailing backslash if you are using Windows, and a trailing slash if you are using Linux® or Mac.
10 Review your settings and make sure that they are correct. 11 Click Create. 12 The creation process has started. Wait until it is done. 13 When the stack has been created you can find some helpful information and commands in the Output section. It is recommended that you save all of the output in a text document for future use. The different output data are described in the list below. a Instructions - Short instructions on how to access the COMSOL Multiphysics server.
6 Paste the command that you copied in step 4 into the command prompt window and press Enter. 7 If asked, Store key in cache? type y and press Enter. 8 Leave the window open until you are finished with your computations. Your ports are only forwarded as long as the SSH session is active, and closing the command prompt will deactivate the session. You are now ready to connect to the server you have created in the cloud. 1 Open COMSOL Multiphysics 5.0. 2 Click File.
once (warning: this will also DELETE ALL DATA on the Amazon-based machines). To be able to delete the license manager stack automatically, you will need to remove all files from the login bucket, if you chose to create one when creating the license server. To do this, follow the steps described below: 1 Open the Amazon S3™ bucket created with the license server by navigating to https://console.aws.amazon.com/ and click the Amazon S3™ icon. 2 Click the Amazon S3™ bucket created with your license server.
creating a COMSOL license server. The reason for this error is that when using a t2.micro instance for your COMSOL license server, you need to have a default Virtual Private Cloud™ (VPC™) configured for your account. You can solve this in one of the following two ways: - Change the instance type of your COMSOL license server to t1.micro by entering the value t1.micro in the field InstanceType (see section Create a COMSOL® License Server on EC2™).
| CHAPTER 1: RUNNING COMSOL MULTIPHYSICS® WITH AMAZON ELASTIC COMPUTE CLOUD™