QuantumWise Forum
May 22, 2013, 09:56 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: MPI does not work  (Read 466 times)
0 Members and 1 Guest are viewing this topic.
lomlrn
New ATK user
*

Reputation: 0
Offline Offline

Germany Germany

Posts: 3


View Profile
« on: April 10, 2012, 16:30 »

Hi there,

im following your "Parallel Tutorial" but it seems to be a bit outdated.

The script

from ATK.MPI import *
 
if processIsMaster():
    print '# Master node'
else:
    print '# Slave node'


produces only:


Traceback (most recent call last):
  File "test_mpi.py", line 1, in <module>
    from ATK.MPI import *
ImportError: No module named ATK.MPI


Can you give an updated example?
Logged
Anders Blom
QuantumWise Staff
Supreme ATK Wizard
*****

Reputation: 36
Online Online

Denmark Denmark

Posts: 2810



View Profile WWW
« Reply #1 on: April 10, 2012, 21:17 »

Sorry about that! You can just ignore that line. Here is a much more informative script example:

Code: (python)
import socket
if processIsMaster():
    print 'Master node:',
else:
    print 'Slave node:',
print socket.gethostname()


In addition to writing out master/slave it also writes on which host each process runs; the allows you to also see how the different machines are allocated, to ensure you use all machines as intended and not piling all MPI process onto the same node.

Logged
Anders Blom
QuantumWise Staff
Supreme ATK Wizard
*****

Reputation: 36
Online Online

Denmark Denmark

Posts: 2810



View Profile WWW
« Reply #2 on: April 10, 2012, 21:19 »

Btw, where did you find the version of the "Parallel Guide" you refer to? The latest online version has the correct (simpler) script without the "from ATK.MPI import *" statement which dates back to 2008.10 - a version which is not longer in circulation officially...

I just want to know, so we can remove any old reference to wrong tutorials if they are found on our website.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2008, Simple Machines Valid XHTML 1.0! Valid CSS!