Comsol
Last Modified: 02/12 10:41
Description
Comsol is an interactive environment for modeling and simulating scientific and engineering problems based on partial differential equations (PDEs) equations that are the fundamental basis for the laws of science.
Version
- 3.4
Authorized Users
- Students doing research
- Faculty
- circe users
Platforms
- Workstation/PC, Cluster
Installation
Contents
Installing on Linux
Installing on Windows
Running on Circe
Installing on Linux
- Connect to https://rc.usf.edu/isos and login with your NetID and password. Change to the directory /pub/Comsol/current and download the ISO files. Once you have downloaded the ISOs, disconnect from the ftp server.
- Next, become root and issue the following commands.
root@host> mkdir -p /tmp/comsol/cd1 root@host> mkdir /tmp/comsol/cd2 root@host> mkdir /tmp/comsol/cd3 root@host> mkdir /tmp/comsol/cd4 root@host> mount -o loop Comsol-3.3a-1-of-4.iso /tmp/comsol/cd1 root@host> mount -o loop Comsol-3.3a-2-of-4.iso /tmp/comsol/cd2 root@host> mount -o loop Comsol-3.3a-3-of-4.iso /tmp/comsol/cd3 root@host> mount -o loop Comsol-3.3a-4-of-4.iso /tmp/comsol/cd4
Please note that /tmp/comsol could be any temporary directory you wish. These commands will create a directory and then mount the ISO CD image to that temporary directory. This saves you the trouble of having to actually burn a CD for Comsol.
- Next you will need to start the installer by issuing the following command as root:
root@host> sh /tmp/comsol/cd1/setup
After a few moments the graphical installer will be displayed.
- Click on the New Installation Button to continue.
- Read through the license agreement, agree to the terms and then click on the Agree button to proceed.
- In the License Section change License format to License file.
- Click on the "Browse ..." button to browse and select the license file you have been provided. If you need this file please go here. When you have selected the license file click Next to continue.
- Follow the next on-screen instructions, select Linux as your platform and make sure the other two platforms are not selected. Be sure you choose the typical install set. If you have MATLAB 7.1 or higher installed on your computer you can choose to install the Comsol interface for use with MATLAB. Click on the "Choose ..." button and select the directory where MATLAB is installed.
- When prompted for the directory for Comsol to install to we recommend the default directory.
- Follow the on-screen instructions to complete the installation process. When the installer asks for CDs 2, 3 and 4 simply click the "Choose..." button and browse to the /tmp/comsol/cd2, /tmp/comsol/cd3 and /tmp/comsol/cd4 directories that we created before launching the installer.
- Once the installer is done you may wish to create a link to the Comsol binary under a directory that is in your path. You can do this by issuing the following command as root:
root@host> ln -s /usr/local/comsol32/bin/comsol /usr/local/bin
Note: Comsol has changed names to comsol you can make the link above be any name you wish.
Please note that you can use a directory other than /usr/local/bin if you wish.
Now that you have installed Comsol and created a link to the executable you can run Comsol with either of the two commands, the first starts Comsol without MATLAB and the second starts with MATLAB:
user@host> comsol or user@host> comsol matlab
Installing on Windows
Follow the steps below to download and install Comsol for Windows.
- Connect to https://rc.usf.edu/isos and login with your NetID and password. Change to the directory /pub/Comsol/current and download the ISO files. Once you have downloaded the ISOs, disconnect from the ftp server record the ISOs to a blank CD-R under your favorite CD recording software. If you need help with recording CDs please see our guide at CDBurning.
Alternatively, you could mount the ISO without burning a CD. Read our guide at WindowsISO.
- To begin the installation click on the installer on the newly created CD 1 located in the directory <cdrom>:\Windows\VM\setup.exe.
- Click the New Installation button on the Introduction screen to continue.
- Read through the license agreement, agree to the terms and then click the I Agree button to proceed.
- In the licence section change the License format to License file. Click on the "Browse ..." button to browse and select the license file you have been provided. If you need this file please go here. When you have selected the license file click Next to continue.
- Follow the next on-screen instructions, be sure you choose the typical install set. If you have MATLAB 7.1 or higher installed on your computer you should choose to install the Comsol interface for use with MATLAB. Click on the "Choose ..." button and select the directory where MATLAB is installed.
- When prompted for the directory for Comsol to install to we recommend the default directory.
- Follow the on-screen instructions to complete the installation process, inserting the other CDs when prompted.
- When Comsol is finished installing you should have an icon on the desktop and in your Programs on the Start Menu. If you installed the MATLAB interface, you will also have an icon for starting Comsol with the interface.
Running on Circe
Running Comsol on circe is quite trivial. When you are ready to run a job, submit one of the following scripts to the cluster:
Before you Begin
Before you begin, you'll need to create a user and password combination for connecting to the Comsol server that will be executed on the cluster. You'll also want to make sure you have proper X11 forwarding enabled (see the XWin32Install guide for information). You can do this by running comsol -64 server. A dialog box should pop up asking you to set a user name and a password. Make sure you tell the dialog box to remember your password. Once this is done, you can hit Control-C to exit the server. You'll only need to complete this task once. If you ever wish to change your user name or password, simply run rm ~/.comsol/ver34/login to clear the login data and repeat the above instructions.
Modules
To set up the environment properly, you must run these modules:
- apps/comsol/3.4
To run Comsol on the cluster, ensure that you use module initadd to make the changes persistent. See Modules for more information.
Using the Scripts
For both scripts, you will want to edit the runtime you require on the line #$ -l s_rt=01:00:00 to the time you require in hh:mm:ss form. You'll also want to edit the line EMAIL="myemail@address.com" to include a working e-mail address so that you can receive notification and instructions for connecting to the Comsol server. For the multi-threaded script, you'll want to set the number of processors you wish to use by editing the line #$ -pe smp <#_of_procs> to include the number of processors.
You can submit the script to the queue by running qsub <script_name> where <script_name> is one of either start_comsol_multi.sh or start_comsol_serial.sh, both of which are provided for your reference below. When the job starts, an e-mail will be sent to the address you specified with instructions for connecting to the server.
Once you have received the e-mail, you can follow the connection instructions by going to File->Client/Server/MATLAB->Connect To Server.... This will allow you to set the user name, password, hostname, and port number needed to connect.
This method will allow you to run solutions for long-running Comsol problems on Circe nodes with lots of memory and extra processors, significantly reducing your solution time while freeing up the CPU on your local machine for other work.
Attachments
-
start_comsol_multi.sh
(2.1 KB) - added by aastaneh
19 months ago.
Script for running multi-threaded Comsol server on SGE
-
start_comsol_single.sh
(2.0 KB) - added by aastaneh
19 months ago.
Script for running single-threaded Comsol server on SGE