Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add QMCPACK prefix to ERROR and WARNING #5191

Merged
merged 4 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMake/macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function(
set_tests_properties(
${TESTNAME}
PROPERTIES FAIL_REGULAR_EXPRESSION
"ERROR"
"QMCPACK ERROR"
PASS_REGULAR_EXPRESSION
"QMCPACK execution completed successfully"
PROCESSORS
Expand All @@ -166,7 +166,7 @@ function(
set_tests_properties(
${TESTNAME}
PROPERTIES FAIL_REGULAR_EXPRESSION
"ERROR"
"QMCPACK ERROR"
PASS_REGULAR_EXPRESSION
"QMCPACK execution completed successfully"
PROCESSORS
Expand Down
4 changes: 2 additions & 2 deletions src/Platforms/Host/OutputManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ inline std::ostream& app_summary() { return infoSummary.getStream(); }

inline std::ostream& app_log() { return infoLog.getStream(); }

inline std::ostream& app_error() { return infoError.getStream() << "ERROR "; }
inline std::ostream& app_error() { return infoError.getStream() << "QMCPACK ERROR "; }

inline std::ostream& app_warning() { return infoLog.getStream() << "WARNING "; }
inline std::ostream& app_warning() { return infoLog.getStream() << "QMCPACK WARNING "; }

inline std::ostream& app_debug_stream() { return infoDebug.getStream(); }

Expand Down
6 changes: 3 additions & 3 deletions src/Platforms/SYCL/SYCLallocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct SYCLSharedAllocator
template<class U>
struct rebind
{
typedef SYCLSharedAllocator<U> other;
typedef SYCLSharedAllocator<U, ALIGN> other;
};

T* allocate(std::size_t n)
Expand Down Expand Up @@ -112,7 +112,7 @@ class SYCLAllocator
template<class U>
struct rebind
{
typedef SYCLAllocator<U> other;
typedef SYCLAllocator<U, ALIGN> other;
};

T* allocate(std::size_t n)
Expand Down Expand Up @@ -228,7 +228,7 @@ struct SYCLHostAllocator
template<class U>
struct rebind
{
typedef SYCLHostAllocator<U> other;
typedef SYCLHostAllocator<U, ALIGN> other;
};

T* allocate(std::size_t n) { return sycl::aligned_alloc_host<T>(ALIGN, n, getSYCLDefaultDeviceDefaultQueue()); }
Expand Down
8 changes: 5 additions & 3 deletions src/QMCHamiltonians/SOECPotential.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,15 @@
const auto& displ = ble.getDisplRow(jel);
for (int iat = 0; iat < num_ions_; iat++)
if (pp_[iat] != nullptr && dist[iat] < pp_[iat]->getRmax())
{
if (use_exact_spin_)
value_ += pp_[iat]->evaluateValueAndDerivativesExactSpinIntegration(P, iat, psi_, jel, dist[iat], -displ[iat], optvars, dlogpsi,
dhpsioverpsi);
value_ += pp_[iat]->evaluateValueAndDerivativesExactSpinIntegration(P, iat, psi_, jel, dist[iat], -displ[iat],

Check warning on line 133 in src/QMCHamiltonians/SOECPotential.cpp

View check run for this annotation

Codecov / codecov/patch

src/QMCHamiltonians/SOECPotential.cpp#L133

Added line #L133 was not covered by tests
optvars, dlogpsi, dhpsioverpsi);

else
value_ += pp_[iat]->evaluateValueAndDerivatives(P, iat, psi_, jel, dist[iat], -displ[iat], optvars, dlogpsi,
dhpsioverpsi);
dhpsioverpsi);
}
}
return value_;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Utilities/tests/test_output_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ TEST_CASE("OutputManager output", "[utilities]")
REQUIRE(summary_out.str() == "test1");
REQUIRE(app_out.str() == "");
REQUIRE(debug_out.str() == "");
REQUIRE(err_out.str() == "ERROR test4");
REQUIRE(err_out.str() == "QMCPACK ERROR test4");

reset_string_output();

Expand All @@ -88,7 +88,7 @@ TEST_CASE("OutputManager output", "[utilities]")
REQUIRE(summary_out.str() == "test5");
REQUIRE(app_out.str() == "test6");
REQUIRE(debug_out.str() == "");
REQUIRE(err_out.str() == "ERROR test8");
REQUIRE(err_out.str() == "QMCPACK ERROR test8");

reset_string_output();

Expand All @@ -102,7 +102,7 @@ TEST_CASE("OutputManager output", "[utilities]")
REQUIRE(summary_out.str() == "test9");
REQUIRE(app_out.str() == "testA");
REQUIRE(debug_out.str() == "testB");
REQUIRE(err_out.str() == "ERROR testC");
REQUIRE(err_out.str() == "QMCPACK ERROR testC");
}

TEST_CASE("OutputManager pause", "[utilities]")
Expand Down
6 changes: 3 additions & 3 deletions tests/solids/diamondC_2x1x1_pp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ if(QMC_MIXED_PRECISION)
list(APPEND DET_DIAMOND2_EXCITED_SCALARS "kinetic" "19.80808002 0.00006011")
list(APPEND DET_DIAMOND2_EXCITED_SCALARS "potential" "-40.71000239 0.00004784")
list(APPEND DET_DIAMOND2_EXCITED_SCALARS "eeenergy" "-4.88667164 0.00001946")
list(APPEND DET_DIAMOND2_EXCITED_SCALARS "ionion" "-25.55133347 0.00000135")
list(APPEND DET_DIAMOND2_EXCITED_SCALARS "ionion" "-25.55133347 0.0000015")
list(APPEND DET_DIAMOND2_EXCITED_SCALARS "localecp" "-12.28328453 0.00004867")
list(APPEND DET_DIAMOND2_EXCITED_SCALARS "nonlocalecp" "2.01130431 0.00000802")
list(APPEND DET_DIAMOND2_EXCITED_SCALARS "samples" "9.00000000 0.0")
Expand Down Expand Up @@ -580,7 +580,7 @@ if(QMC_MIXED_PRECISION)
list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "kinetic" "24.78874085 0.00002343")
list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "potential" "-44.85577373 0.00001142")
list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "eeenergy" "-5.88258752 0.00000163")
list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "ionion" "-25.55133347 0.00000135")
list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "ionion" "-25.55133347 0.0000015")
list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "localecp" "-16.39536396 0.00001074")
list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "nonlocalecp" "2.97349421 0.00001354")
list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "samples" "9.00000000 0.0")
Expand Down Expand Up @@ -1447,7 +1447,7 @@ if(QMC_MIXED_PRECISION)
list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "kinetic" "17.47460491 0.00002343")
list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "potential" "-38.41708469 0.00001142")
list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "eeenergy" "-5.71281757 0.00000163")
list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "ionion" "-25.55133347 0.00000135")
list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "ionion" "-25.55133347 0.0000015")
list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "localecp" "-8.33525669 0.00001074")
list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "nonlocalecp" "1.18232314 0.00001354")
endif()
Expand Down
Loading