Commit c4990e32 authored by COULAUD Olivier's avatar COULAUD Olivier

Add OPENMP Version, Fix bux in Periodic but results are still wrong ; add omp4 to test algorithm

parent c76e1738
......@@ -36,7 +36,6 @@ set(SCALFMM_MINOR_VERSION 0)
set(SCALFMM_PATCH_VERSION rc0)
set(SCALFMM_VERSION "${SCALFMM_MAJOR_VERSION}.${SCALFMM_MINOR_VERSION}.${SCALFMM_PATCH_VERSION}" )
SET(CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_STANDARD 14)
......@@ -113,6 +112,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse_
option( SCALFMM_SIMGRID_NODATA "Set to ON to avoid the allocation of numerical parts in the group tree" OFF )
option( STARPU_SIMGRID_MLR_MODELS "Set to ON to enable MLR models need for calibration and simulation" OFF )
# OPENMP 4/5 support
message(WARNING "OpenMP_VERSION: ${OpenMP_VERSION}")
option( OPENMP_SUPPORT_PRIORITY "Set to ON to enable tasks priority (OMP4.x/KSTAR/StarPU compiler only)" OFF )
# STARPU options
CMAKE_DEPENDENT_OPTION(OPENMP_SUPPORT_COMMUTE "Set to ON to let tasks commute (KSTAR/StarPU compiler only)" OFF
......
......@@ -211,7 +211,7 @@ int main(int argc, char* argv[])
// -----------------------------------------------------
std::vector<MortonIndex> mortonLeafDistribution(2*app.global().processCount());
FAbstractAlgorithm * algorithm = nullptr;
FAlgorithmTimers * timer = nullptr;
//FAlgorithmTimers * timer = nullptr;
{ // -----------------------------------------------------
std::cout << "\n"<<interpolationType<<" FMM Proc (ORDER="<< ORDER << ") ... " << std::endl;
......@@ -233,11 +233,11 @@ int main(int argc, char* argv[])
///////////////////////////////////////////////////////////////////////////////////////////////////
if(! periodicCondition) {// Non periodic case
algorithm = &algoNoPer ;
timer = &algoNoPer ;
//timer = &algoNoPer ;
}
else { // Periodic case
algorithm = &algoPer ;
timer = &algoPer ;
//timer = &algoPer ;
}
//
// FMM exectution FFmmFarField
......
......@@ -1893,11 +1893,11 @@ protected:
if( !offsets[idxNeig].equals(0,0,0) ){
// Put periodic neighbors into other array
FReal*const positionsX = periodicNeighbors[idxNeig]->getPositions()[0];
FReal*const positionsY = periodicNeighbors[idxNeig]->getPositions()[1];
FReal*const positionsZ = periodicNeighbors[idxNeig]->getPositions()[2];
FReal*const positionsX = neighbors[idxNeig]->getPositions()[0];
FReal*const positionsY = neighbors[idxNeig]->getPositions()[1];
FReal*const positionsZ = neighbors[idxNeig]->getPositions()[2];
for(FSize idxPart = 0; idxPart < periodicNeighbors[idxNeig]->getNbParticles() ; ++idxPart){
for(FSize idxPart = 0; idxPart < neighbors[idxNeig]->getNbParticles() ; ++idxPart){
positionsX[idxPart] += boxWidth * FReal(offsets[idxNeig].getX());
positionsY[idxPart] += boxWidth * FReal(offsets[idxNeig].getY());
positionsZ[idxPart] += boxWidth * FReal(offsets[idxNeig].getZ());
......
......@@ -83,7 +83,7 @@ using FmmType = FFmmAlgorithm<OctreeType,CellType,ContainerType,KernelType,Leaf
// Simply create particles and try the kernels
int main(int argc, char* argv[]) {
const FParameterNames LocalOptionAlgo= { {"-algo"} , " Algorithm to run (task, newtask, sectiontask)\n"};
const FParameterNames LocalOptionAlgo= { {"-algo"} , " Algorithm to run (task, newtask, sectiontask, omp4)\n"};
const FParameterNames LocalOptionCmp = {
{"-cmp"} , "Use to check the result with the exact solution given in the input file\n" };
FHelpDescribeAndExit(
......
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