do jb = myid+1,ncfg,nprocs if (mod(jb,1000) .eq. 0) write(0,*) ' jb =',jb CALL SHELLSJB(jb) CALL ANGMOMG(NEW,NZERO,IFIRST) mycol = mycol + 1 jptr(mycol) = nij end do
The variable jb refers to the current column, and each node will process only the myid+1 + jb*nprocs column, where nprocs is the total number of processors, myid is the processor id (0,1,2... to.. nprocs-1).
mpi_orbitals() is virtually the same, but with added common /MPI/ myid, nprocs, ierr, istat(MPI_STATUS_SIZE). Only the node with myid=0 writes data to UNIT=25, (which is the file cfg.h) and the common was used to convey the myid value. mpi_angmom() has been modified to allow for correct increments of the variables lij, ja, jb, ntot.
The nonh program implements parallel output for the largest data files, Figure 6.20.
![]() |