[go: up one dir, main page]

Items tagged with kernelopts

Feed App Center

(Tested on Maple 2021.1 and 2024.0, on Mac)

I want to write a Maple procedure that takes advantages of the latest features but doesn't break on older versions of Maple.

So I can write something like this:

   if version() >= VERSION then new_method else old_method end if

This works, but it has the problem that the version( ) command not only returns a version number but also writes three lines to the screen, like this:

 User Interface: 1794891
         Kernel: 1794891
        Library: 1794891

I don't want those lines to appear every time the procedure is used but I don't know how to make them go away.  Is there a way, or is there a better approach to achieving what I want?

Thanks, Brendan.

Let's say I have an mpl file and in this file there are several lines $include<~/~/~.mpl> and in some of those called mpl files, there are also some more include lines. And assume the paths of these files are given relative to a specific folder. Now I guess this specific folder has to be mentioned by modifying includepath. But looking at the help pages related to includepath (here and here) I get this sentence "it can be modified by calling kernelopts(includepath)", but I tired typing things like kernelopts(includepath):="C:\\Homes\\testFolder"; and still I see "" for kernelopts(includepath);. How can I tell Maple to look for the files relative to this location either by typing something at the Maple worksheet before typing read("C:\\Home\\testFolder\\main.mpl); or by adding a line at my main mpl file?

Error

can not raise the datalimit above hard limit

 

my new notebook has 32GB memory

kernelopts(datalimit=28*unit(gibibtye)):

do i need to assign datalimit with kernelopts?

and

I remember i set a trick to protected this file

now I can read and run 

but return above error

does it mean that I do not need to set limit?

During running my ws I faced with memory error as below, where as my system have enough memory (120GB)

Warning, Run: unable to set assignto result due to error:  Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

Maple's help suggests :Software limits are imposed by the -T command-line argument, the datalimit argument to kernelopts and system imposed user limits (for example shell limits).
  But I could not understand how to increase software limit.

 

how to fix that?

what would i write if i wanted to display the full list of variables that be specified by calling kernelopts? like as output in the interface, i naively attempted ops(kernelopts)  which didnt work of course.

How can I limit the number of processors that are used by a multi-threaded operation? The help pages ?multithreaded and ?kernelopts both suggest, vaguely, that this can be controlled with kernelopts(numcpus). The following worksheet shows, however, that this doesn't work: While Maple does remember what you set numcpus to, this setting has no effect on the number processors used by Threads. And, if this doesn't work, what purpose is there in being able to set the value of numcpus?

restart:

First, warm-up and stretch the memory. Otherwise, the timings are invalid.

L:= RandomTools:-Generate(list(integer, 2^18)):

CodeTools:-Usage(Threads:-Mul(x, x= L)):

memory used=1.21GiB, alloc change=0.98GiB, cpu time=18.66s, real time=3.75s, gc time=27.54m

Now this is the actual test.

L:= RandomTools:-Generate(list(integer, 2^18)):

gc();

for n to kernelopts(numcpus) do
     print(kernelopts(numcpus= n));
     CodeTools:-Usage(Threads:-Mul(x, x= L), iterations= 4)
end do:

8

memory used=1.21GiB, alloc change=322.34MiB, cpu time=4.04s, real time=933.75ms, gc time=566.41ms

1

memory used=1.21GiB, alloc change=-2.00MiB, cpu time=4.22s, real time=859.50ms, gc time=656.25ms

2

memory used=1.21GiB, alloc change=-1.17MiB, cpu time=4.03s, real time=841.75ms, gc time=566.41ms

3

memory used=1.21GiB, alloc change=256.00MiB, cpu time=4.47s, real time=911.25ms, gc time=738.28ms

4

memory used=1.21GiB, alloc change=0 bytes, cpu time=4.33s, real time=852.50ms, gc time=605.47ms

5

memory used=1.21GiB, alloc change=0 bytes, cpu time=4.34s, real time=853.50ms, gc time=628.91ms

6

memory used=1.21GiB, alloc change=0 bytes, cpu time=4.27s, real time=826.75ms, gc time=535.16ms

7

memory used=1.21GiB, alloc change=0 bytes, cpu time=4.19s, real time=841.50ms, gc time=308.59ms

 

Download numcpus.mw

You'll get equivalent results if you replace Mul by Add and increase the size of L to about 2^24.

Dear all,

 

Let me first explain a problem I've encountered when working with Maple 18 64 bit in Linux (Ubuntu 12.04). I've tried some things to solve it, but unfortunately without succes

When working with the DifferentialAlgebra package I'm encountering a problem concerning memory. Without going into details, I'm using the RosenfeldGroebner function (DifferentialAlgebra/RosenfeldGroebner) . After about 10 minutes of calculation or so, the computation stops with the error message

>> Error, (in DifferentialAlgebra:-RosenfeldGroebner) out of memory error

This particular error does not have a *help*-file, so no help there.

Now, I'm pretty bumped out because of this error, because I'm working on 16 GB RAM computer which is imo quite a lot. Moreover, I have the feeling, that Maple is not using the full capacity of memory. This, is because I was monitoring the memory during the computation (via the System monitor). Before I start the calculation: the memory usage is about 3.6 GiB (=22.8%). During the calculation it slowly rises until about 8GiB (50%) at which the computation stops and the above-mentioned error message pops up. So it looks there's a big part (about 7.5-8 GiB) of memory still available, but isn't used.

So my question is: What are the possibilities to solve this problem. What can I try to do to have more memory available to be able to do the calculation.


Of course I was looking into the possibilities myself. In my experience I found the information found on this forum and on the Maple help files confusing or not very helpful. Probably, because I have little knowledge of programming or computer architecture. Nevertheless I would like to know some things about it. So, iI'll  present what I tried to do:

- The command kernelopts('datalimit') returns the total amout of heap memory in kibibtyes that Maple may consume   
  In my aplication this is set to infinity. So I presume that this could not explain why the program stops at only 50% Memory usage

- The command kernelopts('bytesalloc') returns the total amount of bytes allocated by Maple kernel. This value cannot be set.  Does this attribute pose a limit on calculations or is this  the amount of memory used by the Maple 'overhead'?   
In my application the value of this attribute is 8781824 bytes, so that's about 8 MB. I suppose it is not related to the problem I'm having, or is it? 

The command kernelopts('stacklimit') returns The total amount of stack space avilable. In my application this was initially set to 8160 kibityes. I've changed this to 8160000000, wel beyond the availble memory. I would think that this now would not anymore present a limit on the memory usage.

The command kernelopts('jvmheaplimit') returns the maximum amout of heap memory for the Java virtual machine. I presume this is the maximum amout of memory for the visiualisation part of Maple (is this correct) In my application this was initially set to 65536 kiB. I've changed this to 65536000000 kBib which is well above the available memroy. I would think that this now would not anymore present a limit on the memory usage

The command   kernelopts('cacheclearlimit'); returns the memory for maintaining temporary elements in cache. In my application this was initially 524288 kiB, but i changed this to 524288000000. I would think that, again, the limit on the memory usage would be gone.

I tried the calculation again with the mentioned changes in the memory attributes. Unfortunately, the error message *out of memory error* still popped up at about 50% memory usage.

Did I overlook something?? What can I do?? Is there actually that I can do? Where should I look?

Many thanks !!

Bonjour,

Je veux savoir comment augmenter la mémoire du maple sachant que j'ai un calculateur puissant (4 CPU de 2G pour chacun+2 RAM de 146 G pour chacune).

En vérité, il s'agit de résoudre un système polynomial à 7 équations et 4 variables ; voici les deux messages du Maple après l'exécution : "Kernel connection has been lost" "execution stopped:memory allocation failed.please see ?alloc for more detail."

Quelles sont les paramètres ci-dessous de kernelopts qu'il faut modifier et comment :

===========================================

> kernelopts(maxdigits);

                             38654705646

> kernelopts(wordsize);

                                  64

> kernelopts(dagtag=4);

                                FLOAT

> kernelopts(dagtag=SERIES);

                                  15

> kernelopts(cputime);

                               0.010998

> kernelopts(datalimit=64*Unit( megabyte )):
> kernelopts(datalimit=64*Unit( mebibyte ));

                                62500

> kernelopts(datalimit=10000*Unit( kibibyte ));

                                65536

> kernelopts(datalimit);

                                10000

> kernelopts(cpulimit=10*Unit( minute )):
> kernelopts(cpulimit);

                                 600

============================================
Avec mes plus vifs remerciements,

Gérard.

When mucking around with my Maple setup, I occasionally find it useful to check various kernelopts settings.  To simplify this task, I wrote the simple kerneloptsall procedure, which prints all the (useful) values of kernelopts:

(**) kerneloptsall();
ASSERT                    = false
assertlevel               = 0
Page 1 of 1