Ask Your Question
0

parallel multiple cores - algorithm

asked 11 years ago

mresimulator gravatar image

updated 10 years ago

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

Preview: (hide)

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 ( 11 years ago )

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 ( 11 years ago )

3 Answers

Sort by » oldest newest most voted
0

answered 11 years ago

Volker Braun gravatar image

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

Preview: (hide)
link
0

answered 11 years ago

mresimulator gravatar image

I created a new question

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

Case closed here

Preview: (hide)
link
-1

answered 11 years ago

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

Preview: (hide)
link

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: 11 years ago

Seen: 1,753 times

Last updated: Aug 06 '13