mthkvv

160 Reputation

3 Badges

6 years, 130 days

MaplePrimes Activity


These are replies submitted by mthkvv

@Carl Love 

Not entire. By the way in this case Maple crashed (or freezed less often) when consuming of memory less than 50%.

@itsme 

the first thing you might want to try is getting rid of the semicolon at the end of these calls, and use a colon in stead (but maybe assign the result to a variable). 

I've tried all of this variants. With the same result.

 

is it possible that in the thread case you actually did not have a semicolon, while in the grid case you did??

No.

@Carl Love 

It's very doubtfully.

Otherwise, in this case I'm talking about a comparison between Threads:- and Grid:- Map/Seq. Threads executed perfectly but Grid look like has a bug - unstable in working with large size of data.

@Carl Love 

What is the point of using Grid:-Seq (or even seq) for a sequence of length 1?

This is the only working mode that I found. It's may be strange and not correct, but working.

 

I've tried without Grid:-Seq :

dsol := dsolve(dsys, numeric, parameters = [bb, qq, prf0, `pθf0`], compile = true, optimize = true, output = listprocedure, maxfun = 0):

dsol3 := proc (tt) try dsol[3](tt) catch "cannot evaluate the solution further": tt = 0. end try end proc:

st := time[real]():

A := Array([Grid:-Seq([seq(op(2, [dsol[1](parameters = [b[i, j], q[i, j], pr[i, j], `pθ`[i, j]]), rhs(dsol3(-10^6))]), j = 1 .. sz[2])], i = 1 .. sz[1])]);

time[real]()-st;

but I received a blank Array: []. (This method working correctly with compile=false.)

 

Then I've tried with Grid:-Set :

dsol := dsolve(dsys, numeric, parameters = [bb, qq, prf0, `pθf0`], compile = true, optimize = true, output = listprocedure, maxfun = 0):

Grid:-Set(dsol);

dsol3 := proc (tt) try dsol[3](tt) catch "cannot evaluate the solution further": tt = 0. end try end proc:

st := time[real]():

A := Array([Grid:-Seq([seq(op(2, [dsol[1](parameters = [b[i, j], q[i, j], pr[i, j], `pθ`[i, j]]), rhs(dsol3(-10^6))]), j = 1 .. sz[2])], i = 1 .. sz[1])]);

time[real]()-st;

Grid:-Set returned an error:

dsol := dsolve(dsys, numeric, parameters = [bb, qq, prf0, `pθf0`], compile = true, optimize = true, output = listprocedure, maxfun = 0);

Grid:-Set(dsol);
Error, invalid input: too many and/or wrong type of arguments passed to Grid:-Set; first unused argument is [t = proc (t) local _res, _dat, _solnproc, _xout, _ndsol, _pars, _i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; if 1 < nargs then error "invalid input: too many arguments" end if; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then _xout := evalf[_EnvDSNumericSaveDigits](t) else _xout := evalf(t) end if; _dat := Array(1..4, {(1) = proc (_xin) local _xout, _dtbl, _dat, _vmap, _x0, _y0, _val, _dig, _n, _ne, _nd, _nv, _pars, _ini, _par, _i, _j, _k, _src; option `Copyright (c) 2002 by ...

 

However, the method from example.mw works less stable with increasing array size (variable sz) and/or number of nodes, often resulting in error after filling an Array:

Error, (in dsolve/numeric/SC/preproc) unable to post-link (rc=31), please try again, and if that fails check that your Windows SDK installation is up to date, and compatible with your Windows compiler

 

Do you know correct and stable method of using compiled dsolve with Grid?

Hey, people!

Somebody answer me?

1 2 3 4 5 Page 5 of 5