--- trunk/OOPSE/libmdtools/calc_eam.F90 2003/09/05 21:28:52 747 +++ trunk/OOPSE/libmdtools/calc_eam.F90 2003/10/04 18:46:12 801 @@ -164,14 +164,15 @@ contains integer :: alloc_stat integer :: number_r, number_rho + + status = 0 if (EAMList%currentAddition == 0) then call handleError("init_EAM_FF","No members in EAMList") status = -1 return end if - - + do i = 1, EAMList%currentAddition ! Build array of r values @@ -234,12 +235,14 @@ contains ! EAMList%EAMParam(i)s%eam_atype_map(eam_atype(i)) = i ! end do !! Allocate arrays for force calculation - call allocateEAM(alloc_stat) - if (alloc_stat /= 0 ) then - status = -1 - return - endif - + + call allocateEAM(alloc_stat) + if (alloc_stat /= 0 ) then + write(*,*) "allocateEAM failed" + status = -1 + return + endif + end subroutine init_EAM_FF !! routine checks to see if array is allocated, deallocates array if allocated @@ -256,7 +259,7 @@ contains nlocal = getNlocal() - + status = 0 #ifdef IS_MPI nrow = getNrow(plan_row) ncol = getNcol(plan_col)