[gpaw-users] How to set up atoms in serial and perform calculations in parallel
Nichols A. Romero
naromero at alcf.anl.gov
Mon Oct 31 15:50:17 CET 2011
Alex,
The magic you need is called MPI broadcast.
from gpaw.mpi import world
from gpaw.mpi import broadcast
if world.rank == 0:
AtomsObject = <foo>
else:
AtomsObject = None
broadcast(AtomsObject, root=0, comm=world)
Nichols A. Romero, Ph.D.
Argonne Leadership Computing Facility
Argonne National Laboratory
Building 240 Room 2-127
9700 South Cass Avenue
Argonne, IL 60490
(630) 252-3441
----- Original Message -----
From: "Alex Eftimiades" <alexeftimiades at gmail.com>
To: gpaw-users at listserv.fysik.dtu.dk
Sent: Saturday, October 29, 2011 5:15:37 PM
Subject: [gpaw-users] How to set up atoms in serial and perform calculations in parallel
In short, how might I create an atoms object in serial and perform a
calculation in parallel? I have some external programs working to set
up the atoms, and it would just be very convenient to be able to
separate my code as:
serial (if rank = 0 or something):
set up atoms...
barrier()
magically distribute atoms object to all ranks
calc={
.....
parallel={....},
}
atoms.set_calculator(calc)
atoms.get_potential_energy()
How might I do this?
Alex Eftimiades
_______________________________________________
gpaw-users mailing list
gpaw-users at listserv.fysik.dtu.dk
https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
More information about the gpaw-users
mailing list