Commit 03449d8c authored by BRAMAS Berenger's avatar BRAMAS Berenger
parents 068c1bd8 7c28126d
......@@ -60,6 +60,11 @@
#include "Utils/FTemplate.hpp"
#ifdef MEMORY_USAGE
#include <sys/time.h>
#include <sys/resource.h>
#endif
#define RANDOM_PARTICLES
const FParameterNames LocalOrder { {"-order"}, "Order of the kernel"};
......@@ -536,7 +541,12 @@ struct RunContainer{
}
} // -----------------------------------------------------
#ifdef MEMORY_USAGE
// Get the maximum resident set size (RSS) in kilobytes
struct rusage usage;
getrusage(RUSAGE_SELF, &usage);
std::cout << "Done " << "(@RSS = " << usage.ru_maxrss << "KB)." << std::endl;
#endif
if(FParameters::existParameter(argc, argv, LocalOptionNoValidate.options) == false){
// -----------------------------------------------------
FMath::FAccurater<FReal> potentialDiff;
......@@ -651,6 +661,13 @@ struct RunContainer{
groupalgo.execute();
std::cout << "Done " << "(@Algorithm = " << timer.tacAndElapsed() << "s)." << std::endl;
#ifdef MEMORY_USAGE
// Get the maximum resident set size (RSS) in kilobytes
struct rusage usage;
getrusage(RUSAGE_SELF, &usage);
std::cout << "Done " << "(@RSS = " << usage.ru_maxrss << "KB)." << std::endl;
#endif
// Validate the result
if(FParameters::existParameter(argc, argv, LocalOptionNoValidate.options) == false){
FSize offsetParticles = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment