Commit d788edc1 authored by BRAMAS Berenger's avatar BRAMAS Berenger

Changed the default block size

parent 715e6412
......@@ -470,9 +470,12 @@ public:
}
/** Run starpu */
void initStarpu(){
void initStarpu(const int nbThreads = -1){
starpu_conf setup;
starpu_conf_init(&setup);
setup.ncpus = nbThreads;
// Run starpu
starpu_init(NULL);
starpu_init(&setup);
FDEBUG(FDebug::Controller << "Init starpu, there are " << starpu_worker_get_count() << " workers\n");
// Init
......
......@@ -322,7 +322,7 @@ public:
* An assert is launched if one of the arguments is null
*/
FFmmAlgorithmStarpuGroup(OctreeClass* const inTree, KernelClass* const inKernel,
const int inBlockedSize = 25, const bool inUseStarpuPerfModel = false)
const int inBlockedSize = 250, const bool inUseStarpuPerfModel = false)
: tree(inTree), OctreeHeight(tree->getHeight()),
BlockSize(inBlockedSize),
blockedTree(new Group*[OctreeHeight + 1]) ,
......@@ -351,11 +351,14 @@ public:
/**
*/
void buildGroups(){
void buildGroups(const int nbThreads = -1){
FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) );
// star starpu
starpu_init(NULL);
starpu_conf setup;
starpu_conf_init(&setup);
setup.ncpus = nbThreads;
// Run starpu
starpu_init(&setup);
FDEBUG(FDebug::Controller << "Start starpu runtime, Nb Workers = " << starpu_worker_get_count() << "\n");
// create codelet
......
......@@ -106,7 +106,7 @@ int main(int argc, char ** argv){
//////////////////////////////////////////////////////////////
const int NbLevels = FParameters::getValue(argc,argv,"-h", 5);
const int SizeSubLevels = FParameters::getValue(argc,argv,"-sh", 3);
const int BlockSize = FParameters::getValue(argc,argv,"-bs", 40);
const int BlockSize = FParameters::getValue(argc,argv,"-bs", 250);
FTic counter;
const char* const filename = FParameters::getStr(argc,argv,"-f", "../Data/test20k.fma");
......
......@@ -243,7 +243,8 @@ int main(int argc, char ** argv){
const int DevP = FParameters::getValue(argc,argv,"-p", 8);
const int NbLevels = FParameters::getValue(argc,argv,"-h", 5);
const int SizeSubLevels = FParameters::getValue(argc,argv,"-sh", 3);
const int BlockSize = FParameters::getValue(argc,argv,"-bs", 40);
const int BlockSize = FParameters::getValue(argc,argv,"-bs", 250);
const int NbThread = FParameters::getValue(argc,argv,"-t", -1);
FTic counter;
const char* const filename = FParameters::getStr(argc,argv,"-f", "../Data/test20k.fma");
......@@ -279,7 +280,7 @@ int main(int argc, char ** argv){
std::cout << "Build gouped tree..." << std::endl;
counter.tic();
algo.buildGroups();
algo.buildGroups(NbThread);
counter.tac();
std::cout << "Done in " << counter.elapsed() << "s." << std::endl;
......
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