599 Reputation

13 Badges

13 years, 35 days

MaplePrimes Activity

These are replies submitted by itsme

if its a simple x vs f(x) plot, your best option is to simply save to a file (say myplot.png), then open the file in a program that autoupdates on change - this will always give you the latest plot that is generated. 

if you have more complicated plots (and cannot use a gui), then your best option is to export the data from maple and simply plot the data to a file via a separate program (you can write very simple code using matplotlib, or even use gnuplot or equivalent). This is painful because its a two-stage process, but you can automate it by using maple's "system" or "ssystem" calls...


looking at your last screenshot, i should note that of course the best way forward is to know more about what you need to do. For example, instead of calling every command separately from java, it might easier to simply create a maple script (i.e. a text file with a .mpl extension) and call that. One can easily pass variables to such a script using the -c flag. See this post for an example:





I have two Intel Xeon E5504 2.00 GHz - 8 cores/threads in all. And 8 nodes - most efficient mode on my machine in other cases.

yup, makes sense in your case then to use 8.



(I've tried with numnodes=4 - worked normally. But I need full options - 8 nodes and may be more.)

i tried with 4 as well.

on my cpu, maple defaults to 4 nodes. My cpu has 4 cores, but the OS sees it as 8 because of intels hyperthreading... note however that in all the problems i have looked at, forcing maple to use 8 numnodes has resulted in degraded performace (i would expect this - cpu cache, all memory access infrastrucutre, is shared between two hyperthreads on a single core). This behavior is very problem-dependent, but for my tasks, I have found the optimal number of nodes to be 4-5... not more.

What CPU do you have?... unless you really have an 8 core machine (not 4 core / 8 thread one), setting numnodes to a higher number might not be helpful.


 i have set the java heap that maple uses to 2048 MB in the startap maple script

How you did this? Edit launch.ini ?

on linux you can modify the /usr/bin/maple script (at your own risk!). i don't know how this is done in windows.


both the threaded as well as grid calls that you have showed (but with colons at the ends) seem to complete on my machine, without crashing...

i am on linux x86_64... also, i have set the java heap that maple uses to 2048 MB in the startap maple script, but since we don't really know how Grid works behind the scnens it's hard to say if that is what is actually helping - either way you might try it.

other than that, an SCR might be your best bet, as Alejandro points out.

@Carl Love 

yes, Grid:-Set was introduced in 2015, as the grid package was rewritten then - I assumed that's what you were using. Note that my statement still holds for older versions of maple - see this thread:

a maplesoft dev talks about what gets copied and what does not.

... also note, from that thread, Grid:-Map (i don't know about Grid:-Seq) was badly broken before version 2015.


ok i see.

as carl mentioned, you're better off running threaded version of map/seq if you are operating on commands that are thread safe such as these... but I agree that Grid should not break on something as simple.

by the way, which version of maple are you using?


another quick question... how long does the threaded version with the list of 1e7 take to complete on your machine?

@Carl Love 

In the case of Grid, the entire memory space must be copied to each process,

i think this is not true... in fact if one wants variables to get copied over to the other processes, that has to be done explicitly via Grid:-Set.

... although I'm not sure about the actual list that say Grid:-Map is operatintg on - but my guess is that even in that case each process only gets a portion of it that it is operating on.

this is really very nice!...

any ideas how to export these plots along with their colorbars directly?


thanks for your comment.

yup, i did notice that Typesetting:-Typeset indeed does the trick. It could be a good idea to include this info into the docs for typeset however. Right now, there isn't a mention of this kind of behavior in the help page for typeset. The page also does not link to the Typesetting package.



@Alejandro Jakubi 

if you're implying running maple from command line, and exporting from there (i.e., via plotsetup), then i would strongly advise against this. plotting from cli is completely broken in maple.


yup, things seem to align more reasonably now. Thanks for submitting a bug report about this.


The OP's first post was titled Euler-Lagrange equations,

I somehow missed the OPs title - i don't even know how that is possible since i had to click it... long day maybe.  ..which would make your link fully relevant - my bad.



I included the link to be sure we're talking about the same help page - those can change from release to release.

Well, at least I understood that the OP wants to know how to differentiate a function with respect to a variable that itself is a function.

Finding EL equations in general would of course not be the same thing...

While this is clearly not the case in the F that OP defines, if one had a slightly modified version such as say

F:=D(y)(x)^2-y(x)^2+2*y(x)*x^2  + ((D@@2)(y)(x))^2;

then the EulerLagrange will (as expected) give a different results than Physics[diff]:


convert(Physics[diff](F, D(y)(x)), diff); #different than above!

Your code clearly works here, but to be honest I'm not sure that you're using the EulerLagrange method as intended - I would guess that the third argument is not expected to be a derivative. Note also that if F was defined in terms of the "diff" operator and not "D", your code would not work.

P.S. I think your y should be y(x) in the last term of F - this has no effect on the discussion (so far).


while certainly relevant, IMO that help page is not particularly helpful in answering OP's question.

See for yourself:

@Carl Love 

yup - agreed. i also check the copied results... but as long as only "standard" variable names are used (this includes ones with double underscores), copy/pasting seems fairly reliable.

4 5 6 7 8 9 10 Last Page 6 of 16