QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: hhspace on January 11, 2009, 05:48

Title: About the parallel calculation using ATK
Post by: hhspace on January 11, 2009, 05:48
I am confused about the parallel calculation using ATK. The manual of ATK tells that if ATK is properly configured to run in parallel on your system, the test_mpi.py file should be written like that:

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

After the following command
   
mpiexec -n 2 $ATK_BIN_DIR/atk /home/myusername/test_mpi.py

the result should  be         Master node

                                     Slave node
However, when I did the same job I got the result like that:
                                   
                                     Master node
                                   
                                     Master node

Now if I conduct a parallel job in this setting, is it still a real parallel calculation??


Title: Re: About the parallel calculation using ATK
Post by: Nordland on January 11, 2009, 13:56
In short: No.

What linux distribution are you using and which version of mpich2?
Title: Re: About the parallel calculation using ATK
Post by: hhspace on January 12, 2009, 03:31
About Linux
LSB Version:    :core-3.0-amd64:core-3.0-ia32:core-3.0-noarch:graphics-3.0-amd64:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: RedHatEnterpriseAS
Description:    Red Hat Enterprise Linux AS release 4 (Nahant Update 6)
Release:        4
Codename:       NahantUpdate6

About MPI
mpich2-1.0.7rc1
Title: Re: About the parallel calculation using ATK
Post by: Nordland on January 12, 2009, 10:47
Okay - you started your mpd demon?
Title: Re: About the parallel calculation using ATK
Post by: hhspace on January 13, 2009, 02:28
Yes, of course. Yesterday, I had a test to time a self-consistent calculation for the LiH2Li twoprobe systerm, and both the  parallel and the serial calculation took five minutes. Does that mean someting? 
Title: Re: About the parallel calculation using ATK
Post by: Nordland on January 13, 2009, 04:12
It dont think you are running in parallel. :| It is strange. It might be a stupid question, but do you have more than one cpu on your machine?
However as I remembered it you should be able to run in parallel using only one cpu, but the result is just a small loss of speed....
Title: Re: About the parallel calculation using ATK
Post by: serhan on January 13, 2009, 06:56
Hi,

I think hhspace is using ATK on a single (i.e. only one computer, not a cluster) dual-core (or core2duo) machine?

Both processors on the same machine uses ATK as a master node I think. This may be the reason why he/she is getting two "master node" lines from test script. I am not sure but these are just probabilities.   ???

I test if I am running some program in parallel by system monitor during the run. If both processors are on charge, I conclude that it is running in parallel. A simple but right way of testing I think  ;D

Regards
Serhan
Title: Re: About the parallel calculation using ATK
Post by: hhspace on January 13, 2009, 08:50
Yes, we have eight CPUs available in the server. And I also did a test, however, the parallel (two cpus)and the serial calculation for the LiH2Li twoprobe systerm both took five minutes.
Title: Re: About the parallel calculation using ATK
Post by: Anders Blom on January 13, 2009, 11:26
hhspace, please contact QuantumWise offline to resolve this issue. Just send me an email through my user profile here at the Forum, and we take it from there. We will post the solution once we've figured it out :)

For the record, however, one needs to keep two things in mind.

1) First, ATK parallelizes in two ways, or two levels. What you can see from the system monitor is the OpenMP parallelization, which shows how ATK threads on all the cores of your processor. It is not an indication, however, of the MPI parallelization we are talking about here. This is the second level of parallelization, which is over multiple network nodes.

2) The "nodes" are virtual and not related to the processor or network host. For a proper parallel job there always only a single master node (node id=0), otherwise the parallelization algorithms simply do not work properly, since the master node is responsible for collecting the data computed by the slave nodes.

It is possible to run in parallel using MPI also with a node-locked license (if you have the ATKslave feature in the license file), and it give quite ok performance on a multi-core if the job isn't too large. You will, however, in that case see several ATK processes in the system monitor.