#include #include #include #include #include #include #include #include #include "Configuration.hpp" #include "MpiEnvironment.hpp" #include "MpiWireworld.hpp" #include "WireWorld.hpp" using namespace std::string_literals; int main(int argc, char* argv[]) { static constexpr auto DebugRank = 4; const auto& starttime = std::chrono::system_clock::now(); MpiEnvironment env(argc, argv); const auto& cfg = Configuration::parseArgs(argc, argv, env); MpiWireworld ww(env, cfg); //if (env.worldRank() == DebugRank) { auto err = std::system("clear"); } if (env.worldRank() == DebugRank) std::cout << ww << '\n'; for (std::size_t i{0}; i < 0; ++i) { using namespace std::chrono_literals; std::this_thread::sleep_for(.5s); ww.simulateStep(); if (env.worldRank() == DebugRank) { auto err = std::system("clear"); } if (env.worldRank() == DebugRank) std::cout << ww << '\n'; } if (env.isMaster()) { std::cout << "Execution time:" << std::chrono::duration{std::chrono::system_clock::now() - starttime} .count() << "s\n"; } return EXIT_SUCCESS; }