Skip to content

Commit

Permalink
fix(FAM): Fam_Descriptor_Status issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mcakircali committed Nov 6, 2024
1 parent a6b564d commit 4ffb14a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/eckit/io/fam/FamObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void FamObject::deallocate() const {
}

auto FamObject::exists() const -> bool {
return (object_->get_desc_status() != Fam_Descriptor_Status::DESC_INVALID);
return (object_->get_desc_status() != FamDescriptorStatus::DESC_INVALID);
}

//----------------------------------------------------------------------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions src/eckit/io/fam/FamRegion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void FamRegion::destroy() const {
}

auto FamRegion::exists() const -> bool {
return (region_->get_desc_status() != Fam_Descriptor_Status::DESC_INVALID);
return (region_->get_desc_status() != FamDescriptorStatus::DESC_INVALID);
}

//----------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -106,10 +106,10 @@ void FamRegion::deallocateObject(const std::string& objectName) const {
void FamRegion::print(std::ostream& out) const {
out << "FamRegion[" << property() << ",status=";
switch (region_->get_desc_status()) {
case Fam_Descriptor_Status::DESC_INVALID: out << "invalid"; break;
case Fam_Descriptor_Status::DESC_INIT_DONE: out << "initialized"; break;
case Fam_Descriptor_Status::DESC_INIT_DONE_BUT_KEY_NOT_VALID: out << "initialized_invalidkey"; break;
case Fam_Descriptor_Status::DESC_UNINITIALIZED: out << "uninitialized"; break;
case FamDescriptorStatus::DESC_INVALID: out << "invalid"; break;
case FamDescriptorStatus::DESC_INIT_DONE: out << "initialized"; break;
case FamDescriptorStatus::DESC_INIT_DONE_BUT_KEY_NOT_VALID: out << "initialized_invalidkey"; break;
case FamDescriptorStatus::DESC_UNINITIALIZED: out << "uninitialized"; break;
default: out << "unknown"; break;
}
out << "]";
Expand Down
2 changes: 2 additions & 0 deletions src/eckit/io/fam/detail/FamSessionDetail.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

namespace eckit {

using FamDescriptorStatus = openfam::Fam_Descriptor_Status;

//----------------------------------------------------------------------------------------------------------------------
// SESSION

Expand Down

0 comments on commit 4ffb14a

Please sign in to comment.