void TestU01Suite::assess() //****************************************************************************** // Output final assessment //! \author J. Bakosi //****************************************************************************** { // Output summary of failed tests for all RNGs tested if ( !m_failed.empty() ) { const auto rngs = g_inputdeck.get< tag::selected, tag::rng >(); m_print.failed( "Failed statistics", m_npval*rngs.size(), m_failed ); } else m_print.note< tk::QUIET >( "All tests passed" ); // Cost and quality assessment only for more than one RNG if (m_time.size() > 1) { // Output measured times per RNG in order of computational cost m_print.cost( "Generator cost", "Measured times in seconds in increasing order (low is good)", m_time ); // Output number of failed tests per RNG in order of decreasing quality m_print.rank( "Generator quality", "Number of failed tests in increasing order (low is good)", m_nfail ); } // Quit mainProxy.finalize(); }
void RegSuite::evaluate( std::vector< std::string > status ) //****************************************************************************** // Evaluate a unit test //! \param[in] status Vector strings containing the test results. //! \author J. Bakosi //****************************************************************************** { // Increase number of tests run ++m_nrun; // Evaluate test evaluate( status, m_ncomplete, m_nwarn, m_nskip, m_nexcp, m_nfail ); // Echo one-liner info on result of test m_print.test( m_ncomplete, m_nfail, status ); // Wait for all tests to finish, then quit if (m_nrun == m_ntest) { // assess( m_print, "serial and Charm++", m_nfail, m_nwarn, m_nskip, m_nexcp, // m_ncomplete ); // Quit mainProxy.finalize( true ); } }
RegSuite::RegSuite( const ctr::CmdLine& cmdline ) : m_print( cmdline.get< tag::verbose >() ? std::cout : std::clog ), m_ntest( 0 ), m_nrun( 0 ), m_ncomplete( 0 ), m_nfail( 0 ), m_nskip( 0 ), m_nwarn( 0 ), m_nexcp( 0 ) //****************************************************************************** // Constructor //! \param[in] cmdline Data structure storing data from the command-line parser //! \author J. Bakosi //****************************************************************************** { // Get group name string passed in by -g const auto grp = cmdline.get< tag::group >(); // If only select groups to be run, see if there is any that will run bool work = false; if (grp.empty()) work = true; else work = true; // for now there is always work // Quit if there is no work to be done if (!work) { m_print.note( "\nNo regression test groups to be executed because no test " "group names match '" + grp + "'.\n" ); mainProxy.finalize( false ); } else { m_print.endpart(); m_print.part( "Regression test suite" ); m_print.reghead( "Regression tests computed", grp ); // Fire up all tests using the Charm++ runtime system const std::vector< std::string > tests { "./charmrun +p1 Main/unittest -g Exc", "./charmrun +p2 Main/unittest -g MKL", "./charmrun +p3 Main/unittest -g MPI", "./charmrun +p4 Main/unittest" }; for (const auto& t : tests) if (grp.empty()) { // consider all test groups spawntest( t ); } else if (t.find(grp) != std::string::npos) { // spawn only the tests that match the string specified via -g string spawntest( t ); } } }
void MeshConvDriver::execute() const //****************************************************************************** // Execute: Convert mesh file //! \author J. Bakosi //****************************************************************************** { std::pair< std::string, tk::real > rtime, wtime; tk::writeUnsMesh( m_output, tk::readUnsMesh(m_input,rtime), wtime ); mainProxy.timestamp( { rtime, wtime } ); mainProxy.finalize(); }
void Conductor::finish() // ***************************************************************************** // Normal finish of time stepping //! \author J. Bakosi // ***************************************************************************** { // Print out reason for stopping const auto nstep = g_inputdeck.get< tag::discr, tag::nstep >(); m_print.endsubsection(); if (m_it >= nstep) m_print.note( "Normal finish, maximum number of iterations reached: " + std::to_string( nstep ) ); else m_print.note( "Normal finish, maximum time reached: " + std::to_string( g_inputdeck.get<tag::discr,tag::term>() ) ); // Quit mainProxy.finalize(); }
void MeshConvDriver::execute() const // ***************************************************************************** // Execute: Convert mesh file //! \author J. Bakosi // ***************************************************************************** { m_print.endsubsection(); std::vector< std::pair< std::string, tk::real > > times( 1 ); auto mesh = tk::readUnsMesh( m_print, m_input, times[0] ); auto wtimes = tk::writeUnsMesh( m_print, m_output, mesh, m_reorder ); times.insert( end(times), begin(wtimes), end(wtimes) ); mainProxy.timestamp( times ); mainProxy.finalize(); }