parallel processing - Fortran MPI doesn't run on all of the given number of Processors -
i'm running program in model grid must processed. when want run program using eg. 10 processors workers (mpirun -np 11 -machinefile host civil_mpi.exe), 3 peocessors run program , rest stop @ beginning of program without error!
if decrease size of model grid, works correctly. total ram of machine on 30 gb, , size of memory needed each process (based on model grid size) less 1 gb, theoretically there should no problem ram. me on case?
the os linux opensuse, , i'm running mpi on machine 16 dual-core cpus. code is:
call mpi_init(ierror) call mpi_comm_rank(mpi_comm_world, procid, ierror) call mpi_comm_size(mpi_comm_world, nproc, ierror) nworker = nproc - 1 call mpi_get_processor_name (procname, len, ierror) n_slice = 280 ny0(1) = 1 ny(1) = 2 = 2,n_slice ny0(i) = ny0(i-1) + 2 ny(i) = ny(i-1) + 2 end nx = 461 nx0 = 1 nz = 421 nz0 = 1 nwork = 1 = 1,280 if(nworker*nwork .lt. n_slice) nwork = nwork + 1 end if end if (procid .eq. masterid) worker_job = 1 q = 1,nworker iwork = q call mpi_send(worker_job, 1, mpi_integer, iwork, tag, $ mpi_comm_world,ierror) call mpi_send(nx0, 1, mpi_integer, iwork, tag, $ mpi_comm_world,ierror) call mpi_send(ny0, 280, mpi_integer, iwork, tag, $ mpi_comm_world, ierror) call mpi_send(nz0, 1, mpi_integer, iwork, tag, $ mpi_comm_world,ierror) call mpi_send(nx, 1, mpi_integer, iwork, tag, $ mpi_comm_world, ierror) call mpi_send(ny, 280, mpi_integer, iwork, tag, $ mpi_comm_world,ierror) call mpi_send(nz, 1, mpi_integer, iwork, tag, $ mpi_comm_world, ierror) worker_job = worker_job + nwork end end if c ------------------ worker task ----------- if (procid .gt. masterid) c write(*,*)'processor',procid,'is working....' call mpi_recv(worker_job, 1, mpi_integer, masterid, tag, $ mpi_comm_world, status, ierror) call mpi_recv(nx0, 1, mpi_integer, masterid, tag, $ mpi_comm_world, status, ierror) call mpi_recv(ny0, 280, mpi_integer, masterid, tag, $ mpi_comm_world, status, ierror) call mpi_recv(nz0, 1, mpi_integer, masterid, tag, $ mpi_comm_world, status, ierror) call mpi_recv(nx, 1, mpi_integer, masterid, tag, $ mpi_comm_world, status, ierror) call mpi_recv(ny, 280, mpi_integer, masterid, tag, $ mpi_comm_world, status, ierror) call mpi_recv(nz, 1, mpi_integer, masterid, tag, $ mpi_comm_world, status, ierror) j = worker_job, worker_job + nwork - 1 if (j .le. 280) write(*,*) '****************processor',procid,'is working' call rawmig(j,nx0,ny0(j),nz0,nx,ny(j),nz) end if end end if call mpi_finalize(ierror) end
problem solved! thank comments, i've realized 1 of matrices in main program must have been synchronized new dementions comming processors! gilles gouaillardet, trying make shortend , readable version of program post after suggestion , during saw matrice in form build output iy=ny0,ny (the varying dimension) must have been iy=1,2. first of all, matrice dimensions in definitions must have been corrected, , because defined directly comming variables each processor, of processors stoped without erorr message!
Comments
Post a Comment