11#include < algorithm>
22
3- #include " quickdigest5.hpp"
4- #include " YamlCheck.H"
3+ #include " quickdigest5.hpp" // for md5 hashing of Python modules
4+ #include " YamlCheck.H" // for YAML configuration checking
55#include " EXPException.H"
66#include " BiorthBasis.H"
77#include " DiskModels.H"
1313#endif
1414
1515// Suppress HDF5 diagonostic messages from base layer when using
16- // HighFive
17- #define HDF5_QUIET
16+ // HighFive. This should be enabled unless one is debugging.
17+ // #define HDF5_QUIET
1818
1919namespace BasisClasses
2020{
@@ -1608,7 +1608,7 @@ namespace BasisClasses
16081608 // Mute HDF5 error messages
16091609 H5Eset_auto2 (H5E_DEFAULT, NULL , NULL );
16101610
1611- // Unmute (Restore)
1611+ // For unmute, use:
16121612 // H5Eset_auto2(H5E_DEFAULT, old_func, old_client_data);
16131613#endif
16141614
@@ -1710,18 +1710,21 @@ namespace BasisClasses
17101710 current_md5 = QuickDigest5::fileToHash (pyname + " .py" );
17111711 } catch (const std::runtime_error& e) {
17121712 if (myid==0 )
1713- std::cerr << " Error: " << e.what () << std::endl;
1713+ std::cerr << " BiorthBasis::Cylindrical error: "
1714+ << e.what () << " , error compuing pyname md5sum"
1715+ << std::endl;
17141716 }
17151717
17161718 // Check that the md5sums match for the current Python
1717- // module and the loaded Python module used to create the
1718- // cache. If they do not match, force cache recomputation
1719- // to ensure consistency with the current Python module.
1719+ // module and the Python module used to create the
1720+ // cache. If they do not match, force cache
1721+ // recomputation to ensure consistency with the current
1722+ // Python module.
17201723 if (current_md5 != pyinfo[1 ]) {
17211724 if (myid==0 ) {
17221725 std::cout << " ---- Cylindrical: Python module for disk density has changed since cache creation." << std::endl
17231726 << " ---- Current module: <" << pyname << " >, md5sum: " << current_md5 << std::endl
1724- << " ---- Loaded module: <" << pyinfo[0 ] << " >, md5sum: " << pyinfo[1 ] << std::endl
1727+ << " ---- Cached module: <" << pyinfo[0 ] << " >, md5sum: " << pyinfo[1 ] << std::endl
17251728 << " ---- Cylindrical: forcing cache recomputation to ensure consistency" << std::endl;
17261729 }
17271730 cache_status = 0 ;
@@ -1806,15 +1809,17 @@ namespace BasisClasses
18061809 current_md5 = QuickDigest5::fileToHash (pyproj + " .py" );
18071810 } catch (const std::runtime_error& e) {
18081811 if (myid==0 )
1809- std::cerr << " Error: " << e.what () << std::endl;
1812+ std::cerr << " BiorthBasis::Cylindrical error: "
1813+ << e.what () << " , error computing pyproj md5sum"
1814+ << std::endl;
18101815 }
18111816 // Check that the md5sums match for the current Python projection
18121817 //
18131818 if (current_md5 != pyinfo[1 ]) {
18141819 if (myid==0 ) {
18151820 std::cout << " ---- Cylindrical: Python module for deprojection has changed since cache creation." << std::endl
18161821 << " ---- Current module: <" << pyproj << " >, md5sum: " << current_md5 << std::endl
1817- << " ---- Loaded module: <" << pyinfo[0 ] << " >, md5sum: " << pyinfo[1 ] << std::endl
1822+ << " ---- Cached module: <" << pyinfo[0 ] << " >, md5sum: " << pyinfo[1 ] << std::endl
18181823 << " ---- Cylindrical: forcing cache recomputation to ensure consistency" << std::endl;
18191824 }
18201825 cache_status = 0 ;
@@ -2028,8 +2033,10 @@ namespace BasisClasses
20282033
20292034 } catch (const std::runtime_error& e) {
20302035 if (myid==0 ) {
2031- std::cerr << " Error: " << e.what () << std::endl;
2032- std::cerr << " Can not write the md5 hash to HDF5" << std::endl;
2036+ std::cerr << " BiorthBasis::Cylindrical error: "
2037+ << e.what ()
2038+ << " , can not write the pyname and md5 hash to HDF5"
2039+ << std::endl;
20332040 }
20342041 }
20352042 }
@@ -2055,8 +2062,10 @@ namespace BasisClasses
20552062 << " > to cache file <" << cachename << " >" << std::endl;
20562063 } catch (const std::runtime_error& e) {
20572064 if (myid==0 ) {
2058- std::cerr << " Error: " << e.what () << std::endl;
2059- std::cerr << " Can not write the md5 hash to HDF5" << std::endl;
2065+ std::cerr << " BiorthBasis::Cylindrical error: "
2066+ << e.what ()
2067+ << " , can not write the pyinfo and md5 hash to HDF5"
2068+ << std::endl;
20602069 }
20612070 }
20622071 }
@@ -2074,7 +2083,7 @@ namespace BasisClasses
20742083 }
20752084
20762085#ifdef HDF5_QUIET
2077- // Unmute HDF5 error messages (Restore)
2086+ // Unmute HDF5 error messages
20782087 H5Eset_auto2 (H5E_DEFAULT, old_func, old_client_data);
20792088#endif
20802089 // Orthogonality sanity check
0 commit comments