acer

33183 Reputation

29 Badges

20 years, 201 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Carl Love Yes, I mean the garbage-collector of the JVM, which is distinct from Maple's kernel's garbage collector. The JVM garbage-collector does memory management of objects in the GUI's (JVM's) memory space.

Something like a PLOT3D Maple structure is stored internally in the Maple kernel as a DAG, when constructred via a Maple command. But when "printed" by Maple command the kernel sends it to the GUI which stores it in its own internal representation. Such objects in the JVM are managed by the JVM's own memory management system (the JVM's garbage collector) and that has little-to-nothing to do with whether the Maple kernel still has a reference to its own internal DAG representation. They are quite separate things.

If you look at this tutorial (in in particular the "Key Hotspot Components" in the "Exploring the JVM Architecture" tab) you can find where it states, "The heap is where your object data is stored. This area is then managed by the garbage collector selected at startup. Most tuning options relate to sizing the heap and choosing the most appropriate garbage collector for your situation."

In some older versions of Maple, depending on the JRE version in use, it was sometimes better for Maple's Java GUI's performance to allocate a larger JVM heap. That could sometimes be done with an edit to Maple's GUI's initialization file (not the user's Maple language initialization file, confusingly known by the same kind of name). But note that, with some versions, the JVM wouldn't start if this was set too high (see also Search results on Mapleprimes for keyword maxheap). I don't advise anyone to mess with that stuff unless their GUI doesn't launch with default settings.

If I recall Maple 2016 uses "Java 8", ie. some version 1.8.xx. On Windows 7 and 64bit Linux I can execute the following 1D plaintext Maple command (if system calls are enabled in GUI Options) from within my Maple 2016.1 to determine the Java version in use.

system(cat(kernelopts(':-mapledir'),"/jre",
    `if`(kernelopts(':-platform')="windows",
         "/bin/java.exe",
         cat(".",StringTools:-SubstituteAll(kernelopts(':-system')," ","_"),
             "/bin/java")),
    " -version")):

That shows something like java version "1.8.0_66" in my 64bit Linux Maple 2016.1, while it showed java version "1.6.0_45" in my 64bit Linux Maple 2015.2.

I suspect that the switch from Java 6 to 8 has improved GUI performance, and some of that may [1, 2] be due to improved JVM garbage colleciton.

@Markiyan Hirnyk I thought that you'd be interested in a shorter example (of your bivariate example with the spurious solution of z=0).

From your problematic example above I first got here:

restart;                
ee := x-(x*(x-z))^(1/2):
solve( ee, {z} );       
                                                          {z = 0}

eval(ee, %);            
                                                              2 1/2
                                                        x - (x )

And from there I got to my univariate example above.

For anyone finding this Question by searching, a variation on using the caption option, with color and multiple lines, is here.

@Markiyan Hirnyk  hmm

solve( x - (x^2)^(1/2) );
                                        x

@John Fredsted It's a bug in DifferentialGeometry (not the interface), that it does not correctly reset the prompt through a call to the interface.

pagan also showed the convert to list and `+`,... in a recursive solution in an answer made in 2009. I see nothing new in Omer's answer.

@Carl Love Sure, thanks. I deliberately kept the explciit seq call, with its index, to try and make it more clear for the OP.

@MAHMOUDHM And I deleted that duplicate of this question. Please add your additional details here, rather than spam the site with duplicate posts.

@Carl Love  Over the past few years I have submitted several request/bug reports about the need for more examples of the great power of this very popular command, but sadly to little avail. Another vote up.

@MortenZdk  Where does the documentation suggest demoting Digits for the purpose only of controlling the format of display of floats!?

Can you modify that `exportplot` procedure to assign the temp filename string (fully qualified) to a global variable, or to return that string?

acer

@Østerbro  Sorry I am away and will not have maple/computer access until Aug 13. 

What you want can be done. E.g. using convert unit_free to separate and simplify the unit terms and the the other process to handle the rest.

@Adam Ledger Please upload any edited revision of your worksheet in a new Comment on this thread (use a new filename, say), rather than in a whole new Post. That way Carl's comments will still be associated with it.

@Carl Love If it is expected behavior that numcpus can only be set once per session then certainly the help page for the kernelopts command should mention that fact (and on the same help page some other key should be used to illustrate the way that kernelopt's return value is the previous value for the given key, etc).

@Carl Love When doing some experiments a few years ago I recall noticing that I could only get the kinds of expected performance difference if I set kernelopts(numcpus) once per restart, before doing other computations. I was likely doing this on 64bit Linux.

However I have not tried that recently. And the computations I was doing were likely hardware double-precision under evalhf or Compiled procedures running in Threads:-Task (or, less likely, double-precision LinearAlgebra) all inplace on float[8] rtables with no garbage collection.

I may even have set kernelopts(numcpus) from the Startup Region of a Document. I don't recall the full details. But I did see the expected performance scaling, from 1 up to the number of physical cores.

I don't know what's going on with Threads:-Mul or Threads:-Add however, even on a given platform, including the case of exact computations that includes garbage collection.

First 310 311 312 313 314 315 316 Last Page 312 of 607