next up previous contents
Next: BP_MAT Up: BP_ANG Previous: File IO   Contents

MPI implementation bp_ang_mpi

The most CPU intensive task is generating the angular data which occurs in the brevala(). Each column is processed independently of the other columns. Therefore, each column can be processed by a separate process, which can be assigned to a free processor. Thus, the main loop assigns to each node each configuration, with order, which is multiple of myid + nprocs, where myid is the id number of the node, and nprocs is the total number available node:

      DO jb = myid + 1, ncfg, nprocs
         if(mod(jb,1000).eq.0) write(ISCW,'(A,I5)') '   jb = ',jb
         if(jb == ncfg) write(ISCW,'(A,I5)') '   jb = ',jb
         CALL SHELLSJB(JB)
         call BreitGG(NEW,NZERO,IFIRST,idg,skip,nze)
         write(11) nih, (jan(i),i=1,nih);
         write(12) nih, (ico(i),i=1,nih);
         mycol = mycol + 1
         jptr(mycol) = nij
      end do

Each node records the angular data in a separate file, and this is an important factor for accomplishing high efficiency of the parallel program. add data Note, that the each file has 4 digits for the processor ID, while nonh uses three digits.

Figure 7.26: MPI files. Each node processes the input configuration list and writes the angular files.
\begin{figure}\centerline{\psfig{file=tex/fig/mpi_io_bp_ang.eps}}\end{figure}



2001-10-11