Author Topic: How to do parallel in analysis?  (Read 12800 times)

0 Members and 1 Guest are viewing this topic.

Offline xhsh

  • Heavy QuantumATK user
  • ***
  • Posts: 32
  • Reputation: 0
    • View Profile
How to do parallel in analysis?
« on: March 30, 2010, 04:16 »
Hello, Dear all,

I want to do parallel in analysis, e.g., in the calculation of the transmission or LDOS. However, when I use more than 1 processors, it seems that each processor do the same job separately and print the same information to the standard output. This makes the output very messy. So I have two questions here:

1. Can we do parallel in analysis?

2. If we can,  how can we print information from only one processor in the python script, say, node 0, please?

Thank you very much!!

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5565
  • Country: dk
  • Reputation: 93
    • View Profile
    • QuantumATK at Synopsys
Re: How to do parallel in analysis?
« Reply #1 on: March 30, 2010, 08:32 »
Please read the manual http://quantumwise.com/documents/manuals/ATK-2008.10/chap.parallel.html

1) Yes

2) use the function processIsMaster()
« Last Edit: March 30, 2010, 11:30 by Anders Blom »

Offline xhsh

  • Heavy QuantumATK user
  • ***
  • Posts: 32
  • Reputation: 0
    • View Profile
Re: How to do parallel in analysis?
« Reply #2 on: March 30, 2010, 11:05 »
That is very nice.  Thank you very much!!

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5565
  • Country: dk
  • Reputation: 93
    • View Profile
    • QuantumATK at Synopsys
Re: How to do parallel in analysis?
« Reply #3 on: March 30, 2010, 11:29 »
I was a bit sloppy. Correct code:
Code
from ATK.MPI import *
if processIsMaster():
    print "I am the master node"
    print "Here is the result of the analysis:"
    ...

Offline xhsh

  • Heavy QuantumATK user
  • ***
  • Posts: 32
  • Reputation: 0
    • View Profile
Re: How to do parallel in analysis?
« Reply #4 on: March 31, 2010, 03:27 »
Your first reply already solved my problem. A hint is enough.  Thank you very much for being so careful.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5565
  • Country: dk
  • Reputation: 93
    • View Profile
    • QuantumATK at Synopsys
Re: How to do parallel in analysis?
« Reply #5 on: March 31, 2010, 07:23 »
That's good :)

It's just that since the answers might be very useful for other users too, it's best to be careful to do it correct and explicit, at least from my part :)