# parallel multiple cores - algorithm

Hi experts!

I have a intel core i3 (x4). I wanna take adventage of multiple cores CPU.

My Monte Carlo algorithm can be summarized like that:

 N=[N1, N2, ..., N20]
for n in N:
execute 100 times the algorithm related with 'n'
append some value (mean of the 100 times executed algorithm) in a output-numpy array LALALA (LALALA(n)))


So input is N, and output is an np.array LALALA (with 20 elements, each one related with one element in N)

How can I do for apply multicore proccesing?

Please explaing this to me in detail. Im a newby user and the sage-web-tutorials doesnt work.

Thanks a lot

edit retag close merge delete

What doesn't work in the sage tutorial? Did you try the examples given there? They work for me - for instance two separate examples from the documentation and the tutorial are [here](http://aleph.sagemath.org/?z=eJxVjdEKwjAMRd_7FfcxkVDYJoh78j_GkLFmWizdaKvf7zZENC-B3HtO8nDTFpdlSEMIGoy1Fk4njHcdH9f1TF4Qud2DbZKWZ4qIc4G3zr-800yRjcn_Jqr5K5vWQvslD9GYJflYEHwu9PMKHaiWqmIBNYLzto9yYvRg8AfKcyrqaGcn6iqppemZ-Q01yjr2&lang=sage)

( 2013-08-03 19:44:33 -0500 )edit

Hi ppurka. I misspoke. I tried to say that i donk know how to apply the tutorial to my particular problem. Waiting for your help. Thanks a lot

( 2013-08-03 21:56:29 -0500 )edit

Sort by » oldest newest most voted

I created a new question

Case closed here

more

Use the @paralleldecorator, see http://www.sagemath.org/doc/reference...

more

Thanks Volker Braun.

Im a really newby user and i wanna know how to integrate @parallel decoretor in my script:

  N=[N1, N2, ..., N20]
for n in N:
execute 100 times the algorithm related with 'n'
append some value (mean of the 100 times executed algorithm) in a output-numpy array LALALA (LALALA(n)))


Thanks a lot

more