Skip to content

Commit

Permalink
Adding warning
Browse files Browse the repository at this point in the history
  • Loading branch information
loumalouomega authored Dec 17, 2024
1 parent e75aa44 commit f13d987
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion kratos/sources/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,16 @@ bool Kernel::IsImported(const std::string& rApplicationName) const {
}

bool Kernel::IsLibraryAvailable(const std::string& rLibraryName) const {
return GetLibraryList().find(rLibraryName) != GetLibraryList().end();
const bool is_available = GetLibrayList().find(rLibraryName) != GetLibrayList().end();
if (!is_available) {
std::stringstream available_list_str;
available_list_str << "Library " << rLibraryName << " is not available. The following libraries are available: ";
for (const std::string& library : GetLibrayList()) {
available_list_str << library << "\n";
}
KRATOS_WARNING("Kernel") << available_list_str.str() << std::endl;
}
return is_available;
}

bool Kernel::IsDistributedRun() {
Expand Down

0 comments on commit f13d987

Please sign in to comment.