grad_stu

50 Reputation

4 Badges

5 years, 162 days

MaplePrimes Activity


These are questions asked by grad_stu

I am using Maple's CodeTools[Usage] to check memory measurement for a few lines of code i have.

One line is calling a custom function and the usage reports ~16 GB usage, the other line is a Groebner Basis computation and reports ~200 MB of memory usage. The usage is reported via 'bytesused' flag in the CodeTools[Usage] input.

However, GNU time command returns 6 GB total for the whole code iteration. Why is there such a discrepancy? Does maple's bytesused mean something different than GNU time's max resident set size?

Has anybody tried Maple 2020.2 on a new Macbook with Apple silicon? I believe native support is in development, i was curious if anyone had experience running Maple via Rosetta 2?

I am trying to run a Groebner Basis computation below in a for loop a few times to get an average running time.

start := time[real]():
gb := Groebner[Basis](polynomials, tdeg(op(vars)), characteristic=2^29-3):
finish := time[real]() - start:

Because Maple apparently caches the result, i was wondering if there is a way to undo this caching? Or better yet, is there a built-in tool taht would do this time measurement multiple times?

Hi, I would like to parallelize the double for loop. I am computing pairwise SPolynomials like so

for i from 1 to n-1 do

for j from i+1 to ndo

spol:=Spol(poly[i],poly[j], tdeg(op(vars))):

...

od:

od: 

I would like to parallelize this code, here is what I have done:

at_node:=proc(p1,p2,vars, polynomials)

spol:=SPolynomial(p1,p2,tdeg(op(vars))):

if NormalForm(spol, polynomials, tdeg(op(vars)))=0

return [1,0]:

fi:

end proc:

Grid[Setup]("local", num_nodes=4):

Grid[Set](at_node): # below is the main loop that fails

for idx from 1 to n-1 do

out:=Grid[Seq](at_node(polynomials[idx], polynomials[j], vars, polynomials) j=idx+1, n):

od:

The loop above fails due to the error when calling normal form. It seems that the at_node function accepts an incorrect input for p1, a list of polynomials instead of a single polynomial. Is there a way to parallelize double for-loop with Grid like that? I am not sure where my error is.

 

 

 

 

 

 

I have a Maple program and i need to call a python script with a specified input (10 integers). The script returns a number that I would like to use in my Maple program afterwards. This is what I would do in shell:

```

result=`python model.py 1 2 3 4 5 6 7 8 9 10`
echo $result

```

Is there a way to get the `result` using Maple? I checked the documentation for Maple and it is not very clear so I appreciate any help on this. Thanks!

1 2 Page 2 of 2