Commit 74c330ab authored by incardon's avatar incardon

Latest modules

parent 856eec94
......@@ -8,9 +8,13 @@ else
CUDA_CC=nvcc
endif
CC_SCOREP=scorep --nocompiler --cuda --mpp=mpi nvcc
CC=$(CUDA_CC) #${CC_SCOREP}
CC_MPI=mpic++
ifeq ($(PROFILE),ON)
CC=scorep --nocompiler --cuda --mpp=mpi nvcc
CC_MPI=mpic++
else
CC=$(CUDA_CC)
CC_MPI=mpic++
endif
LDIR =
OPT=
......
......@@ -13,8 +13,12 @@ else
CUDA_CC_LINK=nvcc
endif
CC=mpic++
ifeq ($(PROFILE),ON)
CUDA_CC=scorep --nocompiler --cuda --mpp=mpi nvcc
CUDA_CC_LINK=nvcc
else
CUDA_CC_LINK=nvcc
endif
LDIR =
OPT=
......
......@@ -348,7 +348,7 @@ __global__ void calc_forces_gpu(particles_type vd, NN_type NN, real_number W_dap
real_number r2 = norm2(dr);
// if they interact
if (r2 < FourH2)
if (r2 < FourH2 && dr >= 1e-8)
{
real_number r = sqrt(r2);
......@@ -942,6 +942,8 @@ int main(int argc, char* argv[])
vd_out.getLastPos()[1] = vd.getPos(p)[1];
vd_out.getLastPos()[2] = vd.getPos(p)[2];
vd_out.template getLastProp<0>() = vd.template getProp<type>(p);
vd_out.template getLastProp<1>()[0] = vd.template getProp<velocity>(p)[0];
vd_out.template getLastProp<1>()[1] = vd.template getProp<velocity>(p)[1];
vd_out.template getLastProp<1>()[2] = vd.template getProp<velocity>(p)[2];
......
openfpm_vcluster @ e105e6ef
Subproject commit 309c31433036534153366a27f8ad52c85c8dabb2
Subproject commit e105e6ef793fa254da78c643c06bafdd858f0bb1
......@@ -218,6 +218,10 @@ public:
*/
void setParameters(const CartDecomposition<dim,T,Memory,layout_base,Distribution> & dec, const Ghost<dim,T> & g, const ::Box<dim,T> & ext_domain)
{
// Set the decomposition parameters
this->gr.setDimensions(dec.gr.getSize());
this->cd.setDimensions(ext_domain, dec.gr.getSize(), 0);
this->box_nn_processor = dec.box_nn_processor;
// Calculate new sub-domains for extended domain
......@@ -225,7 +229,6 @@ public:
// Calculate fine_s structure for the extended domain
// update the cell decomposer and gr
// extend_fines(dec);
reconstruct_fine_s_from_extended_domain(ext_domain);
// Get the old sub-sub-domain grid extension
......
......@@ -12,6 +12,7 @@
#include "util/cuda/moderngpu/kernel_reduce.hxx"
#include "util/cuda/moderngpu/kernel_scan.hxx"
#include "Decomposition/common.hpp"
#include "lib/pdata.hpp"
template<unsigned int dim, typename St, typename decomposition_type, typename vector_type, typename start_type, typename output_type>
__global__ void proc_label_id_ghost(decomposition_type dec,vector_type vd, start_type starts, output_type out)
......@@ -349,6 +350,8 @@ void remove_marked(vector_type & vd)
// first we do a scan of the property
openfpm::vector_gpu<aggregate<unsigned int>> idx;
idx.setMemory(mem_tmp);
idx.resize(vd.size_local());
auto ite = idx.getGPUIterator();
......
......@@ -239,8 +239,21 @@ template<typename vector_type> void test_dlb_vector()
}
vd.map();
////////////// DEBUG ////////////////////////
vd.write("bug_test_init_before");
/////////////////////////////////////////////
vd.template ghost_get<>();
////////////// DEBUG ////////////////////////
vd.write("bug_test_init_after");
/////////////////////////////////////////////
// Get the neighborhood of each particles
auto VV = vd.getVerlet(0.01);
......@@ -260,10 +273,24 @@ template<typename vector_type> void test_dlb_vector()
ModelSquare md;
md.factor = 10;
vd.map();
////////////// DEBUG ////////////////////////
vd.write("bug_test_before_dlb");
/////////////////////////////////////////////
vd.addComputationCosts(md);
vd.getDecomposition().decompose();
vd.map();
////////////// DEBUG ////////////////////////
vd.write("bug_test_after_dlb");
/////////////////////////////////////////////
vd.addComputationCosts(md);
openfpm::vector<size_t> loads;
......@@ -299,9 +326,24 @@ template<typename vector_type> void test_dlb_vector()
++it;
}
vd.map();
////////////// DEBUG ////////////////////////
vd.write_frame("bug_test_before",i);
/////////////////////////////////////////////
vd.template ghost_get<>();
////////////// DEBUG ////////////////////////
vd.getDecomposition().write("dec_test");
vd.write_frame("bug_test_after",i);
/////////////////////////////////////////////
auto VV2 = vd.getVerlet(0.01);
auto it2 = vd.getDomainIterator();
......
......@@ -292,6 +292,9 @@ class vector_dist_comm
};
openfpm::vector<sh_box> reord_shift;
box_f.clear();
map_cmb.clear();
box_cmb.clear();
// Add local particles coming from periodic boundary, the only boxes that count are the one
// touching the border
......
......@@ -4,7 +4,7 @@
* Created on: Feb 5, 2016
* Author: Pietro Incardona
*/
#include "pdata.hpp"
#include "SubdomainGraphNodes.hpp"
const std::string nm_v::attributes::name[] = {"x","migration","computation","global_id","id","sub_id","proc_id","id","fake_v"};
......@@ -13,4 +13,3 @@ const std::string nm_part_v::attributes::name[] = {"id","sub_id"};
const std::string nm_part_e::attributes::name[] = {"id"};
#include "config.h"
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