Ask Your Question
0

parallel multiple cores - algorithm

asked 2013-08-03 17:44:06 +0100

mresimulator gravatar image

updated 2015-01-14 14:35:43 +0100

FrédéricC gravatar image

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.

Waiting for your answers.

Thanks a lot

edit retag flag offensive close merge delete

Comments

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)

ppurka gravatar imageppurka ( 2013-08-04 02:44:33 +0100 )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

mresimulator gravatar imagemresimulator ( 2013-08-04 04:56:29 +0100 )edit

3 Answers

Sort by » oldest newest most voted
0

answered 2013-08-05 09:56:14 +0100

Volker Braun gravatar image

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

edit flag offensive delete link more
0

answered 2013-08-06 19:13:55 +0100

mresimulator gravatar image

I created a new question

http://ask.sagemath.org/question/2881...

Case closed here

edit flag offensive delete link more
-1

answered 2013-08-05 18:00:08 +0100

mresimulator gravatar image

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)))

Waiting for your answers.

Thanks a lot

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-08-03 17:44:06 +0100

Seen: 1,637 times

Last updated: Aug 06 '13