how to refactor nested for loop into smaller for loop assume each of them independent?
meInvent bbird
jobmattcon at gmail.com
Mon Oct 10 01:01:23 EDT 2016
https://social.msdn.microsoft.com/Forums/vstudio/en-US/5f0a9a51-a256-4671-a5fc-e213949e7204/how-to-refactor-3-nested-for-loop-into-smaller-for-loop-assume-each-of-them-independent?forum=csharpgeneral
since when i dsolve a differential ideal used near 5GB memory for one ideal
, i feel that i need to use amazon instance,
i do not know whether sympy use same amount of memory
i prepared to split a for loop which for combination if use i < j and j < k
so 84 Billion /2 = 42 Billions combinations
each script for doing 100 combinations range, it generate around 4XX files
if read the final file it generated,
is
for ii from 1925 to 2025 do
for jj from 2040 to 2040 do
for kk from 2040 to 2040 do
it seems missed 2026 to 2040 this range in the final file
i feel that my crafted algorithm is not full combinations
I wrote a algorithm to split for loop to generate maplesoft code for limited memory
Assume I convert this algorithm into Python script and use sympy to do dsolve
How to distribute to hundreds of Amazon instance to run each smaller for loop
i am not familiar with using Amazon,
such as how to create hundreds of EC2 instances
i guess use python script to ssh all remote instance
run a python script with bash command which in python script
On Monday, October 10, 2016 at 6:49:12 AM UTC+8, Chris Angelico wrote:
> On Mon, Oct 10, 2016 at 9:40 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
> > Chris Angelico <rosuav at gmail.com>:
> >> Yeah, if it's just for progress status. Of course, that does assume
> >> that the run() function doesn't have anything particularly costly in
> >> it. If it does, well, dis gonna take a while....
> >
> > Dealing with multigigabyte data streams is not over the top nowadays.
>
> This is true, but ultimately, it all comes down to the run() function.
> With no further posts since the drive-by at the beginning, we have
> nothing solid to discuss this on.
>
> ChrisA
More information about the Python-list
mailing list