[Pw_forum] Proper use of mp_barrier

Jeffrey Mullen jtmullen at ncsu.edu
Thu Jun 18 23:46:14 CEST 2009


This was bounced back to me, so I am trying again...


--Jeff Mullen
NCSU Physics

Greetings,

I have added a subroutine to phonon.f90 which I only want to execute on
ionode after elpsum(). I call the routine only on ionode and then call
mp_barrier() to sync the processors. Until the call to mp_barrier, it
works. The code only runs on the ionode and other processors do not
attempt to perform any tasks. The problem is mp_barrier() doesn't
"release" after the completion of the subroutine. I thought that
mp_barrier() blocked until every operating processor entered mp_barrier,
then it stopped blocking and allowed proper program flow. What am I
doing wrong?


>From phonon.f90

call elphsum()
if(ionode) then
   call check_routine()
endif
call mp_barrier()

.
.
.







More information about the users mailing list