Commit 03ab49f8 authored by incardon's avatar incardon

Release_0.8.0 candidate

parent 3f03c2b5
......@@ -9,11 +9,16 @@ All notable changes to this project will be documented in this file.
- Added procedure for update ./install --update
(From 0.8.0 version will be supported for bug fixing, version 0.X.0 will be supported untill
0.X+2.0 will be out)
- Added video lessons for Dynamic load balancing (openfpm.mpi-cbg.de)
- Added for debugging the options PRINT_STACKTRACE, CHECKFOR_POSNAN, CHECKFOR_POSINF, CHECKFOR_PROPINF, CHECKFOR_PROPNAN, SE_CLASS3 for debugging. Additional example added (7_sph_dlb_safe)
- Added the possibility to write binary VTK files using VTK_WRITER_BINARY 0_simple_vector
example
### Changed
- BOOST updated to 1.63
- Eigen updated to 3.3.7
- Option CSV_WRITER changed to CSV_WRITER_ASCII
## [0.7.0] 15 December 2016
......
......@@ -327,7 +327,10 @@ int main(int argc, char* argv[])
* With this function we output the particle position in VTK format. A VTK file
* contain information about particle position and properties. Such file can be visualizaed
* with program like paraview. In case this program run on several processor Each processor
* generate a VTK file
* generate a VTK file. VTK has two format one is the ASCII that is human readable but produce
* bigger file the other is the binary that produce not-human readable files, but smaller
* and more efficent files to read for Paraview. In order to create a Binary VTK file use the
* option VTK_
*
* \snippet Vector/0_simple/main.cpp vtk
*
......@@ -344,6 +347,7 @@ int main(int argc, char* argv[])
//! \cond [vtk] \endcond
vd.write("particles");
vd.write("particles",VTK_WRITE_BINARY);
//! \cond [vtk] \endcond
......
......@@ -13,15 +13,21 @@
* decomposition to keep all the processor load and reduce idle time.
*
* \htmlonly
* <a href="#" onclick="hide_show('vector-video-3')" >Video 1</a>
* <a href="#" onclick="hide_show('vector-video-3')" >Simulation video 1</a><br>
* <div style="display:none" id="vector-video-3">
* <video id="vid1" width="1200" height="576" controls> <source src="http://openfpm.mpi-cbg.de/web/images/examples/7_SPH_dlb/sph_speed.mp4" type="video/mp4"></video>
* <script>video_anim('vid1',100,230)</script>
* <video id="vid3" width="1200" height="576" controls> <source src="http://openfpm.mpi-cbg.de/web/images/examples/7_SPH_dlb/sph_speed.mp4" type="video/mp4"></video>
* </div>
* <a href="#" onclick="hide_show('vector-video-4')" >Video 2</a>
* <a href="#" onclick="hide_show('vector-video-4')" >Simulation video 2</a><br>
* <div style="display:none" id="vector-video-4">
* <video id="vid2" width="1200" height="576" controls> <source src="http://openfpm.mpi-cbg.de/web/images/examples/7_SPH_dlb/sph_speed2.mp4" type="video/mp4"></video>
* <script>video_anim('vid2',21,1590)</script>
* <video id="vid4" width="1200" height="576" controls> <source src="http://openfpm.mpi-cbg.de/web/images/examples/7_SPH_dlb/sph_speed2.mp4" type="video/mp4"></video>
* </div>
* <a href="#" onclick="hide_show('vector-video-15')" >Simulation dynamic load balancing video 1</a><br>
* <div style="display:none" id="vector-video-15">
* <video id="vid15" width="1200" height="576" controls> <source src="http://openfpm.mpi-cbg.de/web/images/examples/7_SPH_dlb/sph_dlb.mp4" type="video/mp4"></video>
* </div>
* <a href="#" onclick="hide_show('vector-video-16')" >Simulation dynamic load balancing video 2</a><br>
* <div style="display:none" id="vector-video-16">
* <video id="vid16" width="1200" height="576" controls> <source src="http://openfpm.mpi-cbg.de/web/images/examples/7_SPH_dlb/sph_dlb2.mp4" type="video/mp4"></video>
* </div>
* \endhtmlonly
*
......@@ -1196,6 +1202,21 @@ int main(int argc, char* argv[])
* balanced configuration does not correspond to the evenly distributed particles to know
* more about that please follow the video tutorials
*
* \htmlonly
* <a href="#" onclick="hide_show('vector-video-6')" >Dynamic load balancing the theory part1</a>
* <div style="display:none" id="vector-video-6">
* <video id="vid6" width="1200" height="576" controls> <source src="http://openfpm.mpi-cbg.de/upload/video/dlb-1.mp4" type="video/mp4"></video>
* </div>
* <a href="#" onclick="hide_show('vector-video-7')" >Dynamic load balancing the theory part2</a>
* <div style="display:none" id="vector-video-7">
* <video id="vid7" width="1200" height="576" controls> <source src="http://openfpm.mpi-cbg.de/upload/video/dlb-2.mp4" type="video/mp4"></video>
* </div>
* <a href="#" onclick="hide_show('vector-video-8')" >Dynamic load balancing practice part1</a>
* <div style="display:none" id="vector-video-8">
* <video id="vid8" width="1200" height="576" controls> <source src="http://openfpm.mpi-cbg.de/upload/video/dlb-2.mp4" type="video/mp4"></video>
* </div>
* \endhtmlonly
*
* \snippet Vector/7_SPH_dlb/main.cpp load balancing
*
* \htmlonly
......
openfpm_data @ 8104e4b4
Subproject commit 63bfcfa657c6d9cd66eae064a115a08e4eaeb400
Subproject commit 8104e4b491b20b7b7c74b17ec733729fa3cb5dc3
openfpm_devices @ 9d5f962e
Subproject commit b96708b8c2ca93ef4a8754e58a28bbad506df932
Subproject commit 9d5f962e451893510d39b9d3233087f54a510bb7
openfpm_io @ fd804149
Subproject commit 5dfcba90e49c58fa569f02475635938e285142b1
Subproject commit fd804149e48a4d8d5d6f0632d4368e7e76d61183
openfpm_numerics @ 5e304636
Subproject commit bc9efd0e62982ec86bd6d53e43fb4db1b041a82c
Subproject commit 5e304636549cf27fd266aaf3e459d4861d4ff096
......@@ -33,7 +33,7 @@ struct ModelLin
dec.setSubSubDomainComputationCost(v, dec.getSubSubDomainComputationCost(v));
}
double setDistributionTol(size_t i)
double distributionTol()
{
return 1.01;
}
......@@ -58,7 +58,7 @@ struct ModelSquare
dec.setSubSubDomainComputationCost(v, dec.getSubSubDomainComputationCost(v) * dec.getSubSubDomainComputationCost(v));
}
double setDistributionTol(size_t i)
double distributionTol()
{
return 1.01;
}
......
......@@ -393,7 +393,7 @@ public:
}
/*! It calculate the internal ghost boxes
/*! \brief It calculate the internal ghost boxes
*
* Example: Processor 10 calculate
* B8_0 B9_0 B9_1 and B5_0
......@@ -1275,7 +1275,7 @@ public:
/*! \brief Get the domain Cells
*
* It performa a linearization of the domain cells using the extension provided in gs
* It perform a linearization of the domain cells using the extension provided in gs
*
*
* \param shift Cell padding
......
......@@ -615,15 +615,14 @@ public:
return parmetis_graph.get_ndec();
}
/*! \brief Set the tollerance for each partition
/*! \brief Set the tolerance for each partition
*
* \param i partition
* \param tol tollerance
* \param tol tolerance
*
*/
void setDistTol(size_t i, double tol)
void setDistTol(double tol)
{
parmetis_graph.setDistTol(i,tol);
parmetis_graph.setDistTol(tol);
}
};
......
......@@ -125,6 +125,9 @@ class Parmetis
//! indicate how many time decompose/refine/re-decompose has been called
size_t n_dec;
//! Distribution tolerance
real_t dist_tol = 1.05;
/*! \brief Construct Adjacency list
*
* \param g Global graph
......@@ -482,7 +485,7 @@ public:
for (size_t s = 0; s < (size_t) Mg.nparts[0]; s++)
{
Mg.tpwgts[s] = 1.0 / Mg.nparts[0];
Mg.ubvec[s] = 1.05;
Mg.ubvec[s] = dist_tol;
}
Mg.edgecut = new idx_t[1];
......@@ -547,13 +550,12 @@ public:
/*! \brief Distribution tolerance
*
* \param i partition id
* \param tol tollerance
* \param tol tolerance
*
*/
const void setDistTol(size_t i, real_t tol)
const void setDistTol(real_t tol)
{
Mg.ubvec[i] = tol;
dist_tol = tol;
}
};
......
......@@ -183,7 +183,7 @@ private:
g_m = p_np;
}
/*! \brief Checl if the parameters describe a valid vector. In case it does not report an error
/*! \brief Check if the parameters describe a valid vector. In case it does not report an error
*
* \param box Box to check
*
......@@ -199,6 +199,11 @@ private:
}
/*! \brief It check that the r_cut is not bugger than the ghost
*
* \param r_cut cut-off radius
*
*/
void check_ghost_compatible_rcut(St r_cut)
{
for (size_t i = 0 ; i < dim ; i++)
......@@ -329,8 +334,7 @@ public:
* \param box domain where the vector of elements live
* \param bc boundary conditions
* \param g Ghost margins
* \param opt additional options.
* * BIND_DEC_TO_GHOST Bind the decomposition to be multiple of the
* \param opt additional options. BIND_DEC_TO_GHOST Bind the decomposition to be multiple of the
* ghost size. This is required if we want to use symmetric to eliminate
* ghost communications.
*
......@@ -1056,14 +1060,8 @@ public:
}
}
/*! \brief for each particle get the verlet list
*
* \param verlet output verlet list for each particle
* \param r_cut cut-off radius
*
* \deprecated
*
*/
#if 0
/* void getVerletDeprecated(openfpm::vector<openfpm::vector<size_t>> & verlet, St r_cut)
{
// resize verlet to store the number of particles
......@@ -1115,14 +1113,14 @@ public:
}
}*/
#endif
/*! \brief Construct a cell list starting from the stored particles and reorder a vector according to the Hilberts curve
*
* \tparam CellL CellList type to construct
*
* \param m an order of a hilbert curve
*
*
*
*/
template<typename CellL=CellList<dim,St,FAST,shift<dim,St> > > void reorder (int32_t m)
{
......@@ -1540,13 +1538,7 @@ public:
for (size_t i = 0 ; i < dec.getDistribution().getNSubSubDomains(); i++)
md.applyModel(dec,i);
// set the ubvec
size_t n_part = v_cl.getProcessingUnits();
for (size_t i = 0 ; i < n_part ; i++)
{
dec.getDistribution().setDistTol(i,md.distributionTol(i));
}
dec.getDistribution().setDistTol(md.distributionTol());
}
/*! \brief Output particle position and properties
......@@ -1557,10 +1549,10 @@ public:
* \return true if the file has been written without error
*
*/
inline bool write(std::string out, int opt = NO_GHOST | VTK_WRITER )
inline bool write(std::string out, int opt = VTK_WRITER)
{
if ((opt & 0xFFFF0000) == CSV_WRITER)
if ((opt & 0x0FFF0000) == CSV_WRITER)
{
// CSVWriter test
CSVWriter<openfpm::vector<Point<dim,St>>, openfpm::vector<prop> > csv_writer;
......@@ -1570,8 +1562,13 @@ public:
// Write the CSV
return csv_writer.write(output,v_pos,v_prp);
}
else if ((opt & 0xFFFF0000) == VTK_WRITER)
else
{
file_type ft = file_type::ASCII;
if (opt & FORMAT_BINARY)
ft = file_type::BINARY;
// VTKWriter for a set of points
VTKWriter<boost::mpl::pair<openfpm::vector<Point<dim,St>>, openfpm::vector<prop>>, VECTOR_POINTS> vtk_writer;
vtk_writer.add(v_pos,v_prp,g_m);
......@@ -1579,7 +1576,7 @@ public:
std::string output = std::to_string(out + "_" + std::to_string(v_cl.getProcessUnitID()) + std::to_string(".vtk"));
// Write the VTK file
return vtk_writer.write(output);
return vtk_writer.write(output,"particles",ft);
}
return false;
......@@ -1623,7 +1620,7 @@ public:
*/
inline bool write(std::string out, size_t iteration, int opt = NO_GHOST)
{
if ((opt & 0xFFFF0000) == CSV_WRITER)
if ((opt & 0x0FFF0000) == CSV_WRITER)
{
// CSVWriter test
CSVWriter<openfpm::vector<Point<dim, St>>, openfpm::vector<prop> > csv_writer;
......@@ -1635,6 +1632,11 @@ public:
}
else
{
file_type ft = file_type::ASCII;
if (opt & FORMAT_BINARY)
ft = file_type::BINARY;
// VTKWriter for a set of points
VTKWriter<boost::mpl::pair<openfpm::vector<Point<dim,St>>, openfpm::vector<prop>>, VECTOR_POINTS> vtk_writer;
vtk_writer.add(v_pos,v_prp,g_m);
......@@ -1642,7 +1644,7 @@ public:
std::string output = std::to_string(out + "_" + std::to_string(v_cl.getProcessUnitID()) + "_" + std::to_string(iteration) + std::to_string(".vtk"));
// Write the VTK file
return vtk_writer.write(output);
return vtk_writer.write(output,"particles",ft);
}
}
......
......@@ -55,4 +55,5 @@ int main(int argc, char* argv[])
#include "Grid/staggered_grid_dist_unit_test.hpp"
#include "Vector/vector_dist_MP_unit_tests.hpp"
#include "Vector/se_class3_vector_unit_tests.hpp"
#include "Vector/vector_dist_dlb_test.hpp"
//#include "antoniol_test_isolation.hpp"
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