Sets up silo groups for poor man's IO. Splits MPI ranks into groups of size nproc_node. Each group writes squentially to its own file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(silo_obj), | intent(inout) | :: | this |
A silo object |
impure subroutine silo_obj_CreateGroups(this) !> Sets up silo groups for poor man's IO. ! Splits MPI ranks into groups of size nproc_node. ! Each group writes squentially to its own file. implicit none class(silo_obj), intent(inout) :: this !! A silo object !Work variables integer :: ierr,n ! Set the IDs of the different silo groups allocate(this%group_ids(this%parallel%nproc)) do n=1,this%parallel%nproc this%group_ids(n)=ceiling(real(n,wp)/real(this%nproc_node,wp)) end do ! Create a new MPI communicator for each silo group call MPI_COMM_SPLIT(this%parallel%comm%g,this%group_ids(this%parallel%rank%mine),0,this%silo_comm,ierr) ! Return rank within this communicator call MPI_COMM_RANK (this%silo_comm,this%silo_rank,ierr) ! Adjust rank numbering Fortran style this%silo_rank=this%silo_rank+1 return end subroutine silo_obj_CreateGroups