Difference between revisions of "Maple 2016"

From HPC users
Jump to navigationJump to search
 
(15 intermediate revisions by 3 users not shown)
Line 6: Line 6:


At the moment there are two versions of Maple installed:  
At the moment there are two versions of Maple installed:  
*'''18'''
<pre>
*'''2016'''
$ module spider Maple
...
    Versions:
        Maple/2022
...
</pre>


== Using Maple on the HPC cluster ==
== 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:
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/2016
  $ module load Maple
If you want to load a different version, you will just need to replace the part after "/" with the version, e.g.  
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/18
  $ module load Maple/2022
'''Always remember:''' modules names are case-sensitive and trying to load maple with the command
'''Always remember:''' modules names are case-sensitive, so loading them needs proper case spelling. <br>
  module load MaPLe/2016
However, searching for modules with <tt>available</tt> or <tt>spider</tt> is not case-sensitive.
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
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'''
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:
<pre>
    |\^/|    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
</pre>


== Documentation ==
== Documentation ==


'''Maple 18''': [http://www.maplesoft.com/documentation_center/maple18/UserManual.pdf User Manual]  
Additional documentation for Maple can be found on the [https://de.maplesoft.com/documentation_center/index.aspx Maple web site], where you can find a User Guide and a Programming Guide.
'''Maple 2016''': [https://www.maplesoft.com/documentation_center/maple2016/UserManual.pdf User Manual]
 
A PDF-viewer is required for both documentations.

Latest revision as of 12:40, 30 September 2022

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:

$ module spider Maple
...
     Versions:
        Maple/2022
...

Using Maple

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
  • maple-test.JOBID.err

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

Documentation

Additional documentation for Maple can be found on the Maple web site, where you can find a User Guide and a Programming Guide.