fi_av_set(3) | #VERSION# | fi_av_set(3) |
fi_av_set - Address vector set operations
#include <rdma/fi_collective.h> int fi_av_set(struct fid_av *av, struct fi_av_set_attr *attr,
struct fid_av_set **set, void * context); int fi_av_set_union(struct fid_av_set *dst, const struct fid_av_set *src); int fi_av_set_intersect(struct fid_av_set *dst, const struct fid_av_set *src); int fi_av_set_diff(struct fid_av_set *dst, const struct fid_av_set *src); int fi_av_set_insert(struct fid_av_set *set, fi_addr_t addr); int fi_av_set_remove(struct fid_av_set *set, fi_addr_t addr); int fi_av_set_addr(struct fid_av_set *set, fi_addr_t *coll_addr); int fi_close(struct fid *av_set);
An address vector set (AV set) represents an ordered subset of addresses of an address vector. AV sets are used to identify the participants in a collective operation. Endpoints use the fi_join_collective() operation to associate itself with an AV set. The join collective operation provides an fi_addr that is used when communicating with a collective group.
The creation and manipulation of an AV set is a local operation. No fabric traffic is exchanged between peers. As a result, each peer is responsible for creating matching AV sets as part of their collective membership definition. See fi_collective(3) for a discussion of membership models.
The fi_av_set call creates a new AV set. The initial properties of the AV set are specified through the struct fi_av_set_attr parameter. This structure is defined below, and allows including a subset of addresses in the AV set as part of AV set creation. Addresses may be added or removed from an AV set using the AV set interfaces defined below.
struct fi_av_set_attr {
size_t count;
fi_addr_t start_addr;
fi_addr_t end_addr;
uint64_t stride;
size_t comm_key_size;
uint8_t *comm_key;
uint64_t flags; };
The number of addresses between start_addr and end_addr must be less than or equal to the specified count value.
The AV set union call adds all addresses in the source AV set that are not in the destination AV set to the destination AV set. Where ordering matters, the newly inserted addresses are placed at the end of the AV set.
The AV set intersect call remove all addresses from the destination AV set that are not also members of the source AV set. The order of the addresses in the destination AV set is unchanged.
The AV set difference call removes all address from the destination AV set that are also members of the source AV set. The order of the addresses in the destination AV set is unchanged.
The AV set insert call appends the specified address to the end of the AV set.
The AV set remove call removes the specified address from the given AV set. The order of the remaining addresses in the AV set is unchanged.
Returns an address that may be used to communicate with all current members of an AV set. This is a local operation only that does not involve network communication. The returned address may be used as input into fi_join_collective. Note that attempting to use the address returned from fi_av_set_addr (e.g. passing it to fi_join_collective) while simultaneously modifying the addresses stored in an AV set results in undefined behavior.
Closes an AV set and releases all resources associated with it. Any operations active at the time an AV set is closed will be aborted, with the result of the collective undefined.
The following flags may be specified as part of AV set creation.
Developers who are familiar with MPI will find that AV sets are similar to MPI groups, and may act as a direct mapping in some, but not all, situations.
By default an AV set will be created to support all collective operations supported by the underlying provider (see fi_query_collective). Users may reduce resource requirements by specifying only those collection operations needed by the AV set through the use of creation flags: FI_BARRIER_SET, FI_BROADCAST_SET, etc. If no such flags are specified, the AV set will be configured to support any that are supported. It is an error for a user to request an unsupported collective.
Returns 0 on success. On error, a negative value corresponding to fabric errno is returned. Fabric errno values are defined in rdma/fi_errno.h.
OpenFabrics.
2022-12-11 | Libfabric Programmer’s Manual |