- #1
eleteroboltz
- 7
- 0
I have a program with Mathematica and I would like to run it in parallel.
The essential of the code is actually run a lot of cases, changing some parameters.
In other words, it means that each case is totally independent of the other.
But I'm not quite sure about how to do it.
To exemplify this situation, let's see the sample code bellow.
The problem is that the values are not passing to f.
Any suggestions?
Thank you
The essential of the code is actually run a lot of cases, changing some parameters.
In other words, it means that each case is totally independent of the other.
But I'm not quite sure about how to do it.
To exemplify this situation, let's see the sample code bellow.
Code:
fcalc[i_, j_] := NIntegrate[i Cos[j x], {x, 0, 1}]
ParallelDo[
f[i, j] = fcalc[i, j]
, {i, 1, 10}
, {j, 1, 10}]
The problem is that the values are not passing to f.
Any suggestions?
Thank you