Open MPI_shared write file, allocate memory and setup pointers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(filetype), | intent(in) | :: | files | |||
type(controltype), | intent(in) | :: | control | |||
type(boundarytype), | intent(in) | :: | bc |
subroutine setup_surface(files, control, bc)
!< Open MPI_shared write file, allocate memory and
!< setup pointers
implicit none
type(boundarytype), intent(in) :: bc
type(filetype), intent(in) :: files
type(controltype), intent(in) :: control
integer :: stat
DebugCall('setup_surface')
if(process_id==0)then
open(files%NODESURF_FILE_UNIT, file=files%surface_node_points, iostat=stat)
if(stat==0) close(files%NODESURF_FILE_UNIT, status='delete')
end if
call mpi_barrier(MPI_COMM_WORLD,ierr)
call MPI_FILE_OPEN(MPI_COMM_WORLD, files%surface_node_points, &
MPI_MODE_WRONLY + MPI_MODE_CREATE + MPI_MODE_EXCL, &
MPI_INFO_NULL, thisfile, ierr)
call find_wall(bc)
call allocate_memory(control)
call link_aliases()
end subroutine setup_surface