From Documentation
Jump to: navigation, search
(University Waterloo Site License: remove)
(Grid Computing Toolbox License (expired))
Line 52: Line 52:
  sqsub -q serial [ -f bul ] -o mycode.log -r 2.5h --mpp=5G maple mycode.mpl
  sqsub -q serial [ -f bul ] -o mycode.log -r 2.5h --mpp=5G maple mycode.mpl
==Grid Computing Toolbox License (expired)==
==Example Code==
A free trial license for MAPLE 16 and the Grid Computing Toolbox provided by Maplesoft is available on  '''orca'' for all SHARCNET users. The usage instructions are
=== Version Selection ===
On orca:
module load maple/16
Once loaded the "which maple" command should return:
===Job Submission===
One in general shall run Maple code (and any code) as a "job" by submitting it to the batch job scheduler. The job scheduler will start your job at a later time once the resources requested, being the CPU(s) or memory size, become available and can be dedicated to your code.
Prepare your Maple input file, name.mpl, in your /work directory, and submit the job from the input file directory.
For example, I have the input file 'l00.mpl', use sqsub command (--mpp is to reserve memory, see 'sqsub -h' for details)
sqsub --mpp=1g -r 1.0h -o l00.mpl.log maple l00.mpl
To run Grid, you need to code with Grid, assuming the input file is 'prime2.mpl', use 4 nodes each with 2 cpus (8 cpus in total) to run your job, the sqsub command will be
sqsub -q mpi -N 4 --ppn 2 --mpp=1g -r 1.0h -o prime2.mpl.log gridlaunch prime2.mpl
===Example Code===
The following is a Maple code checking prime numbers (prime2.mpl)
The following is a Maple code checking prime numbers (prime2.mpl)

Revision as of 13:28, 15 May 2019

The content on this software page is still in use for running software on goblin . Do not delete.

Description: A sophisticated computer algebra system for symbolic and numerical computing
SHARCNET Package information: see MAPLE software page in web portal
Full list of SHARCNET supported software


Maple is a sophisticated computer algebra system for symbolic and numerical computing. Maple Release 16 includes thread and grid toolboxes that support parallel processing on multicore systems and clusters. Access to Maple software is restricted to users from institutions with a site licenses and sharcnet hardware, therefore the below instructions are institution specific. Contact your home institution IT department for license information - for parallel processing on clusters a license supporting the Grid Computing Toolbox (GCT) is required.

Western University Site License

Maple 16 is available on and several visualization workstations on Western's campus for use by researchers in the uwo_users Sharcnet group.

Version Selection

module load maple/16

Graphical Usage

Login to, or using tigervnc load the maple module then run command:


Interactive Usage

Login to goblin, or preferably, or using ssh load the maple module then run command:



[roberpj@gb241:~] module load maple/16

[roberpj@gb241:~] maple
    |\^/|     Maple 16 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2012
 \  MAPLE  /  All rights reserved. Maple is a trademark of
 <____ ____>  Waterloo Maple Inc.
      |       Type ? for help.
> 2+2;
> quit

Job Submission

To run Maple code on goblin load the maple module then run command:

sqsub -q serial [ -f bul ] -o mycode.log -r 2.5h --mpp=5G maple mycode.mpl

Example Code

The following is a Maple code checking prime numbers (prime2.mpl)

primeChecker := proc()
  uses Grid;
  local nn, thisNode, i, myVal, rslt, rply, t1, t2, b1;

  nn := NumNodes();
  printf("NumNodes = %a\n", nn);
  thisNode := MyNode();
  printf("MyNode = %a\n", thisNode);
  myVal := rand(1001..10001)();
  printf("Value     %a\n", myVal);

  b1:= isprime(myVal);
  rslt := [ ifactor(myVal), b1];
  printf("Computed Result = %a\n", rslt);
  if thisNode <> 0 then
     printf("Node %d sending   %a\n",thisNode, rslt);
     Send(0, rslt);
     rply := NULL;
     rply := rslt;
     t1 := time[real]();
     for i from 1 to (nn-1) do
        printf("Node %d waiting for Receive\n",thisNode);
        rslt := Receive(i);
        printf("Received     %a\n", rslt);
        rply := rply, rslt;
        t2 := time[real]();
        t1 := t2;
     end do;
     printf("Sample points = %a\n",[rply]);
  end if;
  printf("Node %d done, rply = %a \n",thisNode,[rply]);
  return [rply];
end proc:

#!ls /opt/sharcnet/openmpi/1.6.2/intel/lib/openmpi

Grid:-Setup("mpi", 'mpidll'="mpi", 'mpiwrapper'="mpiwrapper" ):
seq( primeChecker(), i=1..10):

For more examples, login to any SHARCNET system and navigate to


General Notes

Process Limit Error

If one encounters the following error when invoking maple

Maple initialization error, maple: process limit must be at least 50

this indicates the number of user processes allowed on the system is less than 50, one needs to raise the process limit with command

ulimit -u 100

if this fails, contact the system administrators.

Grid Computing Toolbox

For Maple coding issues please go to Maplesoft website for help.