350 Reputation

10 Badges

5 years, 84 days

MaplePrimes Activity

These are questions asked by sand15

 Hi everybody,

Until recently I was using Maple 2015.0 on this PC :

Windows XP
2 dual core proc Intel(R) Xeon(R) CPU E3-1225 V2 ; 3.19 GHz
64 bytes,
16 Go RAM

For two days now I am using Maple 2015.0 on this one

Windows 7
4 dual core proc Intel(R) Xeon(R) CPU 5-2637 V3 ; 3.50 GHz
64 bytes,
64 Go RAM

Comparisons of the running times for exactly the same code, consisting in 10000 independent Monte Carlo  simulations distributed over all the nodes (resp 4 and 8) give :

Windows XP :  504 sec  (with a variation of the order of  +/- 3s for different replicates)

Windows 7   :  343 sec  (with a variation of the order of  +/- 3s for different replicates)

The expected running time should be 504 * (3.2/3.5) * (4/8) = 230 s
(or 504 * (4/8) = 252 s if you neglect the acceleration due to the clock rate)
The realized running time (343 s) is thus at least  40% larger than the expected one.

Does anybody has already observed this kind of performance loss during XP -> 7 migration ?
Are there some comparisons of cpu times between Windows XP and 7 ?

Thank you all for sharing your own experience.

postscript : a NOTIONALexample of how the computations are distributed is given below

NbOfRuns := 10000:

# Data is a Matix(NbOfRuns, NbOfCols, …) constructed elsewhere

NbOfNodes := Grid:-NumNodes():
NbOfRunsPerNode := NbOfRuns / NbOfNodes:
for k from 0 to NbOfNodes do
   FirstData := 1 + k * NbOfRunsPerNode:
   LastData := (k+1) * NbOfRunsPerNode:
   Grid:-Run(k+1, MyCode, [Data[FirstData..LastData, ..], …])
end do:

Hi everybody, 
 My goal is to generate the Matlab code of some Maple function f(x, a, b, …).

The command
  CodeGeneration[Matlab](f, output=string) 
first produces the warning

Warning, the following variable name replacements  were made : a -> cg, b -> cg1, …

plus the desired code

freturn :=f(x, cg, cg1, …)

As you see here the names a, b, … are no longer arguments of f.

I  have searched in the help pages for CodeGeneration (but with no success at all),  a way to force the translation to conserve the original variable names (a, b, …).

First question : Did I missed the information ?
                            (in which case sorry for the inconvenience)
Second question
: If not, does it exist a way to “catch” the warning and thus keep the replacement rules CodeGeneration does ?

Thanks in advance

No need to hurry, esthetics is not a vital issue ... but thanks in advance.

PS : sorry for the syntax errors "waves" generated in the original Word document

This question has been deleted by the author


Good morning everybody.

I have tried Explore to draw plots in an interactive way.

The function I want to draw (plot3d) is automatically constructed by a specific code, as well as the names of the parameters it depends on. These are of the form P||1, P||2, ...P||N (N is an integer determined during the construction)

... but I did not succeed !

After some investigations I was able to reduced the problem to the following one

N  := 2:
F  := add(P||k * x^k, k=0..N):
G := [seq(P||k=-1.0 .. 1.0, k=0..N)]:
Explore(plot(F, x=0..1), parameters=G)

The result is the classical imbedded window with a plot of -1-x_x^2 and three sliders below.
But as soon as I push anu of them the plot disappears and connot be recoverd.

But the following sequence seems to work as expected

N  := 2:
F  := add(P__k * x^k, k=0..N):
G := [seq(P__k=-1.0 .. 1.0, k=0..N)]:
Explore(plot(F, x=0..1), parameters=G)

Before changing my code, could you please confirm me that parameter names such that P||k are not correctly accounted for by Explore ?

Auxiliary question : more generally, are there points which I have to count carefully when I use the P||k construction ?

Thanks in advance

First 14 15 16 17 18 Page 16 of 18