--- trunk/OOPSE/libmdtools/calc_eam.F90 2004/05/24 22:24:30 1195 +++ trunk/OOPSE/libmdtools/calc_eam.F90 2004/05/27 00:48:12 1198 @@ -251,16 +251,16 @@ contains integer, intent(out) :: status #ifdef IS_MPI - integer :: nrow - integer :: ncol + integer :: nAtomsInRow + integer :: nAtomsInCol #endif integer :: alloc_stat status = 0 #ifdef IS_MPI - nrow = getNrow(plan_row) - ncol = getNcol(plan_col) + nAtomsInRow = getNatomsInRow(plan_atom_row) + nAtomsInCol = getNatomsInCol(plan_atom_col) #endif if (allocated(frho)) deallocate(frho) @@ -301,25 +301,25 @@ contains if (allocated(frho_row)) deallocate(frho_row) - allocate(frho_row(nrow),stat=alloc_stat) + allocate(frho_row(nAtomsInRow),stat=alloc_stat) if (alloc_stat /= 0) then status = -1 return end if if (allocated(rho_row)) deallocate(rho_row) - allocate(rho_row(nrow),stat=alloc_stat) + allocate(rho_row(nAtomsInRow),stat=alloc_stat) if (alloc_stat /= 0) then status = -1 return end if if (allocated(dfrhodrho_row)) deallocate(dfrhodrho_row) - allocate(dfrhodrho_row(nrow),stat=alloc_stat) + allocate(dfrhodrho_row(nAtomsInRow),stat=alloc_stat) if (alloc_stat /= 0) then status = -1 return end if if (allocated(d2frhodrhodrho_row)) deallocate(d2frhodrhodrho_row) - allocate(d2frhodrhodrho_row(nrow),stat=alloc_stat) + allocate(d2frhodrhodrho_row(nAtomsInRow),stat=alloc_stat) if (alloc_stat /= 0) then status = -1 return @@ -329,25 +329,25 @@ contains ! Now do column arrays if (allocated(frho_col)) deallocate(frho_col) - allocate(frho_col(ncol),stat=alloc_stat) + allocate(frho_col(nAtomsInCol),stat=alloc_stat) if (alloc_stat /= 0) then status = -1 return end if if (allocated(rho_col)) deallocate(rho_col) - allocate(rho_col(ncol),stat=alloc_stat) + allocate(rho_col(nAtomsInCol),stat=alloc_stat) if (alloc_stat /= 0) then status = -1 return end if if (allocated(dfrhodrho_col)) deallocate(dfrhodrho_col) - allocate(dfrhodrho_col(ncol),stat=alloc_stat) + allocate(dfrhodrho_col(nAtomsInCol),stat=alloc_stat) if (alloc_stat /= 0) then status = -1 return end if if (allocated(d2frhodrhodrho_col)) deallocate(d2frhodrhodrho_col) - allocate(d2frhodrhodrho_col(ncol),stat=alloc_stat) + allocate(d2frhodrhodrho_col(nAtomsInCol),stat=alloc_stat) if (alloc_stat /= 0) then status = -1 return @@ -567,12 +567,12 @@ contains cleanme = .true. !! Scatter the electron density from pre-pair calculation back to local atoms #ifdef IS_MPI - call scatter(rho_row,rho,plan_row,eam_err) + call scatter(rho_row,rho,plan_atom_row,eam_err) if (eam_err /= 0 ) then write(errMsg,*) " Error scattering rho_row into rho" call handleError(RoutineName,errMesg) endif - call scatter(rho_col,rho_tmp,plan_col,eam_err) + call scatter(rho_col,rho_tmp,plan_atom_col,eam_err) if (eam_err /= 0 ) then write(errMsg,*) " Error scattering rho_col into rho" call handleError(RoutineName,errMesg) @@ -617,19 +617,19 @@ contains #ifdef IS_MPI !! communicate f(rho) and derivatives back into row and column arrays - call gather(frho,frho_row,plan_row, eam_err) + call gather(frho,frho_row,plan_atom_row, eam_err) if (eam_err /= 0) then call handleError("cal_eam_forces()","MPI gather frho_row failure") endif - call gather(dfrhodrho,dfrhodrho_row,plan_row, eam_err) + call gather(dfrhodrho,dfrhodrho_row,plan_atom_row, eam_err) if (eam_err /= 0) then call handleError("cal_eam_forces()","MPI gather dfrhodrho_row failure") endif - call gather(frho,frho_col,plan_col, eam_err) + call gather(frho,frho_col,plan_atom_col, eam_err) if (eam_err /= 0) then call handleError("cal_eam_forces()","MPI gather frho_col failure") endif - call gather(dfrhodrho,dfrhodrho_col,plan_col, eam_err) + call gather(dfrhodrho,dfrhodrho_col,plan_atom_col, eam_err) if (eam_err /= 0) then call handleError("cal_eam_forces()","MPI gather dfrhodrho_col failure") endif @@ -639,8 +639,8 @@ contains if (nmflag) then - call gather(d2frhodrhodrho,d2frhodrhodrho_row,plan_row) - call gather(d2frhodrhodrho,d2frhodrhodrho_col,plan_col) + call gather(d2frhodrhodrho,d2frhodrhodrho_row,plan_atom_row) + call gather(d2frhodrhodrho,d2frhodrhodrho_col,plan_atom_col) endif #endif @@ -816,8 +816,8 @@ contains vpair = vpair + phab #ifdef IS_MPI - id1 = tagRow(atom1) - id2 = tagColumn(atom2) + id1 = AtomRowToGlobal(atom1) + id2 = AtomColToGlobal(atom2) #else id1 = atom1 id2 = atom2