rstellian

45 Reputation

4 Badges

8 years, 323 days

MaplePrimes Activity


These are questions asked by rstellian

Hi everyone,

I created a procedure "SIM" which depends on two formal parameters x and y. I write Threads:-Map(SIM, x, y) in order to execute it with the Threads package.

I would like to create .mpl files automatically, each one made of the code Threads:-Map(SIM, x, y) with specific values of x and y. For instance:

Threads:-Map(SIM, 5000, 1), then Threads:-Map(SIM, 5000, 2) ... and so on until Threads:-Map(SIM, 5000, 5000).

The fact is, I tried writing the following:

for y from 1 to 5000 do
a[y] := Threads:-Map(SIM, 5000, y);
save a[y], sprintf("SIM_%d.mpl", y)
end do

However, it does not work. The error message says "Error, save can only save names". I also tried, but without success:

for y from 1 to 5000 do
a[y] := Threads:-Map(SIM, 5000, y);
save convert(a[y], name), sprintf("SIM_%d.mpl", y)
end do

Any idea? Thanks a lot.

 

 

Hello everyone,

I have to store real-number matrixes into .mla files. Usually, I do it by using “save”, namely:

save Hi, “Hi.mla”

where i denotes is the i-th matrix I want to save. The problem is, I have to write manually :

save H1, “H1.mla” :

save H2, “H2.mla” :

and so on. This is not convenient as the number of matrixes to save is huge. Also, it does not work writing:

for i from 1 to n do

save H[i], “H[i].mla”

od

Any idea of what could be done? Thank you in advance.

Hi everyone,

For my first question, I am looking for some help about the following. I have the opportunity to run a worksheet in parallel on a cluster of sixteen workstations, each one endowed with twelve CPUs, through the GRID Computing Toolbox. However, I have troubles concerning how to do that.

I join the worksheet at issue: abmm_ma_1.mw The aim is to run large-scale numerical simulations of a dynamic system, depending on the values given to the initial conditions and to the parameters. The worksheet is organized in four execution groups:

  1. The required packages (combinat and LinearAlgebra).
  2. Calibration of the parameters and initial conditions.
  3. The system, which is embedded into a procedure called SIM.
  4. The activation of SIM, whose outputs are nine .mla files, each one being made of a real-number matrix.

The truth is, I do not clearly see how to modify the worksheet with some elements of the GRID package. Besides, the cluster operates under HTCondor so that running the worksheet requires beforehand the creation of a .sub file. This should be done in consistency with the aforesaid modification.

Any help is welcome, thanks a lot.

1 2 Page 2 of 2