From dbc2a6230dde6afba1cb5550da6814288f49042f Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Tue, 23 Jan 2024 16:13:40 +0000 Subject: [PATCH] build based on f936a15 --- previews/PR49/.documenter-siteinfo.json | 2 +- previews/PR49/index.html | 2 +- previews/PR49/lib/modules/index.html | 4 ++-- previews/PR49/usage/runtests/index.html | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/previews/PR49/.documenter-siteinfo.json b/previews/PR49/.documenter-siteinfo.json index e559e59e..430bf83e 100644 --- a/previews/PR49/.documenter-siteinfo.json +++ b/previews/PR49/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-01-23T16:11:45","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-01-23T16:13:36","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/previews/PR49/index.html b/previews/PR49/index.html index 737a681a..cb579a23 100644 --- a/previews/PR49/index.html +++ b/previews/PR49/index.html @@ -1,2 +1,2 @@ -Home · FastIce
+Home · FastIce
diff --git a/previews/PR49/lib/modules/index.html b/previews/PR49/lib/modules/index.html index addf10ba..28f49fbd 100644 --- a/previews/PR49/lib/modules/index.html +++ b/previews/PR49/lib/modules/index.html @@ -4,8 +4,8 @@ julia> grid = CartesianGrid(origin=(0.0,0.0), extent=(1.0,1.0), size=(4,4)) 2D 4×4 CartesianGrid{Float64}: x ∈ [0.0–1.0]; Δx = 0.25 - y ∈ [0.0–1.0]; Δy = 0.25source
FastIce.Grids.CartesianGridMethod
CartesianGrid(; origin::NTuple{N,T}, extent::NTuple{N,T}, size::NTuple{N,I})

Create a Cartesian grid with a specified origin (bottom-south-west corner in 3D), spatial extent, and number of grid cells.

source
FastIce.Grids.DiscreteAxisType

Discretised one-dimensional interval. Grid type CartesianGrid is defined as a tuple of DiscreteAxis's.

source
FastIce.Grids.axisMethod
axis(grid::CartesianGrid, dim::Integer)

Return a DiscreteAxis corresponding to the spatial dimension dim.

source
FastIce.Grids.coordMethod
coord(grid::CartesianGrid{N}, loc::NTuple{N,Location}, inds::NTuple{N})

Return a tuple of spatial coordinates of a grid point at location loc and indices inds.

For vertex-centered locations, first grid point is at the origin. For cell-centered locations, first grid point at half-spacing distance from the origin.

source
FastIce.Grids.extentMethod
extent(grid::CartesianGrid)

Return the spatial extent of a CartesianGrid as a tuple.

source
FastIce.Grids.originMethod
origin(grid::CartesianGrid)

Return the origin of a CartesianGrid. The origin corresponds to bottom-south-west corner of the grid in 3D.

source
FastIce.Grids.spacingMethod
spacing(grid::CartesianGrid)

Return the spacing of a CartesianGrid as a tuple.

source
FastIce.Grids.ΔMethod
Δ(grid::CartesianGrid)

Return the spacing of a CartesianGrid as a tuple. Same as spacing.

source

Distributed

FastIce.Architectures.ArchitectureMethod
Architecture(backend::Backend, topology::CartesianTopology) where {N}

Create a distributed Architecture using backend and topology. For GPU backends, device will be selected automatically based on a process id within a node.

source
FastIce.Distributed.CartesianTopologyType
CartesianTopology

Represents N-dimensional Cartesian topology of distributed processes.

source
FastIce.Distributed.CartesianTopologyMethod
CartesianTopology(dims::NTuple{N,Int}; comm=MPI.COMM_WORLD) where {N}

Create an N-dimensional Cartesian topology with dimensions dims and using base MPI communicator comm (by default, comm=MPI.COMM_WORLD). If all entries in dims are not equal to 0, the product of dims should be equal to the total number of MPI processes MPI.Comm_size(comm). If any (or all) entries of dims are 0, the dimensions in the corresponding spatial directions will be picked automatically.

source
FastIce.Distributed.DistributedMPIType

Trait structure used as a type parameter to indicate that the Architecture is a distributed MPI Architecture.

source
FastIce.Distributed.ExchangeInfoType
ExchangeInfo

Structure containing the information to exchange halos of one side of an N-dimensional array.

source
FastIce.Distributed.ExchangeInfoMethod
ExchangeInfo(::Val{S}, ::Val{D}, field::Field) where {S,D}

Create ExchangeInfo to exchange halos on side S in the spatial direction D.

source
FastIce.BoundaryConditions.apply_boundary_conditions!Method
apply_boundary_conditions!(::Val{S}, ::Val{D},
+    y ∈ [0.0–1.0]; Δy = 0.25
source
FastIce.Grids.CartesianGridMethod
CartesianGrid(; origin::NTuple{N,T}, extent::NTuple{N,T}, size::NTuple{N,I})

Create a Cartesian grid with a specified origin (bottom-south-west corner in 3D), spatial extent, and number of grid cells.

source
FastIce.Grids.DiscreteAxisType

Discretised one-dimensional interval. Grid type CartesianGrid is defined as a tuple of DiscreteAxis's.

source
FastIce.Grids.axisMethod
axis(grid::CartesianGrid, dim::Integer)

Return a DiscreteAxis corresponding to the spatial dimension dim.

source
FastIce.Grids.coordMethod
coord(grid::CartesianGrid{N}, loc::NTuple{N,Location}, inds::NTuple{N})

Return a tuple of spatial coordinates of a grid point at location loc and indices inds.

For vertex-centered locations, first grid point is at the origin. For cell-centered locations, first grid point at half-spacing distance from the origin.

source
FastIce.Grids.extentMethod
extent(grid::CartesianGrid)

Return the spatial extent of a CartesianGrid as a tuple.

source
FastIce.Grids.originMethod
origin(grid::CartesianGrid)

Return the origin of a CartesianGrid. The origin corresponds to bottom-south-west corner of the grid in 3D.

source
FastIce.Grids.spacingMethod
spacing(grid::CartesianGrid)

Return the spacing of a CartesianGrid as a tuple.

source
FastIce.Grids.ΔMethod
Δ(grid::CartesianGrid)

Return the spacing of a CartesianGrid as a tuple. Same as spacing.

source

Distributed

FastIce.Architectures.ArchitectureMethod
Architecture(backend::Backend, topology::CartesianTopology) where {N}

Create a distributed Architecture using backend and topology. For GPU backends, device will be selected automatically based on a process id within a node.

source
FastIce.Distributed.CartesianTopologyType
CartesianTopology

Represents N-dimensional Cartesian topology of distributed processes.

source
FastIce.Distributed.CartesianTopologyMethod
CartesianTopology(dims::NTuple{N,Int}; comm=MPI.COMM_WORLD) where {N}

Create an N-dimensional Cartesian topology with dimensions dims and using base MPI communicator comm (by default, comm=MPI.COMM_WORLD). If all entries in dims are not equal to 0, the product of dims should be equal to the total number of MPI processes MPI.Comm_size(comm). If any (or all) entries of dims are 0, the dimensions in the corresponding spatial directions will be picked automatically.

source
FastIce.Distributed.DistributedMPIType

Trait structure used as a type parameter to indicate that the Architecture is a distributed MPI Architecture.

source
FastIce.Distributed.ExchangeInfoType
ExchangeInfo

Structure containing the information to exchange halos of one side of an N-dimensional array.

source
FastIce.Distributed.ExchangeInfoMethod
ExchangeInfo(::Val{S}, ::Val{D}, field::Field) where {S,D}

Create ExchangeInfo to exchange halos on side S in the spatial direction D.

source
FastIce.BoundaryConditions.apply_boundary_conditions!Method
apply_boundary_conditions!(::Val{S}, ::Val{D},
                            arch::Architecture,
                            grid::CartesianGrid,
                            fields::NTuple{N,Field},
-                           exchange_infos::NTuple{N,ExchangeInfo}; async=true) where {S,D,N}

Perform a non-blocking MPI exchange for a set of fields.

source
FastIce.Distributed.cartesian_communicatorMethod
cartesian_communicator(t::CartesianTopology)

MPI Cartesian communicator for the topology.

source
FastIce.Distributed.coordinatesMethod
coordinates(t::CartesianTopology)

Coordinates of a current process within a Cartesian topology.

source
FastIce.Distributed.dimensionsMethod
dimensions(t::CartesianTopology)

Dimensions of the topology as NTuple.

source
FastIce.Distributed.gather!Method
gather!(arch::Architecture{DistributedMPI}, dst, src::Field; kwargs...)

Gather the interior of a field src into a global array dst.

source
FastIce.Distributed.global_grid_sizeMethod
global_grid_size(t::CartesianTopology, local_size)

Return the global size for a structured grid.

source
FastIce.Distributed.global_rankMethod
global_rank(t::CartesianTopology)

Global id of a process in a Cartesian topology.

source
FastIce.Distributed.global_sizeMethod
global_size(t::CartesianTopology)

Total number of processes withing the topology.

source
FastIce.Distributed.has_neighborMethod
has_neighbor(t::CartesianTopology, dim, side)

Returns true if there a neighbor process in spatial direction dim on the side side, or false otherwise.

source
FastIce.Distributed.local_gridMethod
local_grid(g::CartesianGrid, t::CartesianTopology)

Return a CartesianGrid covering the subdomain which corresponds to the current process.

source
FastIce.Distributed.neighborMethod
neighbor(t::CartesianTopology, dim, side)

Returns id of a neighbor process in spatial direction dim on the side side, if this neighbor exists, or MPI.PROC_NULL otherwise.

source
FastIce.Distributed.neighborsMethod
neighbors(t::CartesianTopology)

Neighbors of a current process.

Returns NTuple containing process ids of the two immediate neighbors in each spatial direction, or MPI.PROC_NULL if no neighbor on a corresponding side.

source
FastIce.Distributed.node_nameMethod
node_name(t::CartesianTopology)

Name of a node according to MPI.Get_processor_name().

source
FastIce.Distributed.node_sizeMethod
node_size(t::CartesianTopology)

Number of processes sharing the same node.

source
FastIce.Distributed.shared_communicatorMethod
shared_communicator(t::CartesianTopology)

MPI communicator for the processes sharing the same node.

source
FastIce.Distributed.shared_rankMethod
shared_rank(t::CartesianTopology)

Local id of a process within a single node. Can be used to set the GPU device.

source

Kernel launch

FastIce.KernelLaunch.launch!Method
launch!(arch::Architecture, grid::CartesianGrid, kernel::Pair{K,Args}; <keyword arguments>) where {K,Args}

Launch a KernelAbstraction kernel on a grid using the backend from arch. Either worksize or location must be provided as keyword arguments.

Keyword Arguments

  • worksize: worksize of a kernel, i.e. how many grid points are included in each spatial direction.
  • location[=nothing]: compute worksize as a size of the grid at a specified location. If only one location is provided, e.g. location=Vertex(), then this location will be used for all spacial directions.
  • offset[=nothing]: index offset for all grid indices as a CartesianIndex.
  • expand[=nothing]: if provided, the worksize is increased by 2*expand, and offset is set to -expand, or combined with user-provided offset.
  • hide_boundaries[=nothing]: instance of HideBoundaries, that will be used to overlap boundary processing with computations at inner points of the domain.
  • outer_width[=nothing]: if hide_boundaries is specified, used to determine the decomposition of the domain into inner and outer regions.
  • boundary_conditions[=nothing]: a tuple of boundary condition batches for each side of every spatial direction.
  • async[=true]: if set to false, will block the host until the kernel is finished executing.
source

Writers

FastIce.Writers.write_h5Method
write_h5(arch::Architecture, grid::CartesianGrid, path, fields)

Write output fields in HDF5 format to a file on path.

source
FastIce.Writers.write_h5Method
write_h5(arch::Architecture{DistributedMPI}, grid::CartesianGrid, path, fields)

Write output fields in HDF5 format to a file on path for global grid on distributed arch.

source
FastIce.Writers.write_xdmfFunction
write_xdmf(arch::Architecture{DistributedMPI}, grid::CartesianGrid, path, fields, h5_names, timesteps=Float64(0.0))

Write Xdmf metadata to path for corresponding h5_names and fields for global grid on distributed arch. Saving time-dependant data can be achieved upon passing a vector to h5_names and timesteps.

source
FastIce.Writers.write_xdmfFunction
write_xdmf(arch::Architecture, grid::CartesianGrid, path, fields, h5_names, timesteps=Float64(0.0))

Write Xdmf metadata to path for corresponding h5_names and fields. Saving time-dependant data can be achieved upon passing a vector to h5_names and timesteps.

source
+ exchange_infos::NTuple{N,ExchangeInfo}; async=true) where {S,D,N}

Perform a non-blocking MPI exchange for a set of fields.

source
FastIce.Distributed.cartesian_communicatorMethod
cartesian_communicator(t::CartesianTopology)

MPI Cartesian communicator for the topology.

source
FastIce.Distributed.coordinatesMethod
coordinates(t::CartesianTopology)

Coordinates of a current process within a Cartesian topology.

source
FastIce.Distributed.dimensionsMethod
dimensions(t::CartesianTopology)

Dimensions of the topology as NTuple.

source
FastIce.Distributed.gather!Method
gather!(arch::Architecture{DistributedMPI}, dst, src::Field; kwargs...)

Gather the interior of a field src into a global array dst.

source
FastIce.Distributed.global_grid_sizeMethod
global_grid_size(t::CartesianTopology, local_size)

Return the global size for a structured grid.

source
FastIce.Distributed.global_rankMethod
global_rank(t::CartesianTopology)

Global id of a process in a Cartesian topology.

source
FastIce.Distributed.global_sizeMethod
global_size(t::CartesianTopology)

Total number of processes withing the topology.

source
FastIce.Distributed.has_neighborMethod
has_neighbor(t::CartesianTopology, dim, side)

Returns true if there a neighbor process in spatial direction dim on the side side, or false otherwise.

source
FastIce.Distributed.local_gridMethod
local_grid(g::CartesianGrid, t::CartesianTopology)

Return a CartesianGrid covering the subdomain which corresponds to the current process.

source
FastIce.Distributed.neighborMethod
neighbor(t::CartesianTopology, dim, side)

Returns id of a neighbor process in spatial direction dim on the side side, if this neighbor exists, or MPI.PROC_NULL otherwise.

source
FastIce.Distributed.neighborsMethod
neighbors(t::CartesianTopology)

Neighbors of a current process.

Returns NTuple containing process ids of the two immediate neighbors in each spatial direction, or MPI.PROC_NULL if no neighbor on a corresponding side.

source
FastIce.Distributed.node_nameMethod
node_name(t::CartesianTopology)

Name of a node according to MPI.Get_processor_name().

source
FastIce.Distributed.node_sizeMethod
node_size(t::CartesianTopology)

Number of processes sharing the same node.

source
FastIce.Distributed.shared_communicatorMethod
shared_communicator(t::CartesianTopology)

MPI communicator for the processes sharing the same node.

source
FastIce.Distributed.shared_rankMethod
shared_rank(t::CartesianTopology)

Local id of a process within a single node. Can be used to set the GPU device.

source

Kernel launch

FastIce.KernelLaunch.launch!Method
launch!(arch::Architecture, grid::CartesianGrid, kernel::Pair{K,Args}; <keyword arguments>) where {K,Args}

Launch a KernelAbstraction kernel on a grid using the backend from arch. Either worksize or location must be provided as keyword arguments.

Keyword Arguments

  • worksize: worksize of a kernel, i.e. how many grid points are included in each spatial direction.
  • location[=nothing]: compute worksize as a size of the grid at a specified location. If only one location is provided, e.g. location=Vertex(), then this location will be used for all spacial directions.
  • offset[=nothing]: index offset for all grid indices as a CartesianIndex.
  • expand[=nothing]: if provided, the worksize is increased by 2*expand, and offset is set to -expand, or combined with user-provided offset.
  • hide_boundaries[=nothing]: instance of HideBoundaries, that will be used to overlap boundary processing with computations at inner points of the domain.
  • outer_width[=nothing]: if hide_boundaries is specified, used to determine the decomposition of the domain into inner and outer regions.
  • boundary_conditions[=nothing]: a tuple of boundary condition batches for each side of every spatial direction.
  • async[=true]: if set to false, will block the host until the kernel is finished executing.
source

Writers

FastIce.Writers.write_h5Method
write_h5(arch::Architecture, grid::CartesianGrid, path, fields)

Write output fields in HDF5 format to a file on path.

source
FastIce.Writers.write_h5Method
write_h5(arch::Architecture{DistributedMPI}, grid::CartesianGrid, path, fields)

Write output fields in HDF5 format to a file on path for global grid on distributed arch.

source
FastIce.Writers.write_xdmfFunction
write_xdmf(arch::Architecture{DistributedMPI}, grid::CartesianGrid, path, fields, h5_names, timesteps=Float64(0.0))

Write Xdmf metadata to path for corresponding h5_names and fields for global grid on distributed arch. Saving time-dependant data can be achieved upon passing a vector to h5_names and timesteps.

source
FastIce.Writers.write_xdmfFunction
write_xdmf(arch::Architecture, grid::CartesianGrid, path, fields, h5_names, timesteps=Float64(0.0))

Write Xdmf metadata to path for corresponding h5_names and fields. Saving time-dependant data can be achieved upon passing a vector to h5_names and timesteps.

source
diff --git a/previews/PR49/usage/runtests/index.html b/previews/PR49/usage/runtests/index.html index 6b33825f..cc20316c 100644 --- a/previews/PR49/usage/runtests/index.html +++ b/previews/PR49/usage/runtests/index.html @@ -2,4 +2,4 @@ Running tests · FastIce

Running tests

CPU tests

To run the FastIce test suite on the CPU, simple run test from within the package mode or using Pkg:

using Pkg
 Pkg.test("FastIce")

GPU tests

To run the FastIce test suite on CUDA or ROC backend (Nvidia or AMD GPUs), respectively, run the tests using Pkg adding following test_args:

For CUDA backend (Nvidia GPUs):

using Pkg
 Pkg.test("FastIce"; test_args=["--backend=CUDA"])

For ROC backend (AMD GPUs):

using Pkg
-Pkg.test("FastIce"; test_args=["--backend=AMDGPU"])
+Pkg.test("FastIce"; test_args=["--backend=AMDGPU"])