# Items tagged with performanceperformance Tagged Items Feed

### Maple took long time to give results...

December 18 2015
0 4

Hi, Im now trying to run my code. But it took like years to even getting the results. may I know any solutions on how to get faster results? Because I have run this code for almost 4 hours yet there is still 'Evaluating...' at the corner left. And when I tried to stop the program, it will stop at 'R1...'.

Digits := 18;
with(plots):n:=1.4: mu(eta):=(diff(U(eta),eta)^(2)+diff(V(eta),eta)^(2))^((n-1)/(2)):
Eqn1 := 2*U(eta)+(1-n)*eta*(diff(U(eta), eta))/(n+1)+diff(W(eta), eta) = 0;
Eqn2 := U(eta)^2-(V(eta)+1)^2+(W(eta)+(1-n)*eta*U(eta)/(n+1))*(diff(U(eta), eta))-mu(eta)*(diff(U(eta), eta, eta))-(diff(U(eta), eta))*(diff(mu(eta), eta)) = 0;
Eqn3 := 2*U(eta)*(V(eta)+1)+(W(eta)+(1-n)*eta*U(eta)/(n+1))*(diff(V(eta), eta))-mu(eta)*(diff(V(eta), eta, eta))-(diff(V(eta), eta))*(diff(mu(eta), eta)) = 0;
bcs1 := U(0) = 0, V(0) = 0, W(0) = 0;
bcs2 := U(4) = 0, V(4) = -1;
R1 := dsolve({Eqn1, Eqn2, Eqn3, bcs1, bcs2}, {U(eta), V(eta), W(eta)}, initmesh = 30000, output = listprocedure, numeric);
Warning, computation interrupted
for l from 0 by 2 to 4 do R1(l) end do;
plot1 := odeplot(R1, [eta, U(eta)], 0 .. 4, numpoints = 2000, color = red);

### Maple always stays in "Evaluating..."...

December 15 2015
0 6

There are dozens of indefinite integral expressions in my worksheet. Everytime I execute the entire worksheet, the cursor always rests beside one indefinite integral expreesion and Maple stays in "Evaluating...". Even 30 minutes passed, the result of the integral couldn't come out. What bothers me is that the cursor would rest beside different indefinite integral expressions. For example, I write 4 indefinite integral expressions A, B, C and D one by one. First time, the results of A, B and C come out and the cursor rests beside D with "Evaluating...". Next time, the results of A and B come out and the cursor rests beside C with "Evaluating...".

Before the indefinite integral expressions, I wrote dozens of lines of codes aiming at assigning values to variables. As I typed more and more indefinite integral expressions into the worksheet, even evaluating the codes aiming at assigning values would spend more and more time.

Does Maple evaluate the codes line by line from the top to the end of a worksheet? If it is true, why evaluating the codes before the indefinite integral expressions becomes slowly?

How to evaluate the entire worksheet without stuck in one indefinite integral expression?

### Difference in computer speed ...

November 29 2015
1 9

Hello,

I was wondering why there is difference in computer speed between two almost the same calculations.

Example:

61! + 1 costs 271 sec and 59! + 1 almost 0? Why is that? When there are small prime factors, the

calculation goes often faster, why? hanks in advance!

### Increasing CPU usage...

November 06 2015
0 2

Hi

When I run a maple file it uses 25% of CPU.

When I run 2 files, the half of CPU is used.

How can I change the preferences for using most of CPU

### How do I improve the performance of Maple 18 for s...

September 26 2015
3 4

I am trying to use Maple 18 to do some computations with matrices over a ring of polynomials in one variable over the integers $\mathbb{Z}[x]$, or the corresponding field of fractions $\mathbb{Q}(x)$.

The matrices in question are of dimension approximately 5000 and are sparse. The algorithm requires at least as many matrix multiplications as the dimension of the space.

Doing some small examples, of dimension 674, with a laptop (i7-3520 M CPU @2.9GHz with 8GB of Ram) gave the following disappointing result:

time(LinearAlgebra[MatrixMatrixMultiply](A,A);

34.694

When a colleague with access to a Mathematica license performed an identical calculation using sparse matrices in Mathematica, we found that Mathematica performed the calcuation in fractions of a second.

In small dimensional examples, constructing the matrices over the field of fractions as sparse in Maple 18 resulted in a four fold decrease in the already disappointing performance of the LinearAlgebra package in Maple 18.

Is there any way to improve the computational performance of Maple 18 for symbolic linear algebra? Alternatively, is the performance of Maple 2015 for symbolic linear algebra noticably better than Maple 18?

Dave

### Which PCs provide fastest Maple execution...

September 19 2015
2 5

My 5 year old laptop executes some commands very slowly e.g. plottools(rotate) around a line which is not a Cartesian axis. I intend to buy a new desktop. Which off-the-shelf desktops provide the fastest processing of Maple commands which do not include large data sets? Which provide the best price/performance?

### Maple 13 fast, Maple 18 crawling...

February 27 2015
1 29

Hi everyone,

Consider the following worksheet (Maple 13):

Euler.mw

Choose execute entire worksheet on both Maple 13 and Maple 18.

Maple 13 is blindingly fast at 40 seconds, entire wroksheet upon completion

Maple 18 crawls and hangs forever.

Can anyone recognise what the problem with Maple 18 is?

Running on a two core 1.7GHz AMD Athlon.

Many thanks

--

Yiannis

### Some Numerical Performance Difficulties...

September 09 2014
0 0

I have an indexed equation that contains serval definite integrals in it. I want maple to evaluate the equation for different indices. But when I set the parameter "N=100" in the code, it takes maple lots of time for the evaluation. I am looking for some tricks to make the code numerically more efficient. I will be so thankful for any opinion and help.
you can find my code below. The code is so simple and just contains few lines. I will appreciate any help.

Numerical_Performance.mw

### reducing computation time...

June 12 2014
2 5

I have a long and complicated expression (say Eq1). I have to solve the two equations (obtained by taking real and imaginary parts of Eq1) for two unknowns. Normally it take around a day on my i5 (3.1 GHz, 4 cores), 8gb ram desktop. I looked into posts related to parallel programming but couldn't get much to reduce the computation time. Is there a way to reduce the computation time ?

November 13 2013
2
0

I made a small change to the Task Filtering code I uploaded a few weeks ago.  The new code has better memory performance and, most importantly has more stable memory usage which means it can actually run very large examples.  Here is the new version of the code:

FilterCombPara := module( )    local ModuleApply,            doSplit,            splitCombs,            makeNewPrefix,            lessThanX,            filterCombs;    lessThanX := proc( x, i ) x<=i; end;    doSplit := proc( i::integer, prefix::set(posint), rest::set(posint),                                                k::posint, filter::appliable, $) splitCombs( prefix union {i}, remove( lessThanX, rest, i ), k-1, filter ); end; splitCombs := proc( prefix::set(posint), rest::set(posint), k::posint, filter::appliable,$ )        if ( numelems( rest ) < k ) then            NULL;        elif ( k = 1 ) then            filterCombs( prefix, rest, filter );        else            op( Threads:-Map( doSplit, rest, prefix, rest, k, filter ) );        end;    end;    makeNewPrefix := proc( i, prefix ) { i, op( prefix ) } end;    filterCombs := proc( prefix::set(posint), rest::set(posint), filter::appliable, $) local i, f; op(select( filter, map( makeNewPrefix, rest, prefix ) )): end; ModuleApply := proc( n::posint, k::posint, filter::appliable,$ )        [ splitCombs( {}, {seq( i,i=1..n )}, k, filter ) ];    end;end:

This code has the small mapping functions as module members instead of declared inline.  This means that less memory is churned as this code is excuted.  For a long runs, this helps keeps the memory stable.

As an example, I ran the following example:

> CodeTools:-Usage( FilterCombPara( 113,7, x->false ) );
memory used=17.39TiB, alloc change=460.02MiB, cpu time=88.52h, real time=20.15h                                                  []

It used 88 CPU hours to run, but only 20 hours of real time (go parallelism!)  It used 17 Terabytes of memory, but only allocated 500 M.  This example is pretty trival, as the filter returned false for all combinations, so it did not collect any matches during the run.  However as long as the number of matches is small, that shouldn't be an issue.  If the number of matches is too large to fit in memory, then this code may need to be modified to write the matches out to disk instead of trying to hold them all in memory at once.

Darin

-- Kernel Developer Maplesoft

FilterComb.mw

### Maple 17: High Performance Polynomials...

April 29 2013 Maple
12
0

As described on the help page ?updates,Maple17,Performance, Maple 17 uses a new data structure for polynomials with integer coefficients. Our goal was to improve the performance and parallel speedup of polynomial algorithms that underpin much of the system and create a platform for large scale polynomial computations. Shown below is the new representation for 9xy3z

### Animations in Maple lacking something...

October 21 2012 Maple
3
6

Dear Maple users

I have had Maple creating graphics for me that I cannot do in other programs I have access to: 3D pictures of circle waves interferring or even the result of an interference pattern from a diffraction grating in Physics. But when it comes to simple animations, I am not all that impressed.

Basicly I have three complaints:

a)  Maple seems to use a lot of space to save frame information, resulting in large filesizes.

### Matrix/Array access: order can be important...

June 06 2012 Maple
7
0

Way back in Maple 6, the rtable was introduced. You might be more familiar with its three types: Array, Matrix, and Vector. The name rtable is named after "rectangular table", since its entries can be stored contiguously in memory which is important in the case of "hardware" datatypes. This is a key aspect of the external-calling mechanism which allows Maple to use functions from the NAG and CLAPACK external libraries. In essence, the contiguous data portion of a hardware datatype rtable can be passed to a compiled C or Fortran function without any need for copying or preliminary conversion. In such cases, the data structure in Maple is storing its numeric data portion in a format which is also directly accessible within external functions.

You might have noticed that Matrices and Arrays with hardware datatypes (eg. float[8], integer[4], etc) also have an order. The two orders, Fortran_order and C_order, correspond to column-major and row-major storage respectively. The Wikipedia page row-major  explains it nicely.

There is even a help-page which illustrates that the method of accessing entries can affect performance. Since Fortran_order means that the individual entries in any column are contiguous in memory then code which accesses those entries in the same order in which they are stored in memory can perform better. This relates to the fact that computers cache data: blocks of nearby data can be moved from slower main memory (RAM) to very fast cache memory, often as a speculative process which often has very real benefits.

What I'd like to show here is that the relatively small performance improvement (due to matching the entry access to the storage order) when using evalhf can be a more significant improvement when using Maple's Compile command. For procedures which walk all entries of a hardware datatype Matrix or multidimensional Array, to apply a simple operation upon each value, the improvement can involve a significant part of the total computation time.

What makes this more interesting is that in Maple the default order of a float[8] Matrix is Fortran_order, while the default order of a float[8] Array used with the ImageTools package is C_order. It can sometimes pay off, to write your for-do loops appropriately.

If you are walking through all entries of a Fortran_order float[8] Matrix, then it can be beneficial to access entries primarily by walking down each column. By this I mean accessing entries M[i,j] by changing i in ther innermost loop and j in the outermost loop. This means walking the data entries, one at a time as they are stored. Here is a worksheet which illustrates a performance difference of about 30-50% in a Compiled procedure (the precise benefit can vary with platform, size, and what else your machine might be doing that interferes with caching).

Matrixorder.mw

If you are walking through all entries of an m-by-n-by-3 C_order float[8] Array (which is a common structure for a color "image" used by the ImageTools package) then it can be beneficial to access entries A[i,j,k] by changing k in the innermost loop and i in the outermost loop. This means walking the data entries, one at a time as they are stored. Here is a worksheet which illustrates a performance difference of about 30-50% in a Compiled procedure (the precise benefit can vary with platform, size, and what else your machine might be doing that interferes with caching).

Arrayorder.mw

### Maple Program runs too slow...

May 08 2012
0 0

Based on the title, once again I'll mention that the programm that I have been made by using

Maple14 could not run faster.

The function of Maple should be running effectively compared to others.

Hereby, I'll attach the programm for your further action.

That's all, thank you.

### Using Maple to solve a tridiagonal large linear sy...

March 30 2012
0 1

I have to solve a linear system

in Maple. A is a tridiagonal matrix.

My problem is that my matrix A is big and therefore, I have to wait too long. Is there some function in Maple that can help this problem?

 1 2 3 4 Page 1 of 4
﻿