Difference between revisions of "Mathematica"

m
Line 3: Line 3:
''Mathematica'' is the tool of choice at the frontiers of scientific research, in engineering analysis and modeling, in technical education from high school to graduate school, and wherever quantitative methods are used.
''Mathematica'' is the tool of choice at the frontiers of scientific research, in engineering analysis and modeling, in technical education from high school to graduate school, and wherever quantitative methods are used.


{{AppVersion|11.0}}
{{AppVersion|11.1}}


{{AuthorizedUsers}}
{{AuthorizedUsers}}
Line 10: Line 10:
*Workstation/PC
*Workstation/PC


{{AppModule|apps/mathematica/11.0}}
{{AppModule|apps/mathematica/11.1}}


== Installation ==
== Installation ==
Line 16: Line 16:
=== Installing Mathematica On Windows ===
=== Installing Mathematica On Windows ===


#Log into http://mirror.rc.usf.edu/isos/Mathematica/V11.0/ using your NetID and password.  
#Log into http://mirror.rc.usf.edu/isos/Mathematica/V11.1/ using your NetID and password.  
#Download the Windows ZIP file to a temporary directory on your PC. Once the file has finished downloading you may disconnect from the FTP server.
#Download the Windows ZIP file to a temporary directory on your PC. Once the file has finished downloading you may disconnect from the FTP server.
#Start the Mathematica_11.0.0_WIN.exe executable, and click on “Install Mathematica to a hard disk.”
#Start the Mathematica_11.1_WIN.exe executable, and click on “Install Mathematica to a hard disk.”
#On the next screens, select an install location and make sure the installation type is set to “Install all components” and click “Install”
#On the next screens, select an install location and make sure the installation type is set to “Install all components” and click “Install”
#When the files are finished copying, the Installer will ask you about a license or a key. Please select the “Additional Options” button and enter '''license0.rc.usf.edu''' in the license server field on the next screen.
#When the files are finished copying, the Installer will ask you about a license or a key. Please select the “Additional Options” button and enter '''license0.rc.usf.edu''' in the license server field on the next screen.
Line 25: Line 25:
=== Installing Mathematica On Linux ===
=== Installing Mathematica On Linux ===


#Log into http://mirror.rc.usf.edu/isos/Mathematica/V11.0/ using your NetID and password.  
#Log into http://mirror.rc.usf.edu/isos/Mathematica/V11.1/ using your NetID and password.  
#Download the file named Mathematica_11.0.0_LINUX.sh to a temporary directory on your PC. Once the file has finished downloading you may disconnect from the FTP server.
#Download the file named Mathematica_11.1_LINUX.sh to a temporary directory on your PC. Once the file has finished downloading you may disconnect from the FTP server.
#Next, become root user by using the su command. Then change to the temporary directory where you downloaded the sh file. Inside the temporary directory, run the following command:
#Next, become root user by using the su command. Then change to the temporary directory where you downloaded the sh file. Inside the temporary directory, run the following command:
#*<code># sh ./Mathematica_11.0.0_LINUX.sh</code>
#*<code># sh ./Mathematica_11.1_LINUX.sh</code>
#For the first question (if asked), select (1) for a full installation or hit ENTER.
#For the first question (if asked), select (1) for a full installation or hit ENTER.
#For the second question regarding the installation path we recommend using the default directory. Press ENTER to continue or enter a different installation directory now. The installation should now start. Please be patient as files are copied over.
#For the second question regarding the installation path we recommend using the default directory. Press ENTER to continue or enter a different installation directory now. The installation should now start. Please be patient as files are copied over.
Line 50: Line 50:
Once connected to CIRCE/SC, you can open Mathematica using the steps below:
Once connected to CIRCE/SC, you can open Mathematica using the steps below:


<pre style="white-space:pre-wrap; width:40%; border:1px solid lightgrey; background:#000000; color:white;">[user@login0 ~]$ module add apps/mathematica/11.0
<pre style="white-space:pre-wrap; width:40%; border:1px solid lightgrey; background:#000000; color:white;">[user@login0 ~]$ module add apps/mathematica/11.
[user@login0 ~]$ mathematica</pre>
[user@login0 ~]$ mathematica</pre>


Line 73: Line 73:


module purge
module purge
module load apps/mathematica/11.0
module load apps/mathematica/11.1


math &lt; test.math
math &lt; test.math

Revision as of 19:45, 5 May 2017

Description

Mathematica is the tool of choice at the frontiers of scientific research, in engineering analysis and modeling, in technical education from high school to graduate school, and wherever quantitative methods are used.

Version

  • 11.1

Authorized Users

  • CIRCE account holders
  • RRA account holders
  • SC account holders

Platforms

  • CIRCE cluster
  • RRA cluster
  • SC cluster
  • Workstation/PC

Modules

Mathematica requires the following module file to run:

  • apps/mathematica/11.1

Installation

Installing Mathematica On Windows

  1. Log into http://mirror.rc.usf.edu/isos/Mathematica/V11.1/ using your NetID and password.
  2. Download the Windows ZIP file to a temporary directory on your PC. Once the file has finished downloading you may disconnect from the FTP server.
  3. Start the Mathematica_11.1_WIN.exe executable, and click on “Install Mathematica to a hard disk.”
  4. On the next screens, select an install location and make sure the installation type is set to “Install all components” and click “Install”
  5. When the files are finished copying, the Installer will ask you about a license or a key. Please select the “Additional Options” button and enter license0.rc.usf.edu in the license server field on the next screen.
  6. Click OK.

Installing Mathematica On Linux

  1. Log into http://mirror.rc.usf.edu/isos/Mathematica/V11.1/ using your NetID and password.
  2. Download the file named Mathematica_11.1_LINUX.sh to a temporary directory on your PC. Once the file has finished downloading you may disconnect from the FTP server.
  3. Next, become root user by using the su command. Then change to the temporary directory where you downloaded the sh file. Inside the temporary directory, run the following command:
    • # sh ./Mathematica_11.1_LINUX.sh
  4. For the first question (if asked), select (1) for a full installation or hit ENTER.
  5. For the second question regarding the installation path we recommend using the default directory. Press ENTER to continue or enter a different installation directory now. The installation should now start. Please be patient as files are copied over.
  6. For the last question about executable scripts, just press enter. if the installer says files already exist, select (1) or press ENTER to overwrite the old files.
  7. The next question asks if you would like to install a password. Please enter 2 for Network License. When the installer asks for a license server, please enter license0.rc.usf.edu and press enter.
  8. Once the installation is complete, you should be able to type in mathematica at the command line to start the program. If this does not work, you will have to add ‘/usr/local/bin’ to your path. Please edit your .bashrc file and add the line
    • PATH=$PATH:/usr/local/bin.
  9. Re-login to your computer and issue the mathematica command.
  10. The application launcher asks for a license key. Please select the “Additional Options” button and enter license0.rc.usf.edu in the license server field on the next screen.

Running Mathematica on CIRCE/SC

The Mathematica user guide is essential to understanding the application and making the most of it. The guide and this page should help you to get started with your simulations. Please refer to the Documentation section for a link to the guide.

  • Note on CIRCE: Make sure to run your jobs from your $WORK directory!
  • Note: Scripts are provided as examples only. Your SLURM executables, tools, and options may vary from the example below. For help on submitting jobs to the queue, see our SLURM User’s Guide.

Submitting a Job

There are two ways to run Mathematica on CIRCE depending on the runtime of your particular job.

Jobs Shorter than 20 Minutes in Length

Establishing a GUI connection to CIRCE/SC

To use Mathematica, you will need to connect to CIRCE/SC with GUI redirection, either using:

  • CIRCE/SC Desktop Environment
  • SSH with X11 redirection
    • If connecting from OSX or Linux via SSH, please ensure that you use one of the following commands to properly redirect X11:
      • [user@localhost ~]$ ssh -X circe.rc.usf.edu
        or
      • [user@localhost ~]$ ssh -X sc.rc.usf.edu

Once connected to CIRCE/SC, you can open Mathematica using the steps below:

[user@login0 ~]$ module add apps/mathematica/11.
[user@login0 ~]$ mathematica

Jobs Longer than 20 Minutes in Length

To run Mathematica jobs on CIRCE/SC, users will need to submit their jobs to the scheduling environment if their jobs take more than 20 minutes to run on a standard PC.

If, for example, you have a Mathematica script file named test.math with all your functions defined in it, you would set up a submit script to use the Mathematica kernel like this:

  • The script below (for testing, name it “mathematica-test.sh”) can be copied into your job directory (the folder with your input files) and modified so that you can submit batch processes to the queue.
#!/bin/bash
#
#SBATCH --comment=mathematica-test
#SBATCH --ntasks=1
#SBATCH --job-name=mathematica-test
#SBATCH --output=output.%j.mathematica-test
#SBATCH --time=00:30:00

#### SLURM 1 processor Mathematica test to run for 30 minutes.

module purge
module load apps/mathematica/11.1

math < test.math

 
Next, you can change to your job’s directory, and run the sbatch command to submit the job:

[user@login0 ~]$ cd my/jobdir
[user@login0 jobdir]$ sbatch ./mathematica-test.sh
  • You can view the status of your job with the “squeue -u <username>” command

Mathematica Notebook files

If you’re using Mathematica notebook files (.nb) and you wish to submit the job to CIRCE, you must first convert the notebook file to a Mathematica package file.

Please use the following steps to convert a notebook file to a standard Mathematica package.

  1. Open the notebook file in Mathematica.
  2. Clear out any solved calculations.
  3. Click on “Edit” and then “Select all”.
  4. Click on “Cell”, “Cell Properties”, and then select “Initialization Cell”.
  5. Click on “File”, “Save as”, and then change “Files of type” to “Mathematica Package”.

You’ll then use the file you just saved as an input file using the CIRCE submission sample above, e.g. “math < filesaved.m”.

Documentation

Home Page, User Guides, and Manuals

More Job Information

See the following for more detailed job submission information:

Reporting Bugs

Report bugs with Mathematica to the IT Help Desk: rc-help@usf.edu