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.
At the moment there are two versions of Maple installed:
$ module spider Maple ... Versions: Maple/2022 ...
If you want to use Maple on the HPC cluster, you have to load the related module. This is simply done with
$ module load Maple
which will load the default version of Maple (usually the latest version). If you want to load a specific version, you must add the desired version, e.g. with
$ module load Maple/2022
Always remember: modules names are case-sensitive, so loading them needs proper case spelling.
However, searching for modules with available or spider is not case-sensitive.
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 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
If you have done everything corretly, the *.err-file will 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
Additional documentation for Maple can be found on the Maple web site, where you can find a User Guide and a Programming Guide.