Changes in src/init_domainfill_mpi.f90 [328fdf9:b5127f9] in flexpart.git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/init_domainfill_mpi.f90
r328fdf9 rb5127f9 110 110 endif 111 111 112 ! Exit here if resuming a run from particle dump113 !***********************************************114 if (gdomainfill.and.ipin.ne.0) return115 116 112 ! Do not release particles twice (i.e., not at both in the leftmost and rightmost 117 113 ! grid cell) for a global domain … … 217 213 colmass(ix,jy)=(pp(1)-pp(nz))/ga*gridarea(jy) 218 214 colmasstotal=colmasstotal+colmass(ix,jy) 215 219 216 end do 220 217 end do … … 469 466 470 467 ! eso TODO: only needed for root process 471 if ( (ipin.eq.1).and.(.not.gdomainfill)) then468 if (ipin.eq.1) then 472 469 open(unitboundcond,file=path(2)(1:length(2))//'boundcond.bin', & 473 470 form='unformatted') … … 477 474 endif 478 475 479 if (ipin.eq.0) then 480 numpart = numpart/mp_partgroup_np 481 if (mod(numpart,mp_partgroup_np).ne.0) numpart=numpart+1 482 end if 483 484 else ! Allocate dummy arrays for receiving processes 485 if (ipin.eq.0) then 486 allocate(itra1_tmp(nullsize),npoint_tmp(nullsize),nclass_tmp(nullsize),& 487 & idt_tmp(nullsize),itramem_tmp(nullsize),itrasplit_tmp(nullsize),& 488 & xtra1_tmp(nullsize),ytra1_tmp(nullsize),ztra1_tmp(nullsize),& 489 & xmass1_tmp(nullsize, nullsize)) 490 end if 476 numpart = numpart/mp_partgroup_np 477 if (mod(numpart,mp_partgroup_np).ne.0) numpart=numpart+1 478 479 else ! Allocate dummy arrays for receiving processes 480 allocate(itra1_tmp(nullsize),npoint_tmp(nullsize),nclass_tmp(nullsize),& 481 & idt_tmp(nullsize),itramem_tmp(nullsize),itrasplit_tmp(nullsize),& 482 & xtra1_tmp(nullsize),ytra1_tmp(nullsize),ztra1_tmp(nullsize),& 483 & xmass1_tmp(nullsize, nullsize)) 491 484 492 end if ! end if(lroot) 493 485 end if ! end if(lroot) 494 486 495 487 496 488 ! Distribute particles to other processes (numpart is 'per-process', not total) 497 ! Only if not restarting from previous run 498 if (ipin.eq.0) then 499 call MPI_Bcast(numpart, 1, MPI_INTEGER, id_root, mp_comm_used, mp_ierr)500 call mpif_send_part_properties(npart(1)/mp_partgroup_np)489 call MPI_Bcast(numpart, 1, MPI_INTEGER, id_root, mp_comm_used, mp_ierr) 490 ! eso TODO: xmassperparticle: not necessary to send 491 call MPI_Bcast(xmassperparticle, 1, mp_sp, id_root, mp_comm_used, mp_ierr) 492 call mpif_send_part_properties(numpart) 501 493 502 494 ! Deallocate the temporary arrays used for all particles 503 495 deallocate(itra1_tmp,npoint_tmp,nclass_tmp,idt_tmp,itramem_tmp,& 504 496 & itrasplit_tmp,xtra1_tmp,ytra1_tmp,ztra1_tmp,xmass1_tmp) 505 end if506 497 507 498
Note: See TracChangeset
for help on using the changeset viewer.