#[non_exhaustive]pub enum Error {
Show 19 variants
NotHostResident,
NonCompact,
UnsupportedDType {
dtype: DType,
},
TooManyElements {
elements: u64,
max: u64,
},
RankTooLarge {
rank: usize,
max: usize,
},
InvalidTag {
tag: i32,
},
SelfMessage,
DTypeMismatch {
expected: DType,
received: DType,
},
RankMismatch {
expected: usize,
received: usize,
},
ShapeMismatch {
expected: Vec<usize>,
received: Vec<usize>,
},
UnsupportedVersion {
received: u16,
supported: u16,
},
MalformedHeader {
reason: &'static str,
},
UnexpectedFrame {
kind: u8,
},
ByteOrderMismatch {
received: u8,
},
PeerRejected {
reason: RejectReason,
},
PeerAborted {
reason: AbortReason,
},
PayloadCountMismatch {
expected: i64,
received: i64,
},
InvalidBoolPayload,
Tensor(Error),
}Expand description
Failure of one transport call.
Variants split into three groups: local argument and payload checks (nothing is
sent), receiver-side validation the sender is told about through the ack frame
(Self::PeerRejected), and sender-side aborts the receiver is told about
through an abort header (Self::PeerAborted).
§Examples
use tenferro_mpi::Error;
let error = Error::InvalidTag { tag: -1 };
assert_eq!(error.to_string(), "tag -1 is negative");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotHostResident
The tensor’s storage is not host-addressed memory; nothing was sent.
The adapter never transfers between host and device: download the tensor
explicitly (for a Dynamic owner, TypedTensor::into_host) first.
NonCompact
The payload is not one compact column-major host slice; nothing was sent.
UnsupportedDType
The dtype has no wire encoding; nothing was sent.
TooManyElements
More elements than one MPI message can carry; nothing was sent.
Fields
RankTooLarge
The rank exceeds crate::MAX_WIRE_RANK; nothing was sent.
InvalidTag
The tag is negative; nothing was sent.
SelfMessage
A blocking send to the calling rank would deadlock; nothing was sent.
DTypeMismatch
The receiver holds a different element type; the payload was not sent.
RankMismatch
The receiver holds a different rank; the payload was not sent.
ShapeMismatch
The receiver holds a different shape; the payload was not sent.
Fields
UnsupportedVersion
The frame’s protocol version is not this crate’s.
MalformedHeader
A frame could not be decoded.
UnexpectedFrame
A frame arrived where the protocol expects a different one.
Two ranks that send to each other on one tag at the same time each see the other’s header here, instead of hanging.
ByteOrderMismatch
The peer’s element byte order differs from the receiver’s.
PeerRejected
The receiver refused the tensor; it sent this reason in the ack frame.
Fields
reason: RejectReasonThe receiver’s reason.
PeerAborted
The sender aborted before sending a payload.
Fields
reason: AbortReasonThe sender’s reason.
PayloadCountMismatch
The received payload length disagrees with the header.
Fields
InvalidBoolPayload
A bool payload carried a byte other than 0 or 1.
Tensor(Error)
A tenferro tensor accessor failed.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()