Maple 2016

From HPC users
Jump to navigationJump to search

Introduction

Maple is math software that combines the world’s most powerful math engine with an interface that makes it extremely easy to analyze, explore, visualize, and solve mathematical problems. With Maple, you aren’t forced to choose between mathematical power and usability, making it the ideal tool for both education and research.

Installed version

At the moment there are two versions of Maple installed:

  • 18
  • 2016

Using Maple

If you want to use Maple on the HPC cluster, you have to load the related module. Since there is more than one version installed, you also have to specify which version you would like to load:

module load maple/2016

If you want to load a different version, you will just need to replace the part after "/" with the desired version, e.g.

module load maple/18

Always remember: modules names are case-sensitive and trying to load maple with the command

module load MaPLe/2016 

will always result in a Lmod error!

Using Maple with the HPC cluster

Since there many people working with the HPC cluster, its important that everyone has an equal chance to do so. Therefore, every job should be processed by SLURM. For this reason, you have to create a jobscript for your tasks.

You can use the following example to build your own jobscript for a maple job. Keep in mind that you will most likley have to adjust the specified memory or the amount of nodes/tasks/cpus or time:

#!/bin/bash
               
#SBATCH --ntasks=1                  
#SBATCH --mem=2G                  
#SBATCH --time=0-2:00  
#SBATCH --job-name MAPLE-TEST              
#SBATCH --output=maple-test.%j.out        
#SBATCH --error=maple-test.%j.err          
 
module load maple/18 

maple < example.mpl

The file "example.mpl" contains the following lines of code:

myseries := series(sin(x), x = 0, 10);
poly := convert(myseries, polynom);
plot(poly, x = -2*Pi .. 2*Pi, y = -3 .. 3);

This testjob runs for about 10 seconds. After the sucessful finish of the job, you should find two new files in the directory from where you started:

  • maple-test.JOBID.out and
  • maple-test.JOBID.err

The *.err will most likely be empty. The output of the testjob will be in the *.out-file and will look like this: |\^/| Maple 18 (X86 64 LINUX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2014 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > myseries := series(sin(x), x = 0, 10); 3 5 7 9 11 myseries := x - 1/6 x + 1/120 x - 1/5040 x + 1/362880 x + O(x ) > poly := convert(myseries, polynom); 3 5 7 9 poly := x - 1/6 x + 1/120 x - 1/5040 x + 1/362880 x > plot(poly, x = -2*Pi .. 2*Pi, y = -3 .. 3); 3+ H + H + HH 2+ H + H + HH + H 1+ HHHHHHHHHH H HHHHHHHH + HHH HHH H HH HHH +HHH HH HH --+-+-+-*+-+--+-+-**-+-+--+-+-+--+-+-**-+-+--+-+-+--+-+-**-+-+--+-+*-+-+-+-- -6 H -4 HH -2 H0* 2 HHH 4 HH 6 H HHH HHH + HHHHHHHH H HHHHHHHHHH -1+ H + HH + H + H -2+ H + H + H -3+ > quit memory used=3.9MB, alloc=40.3MB, time=0.11

Documentation

Maple 18: User Manual

Maple 2016: User Manual

A PDF-viewer is required for both documentations.