Commit 9b67f044 authored by berenger-bramas's avatar berenger-bramas

Change data in the /Data directory.

Put the unit test data into the /Data directory.
Put default file names in loaders/creaters pointing to /Data.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@282 2616d619-271b-44dc-8df4-d4a8f33a7222
parent af160f8c
......@@ -16,7 +16,6 @@ tmp/
*~
*TAGS
*#*#
*.bin.*
#ignore latex temporary files
*.out
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
5
0.5 0.5 0.5 0.5
0.840188 0.394383 0.783099 1
0.79844 0.911647 0.197551 2
0.335223 0.76823 0.277775 3
0.55397 0.477397 0.628871 4
0.364784 0.513401 0.95223 5
This diff is collapsed.
This diff is collapsed.
......@@ -10,12 +10,6 @@ endif(insource)
project(Lib_scalfmm)
set(LIBRARY_OUTPUT_PATH ../lib/${CMAKE_BUILD_TYPE})
# Test if openmp is here
include(FindOpenMP)
if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
# Searching all cpp file
file(
......
......@@ -44,10 +44,10 @@ int main(int argc, char ** argv){
std::cout << ">> This executable has to be used to test fmb algorithm.\n";
//////////////////////////////////////////////////////////////
const int NbLevels = FParameters::getValue(argc,argv,"-h", 9);
const int NbLevels = FParameters::getValue(argc,argv,"-h", 5);
const int SizeSubLevels = FParameters::getValue(argc,argv,"-sh", 3);
FTic counter;
const char* const defaultFilename = "testLoaderFMA.fma"; //../../Data/ "testLoaderFMA.fma" "testFMAlgorithm.fma" Sphere.fma
const char* const defaultFilename = "../Data/test20k.fma";
const char* filename;
if(argc == 1){
......
......@@ -191,10 +191,10 @@ int main(int argc, char ** argv){
FMpi app( argc, argv);
const int NbLevels = FParameters::getValue(argc,argv,"-h", 9);
const int NbLevels = FParameters::getValue(argc,argv,"-h", 5);
const int SizeSubLevels = FParameters::getValue(argc,argv,"-sh", 3);
FTic counter;
const char defaultFilename[] = "testLoaderFMA.fma"; //../../Data/ "testLoaderFMA.fma" "testFMAlgorithm.fma" Sphere.fma
const char defaultFilename[] = "../Data/test20k.fma";
const char* filename;
if(argc == 1){
......
......@@ -52,10 +52,10 @@ int main(int argc, char ** argv){
std::cout << ">> This executable has to be used to test fmb algorithm.\n";
//////////////////////////////////////////////////////////////
const int NbLevels = FParameters::getValue(argc,argv,"-h", 9);
const int NbLevels = FParameters::getValue(argc,argv,"-h", 5);
const int SizeSubLevels = FParameters::getValue(argc,argv,"-sh", 3);
FTic counter;
const char* const defaultFilename = "testLoaderFMA.fma"; //../../Data/ "testLoaderFMA.fma" "testFMAlgorithm.fma" Sphere.fma
const char* const defaultFilename = "../Data/test20k.fma";
const char* filename;
if(argc == 1){
......
......@@ -45,10 +45,10 @@ int main(int argc, char ** argv){
std::cout << ">> This executable has to be used to test Fmb on a Tsm system.\n";
//////////////////////////////////////////////////////////////
const int NbLevels = FParameters::getValue(argc,argv,"-h", 9);
const int NbLevels = FParameters::getValue(argc,argv,"-h", 5);
const int SizeSubLevels = FParameters::getValue(argc,argv,"-sh", 3);
FTic counter;
const char* const defaultFilename = "testLoaderFMA.tor.fma"; //../../Data/ "testLoaderFMA.fma" "testFMAlgorithm.fma" Sphere.fma
const char* const defaultFilename = "../Data/test20k.tsm.fma";
const char* filename;
if(argc == 1){
......
......@@ -62,7 +62,7 @@ int main(int argc, char ** argv){
std::cout << ">> It compares the results between Tms and no Tms (except P2P & L2P).\n";
//////////////////////////////////////////////////////////////
const int NbLevels = FParameters::getValue(argc,argv,"-h", 9);
const int NbLevels = FParameters::getValue(argc,argv,"-h", 5);
const int SizeSubLevels = FParameters::getValue(argc,argv,"-sh", 3);
FTic counter;
const long NbPart = 200000;//2000000
......
......@@ -326,9 +326,9 @@ int main(int argc, char ** argv){
FMpi app( argc, argv);
const int NbLevels = FParameters::getValue(argc,argv,"-h", 9);
const int NbLevels = FParameters::getValue(argc,argv,"-h", 5);
const int SizeSubLevels = FParameters::getValue(argc,argv,"-sh", 3);
char defaultFilename[] = "testLoaderFMA.fma"; //../../Data/ "testLoaderFMA.fma" "testFMAlgorithm.fma" Sphere.fma
char defaultFilename[] = "../Data/test20k.bin.fma";
char* filename;
FTic counter;
......
......@@ -56,7 +56,7 @@ int main(int argc, char ** argv){
std::cout << ">> This executable has to be used to test the FMM algorithm.\n";
//////////////////////////////////////////////////////////////
const int NbLevels = FParameters::getValue(argc,argv,"-h", 9);
const int NbLevels = FParameters::getValue(argc,argv,"-h", 5);
const int SizeSubLevels = FParameters::getValue(argc,argv,"-sh", 3);
const long NbPart = 2000000;//2000000
const FReal FRandMax = FReal(RAND_MAX);
......
......@@ -44,11 +44,9 @@ int main(int argc, char ** argv){
std::cout << ">> how to use the basic loader.\n";
//////////////////////////////////////////////////////////////
// we store all particles to be able to dealloc
FVector<FBasicParticle*> particles;
// Use testLoaderCreate.exe to create this file
FTic counter;
const char* const defaultFilename = "../../Data/testLoader.basic.temp";
const char* const defaultFilename = "../Data/test20k.basic";
const char* filename;
if(argc == 1){
......@@ -70,7 +68,7 @@ int main(int argc, char ** argv){
{
// otree
OctreeClass tree(FParameters::getValue(argc,argv,"-h", 9), FParameters::getValue(argc,argv,"-sh", 3),
OctreeClass tree(FParameters::getValue(argc,argv,"-h", 5), FParameters::getValue(argc,argv,"-sh", 3),
loader.getBoxWidth(), loader.getCenterOfBox());
// -----------------------------------------------------
......
......@@ -24,7 +24,7 @@ int main(int argc, char ** argv){
//////////////////////////////////////////////////////////////
// Nb of particles
const FSize NbParticles = FParameters::getValue(argc,argv,"-nb", FSize(200000));
const FSize NbParticles = FParameters::getValue(argc,argv,"-nb", FSize(20000));
const FReal FRandMax = FReal(RAND_MAX);
// Center of the box
......@@ -34,7 +34,7 @@ int main(int argc, char ** argv){
// Box width
const FReal BoxWidth = 1.0;
// Output file please let .temp extension
const char defaultFilename[] = "testLoader.basic.temp";
const char defaultFilename[] = "../Data/test20k.basic";
const char* Output;
if(argc == 1){
......
......@@ -46,7 +46,7 @@ int main(int argc, char ** argv ){
// Use testLoaderCreate.exe to create this file
FTic counter;
const char* const defaultFilename = "../../Data/testLoaderFMA.fma";
const char* const defaultFilename = "../Data/test20k.fma";
const char* filename;
if(argc == 1){
......@@ -68,7 +68,7 @@ int main(int argc, char ** argv ){
{
// otree
OctreeClass tree(FParameters::getValue(argc,argv,"-h", 9), FParameters::getValue(argc,argv,"-sh", 3),
OctreeClass tree(FParameters::getValue(argc,argv,"-h", 5), FParameters::getValue(argc,argv,"-sh", 3),
loader.getBoxWidth(), loader.getCenterOfBox());
// -----------------------------------------------------
......
......@@ -35,7 +35,7 @@ int main(int argc, char ** argv){
// Box width
const FReal BoxWidth = 1.0/2;
// Output file please let .temp extension
const char defaultFilename[] = "testLoaderFMA.fma";
const char defaultFilename[] = "../Data/test20k.bin.fma";
const char* Output;
......
......@@ -25,7 +25,7 @@ int main(int argc, char ** argv){
//////////////////////////////////////////////////////////////
// Nb of particles
const long NbParticles = FParameters::getValue(argc,argv,"-nb", long(200000));
const long NbParticles = FParameters::getValue(argc,argv,"-nb", long(20000));
const FReal FRandMax = FReal(RAND_MAX);
const FReal f2 = 2;
......@@ -39,7 +39,7 @@ int main(int argc, char ** argv){
const FReal ZCenter = BoxWidth;
// Output file please let .temp extension
const char defaultFilename[] = "testLoaderFMA.fma";
const char defaultFilename[] = "../Data/test20k.fma";
const char* Output;
......
......@@ -12,6 +12,8 @@
#include "../Src/Utils/FGlobal.hpp"
#include "../Src/Utils/FMath.hpp"
#include "../Src/Utils/FParameters.hpp"
// This file can generate basic particles files to load with basic loader
// g++ testLoaderCreateSphere.cpp -O2 -o testLoaderCreateSphere.exe
......@@ -27,7 +29,7 @@ int main(int argc, char ** argv){
//////////////////////////////////////////////////////////////
// Nb of particles
const long NbParticles = 2000000;
const long NbParticles = FParameters::getValue(argc,argv,"-nb", long(20000));
const FReal FRandMax = FReal(RAND_MAX);
// Center of the box
......@@ -37,7 +39,7 @@ int main(int argc, char ** argv){
// Box width
const FReal BoxWidth = 1.0;
// Output file please let .temp extension
const char defaultFilename[] = "Sphere.fma";
const char defaultFilename[] = "../Data/testSphere20k.fma";
const char* Output;
......
......@@ -24,6 +24,9 @@
#include "../Src/Files/FFmaTsmLoader.hpp"
#include "../Src/Utils/FParameters.hpp"
class ParticleTsm : public FFmaParticle, public FExtendParticleType {
};
......@@ -43,7 +46,7 @@ int main(int argc, char ** argv ){
// Use testLoaderCreate.exe to create this file
FTic counter;
const char* const defaultFilename = "testLoaderFMA.tsm.fma";
const char* const defaultFilename = "../Data/test20k.tsm.fma";
const char* filename;
if(argc == 1){
......@@ -64,7 +67,8 @@ int main(int argc, char ** argv ){
}
{
// otree
OctreeClass tree(10, 3,loader.getBoxWidth(),loader.getCenterOfBox());
OctreeClass tree(FParameters::getValue(argc,argv,"-h", 5), FParameters::getValue(argc,argv,"-sh", 3),
loader.getBoxWidth(),loader.getCenterOfBox());
// -----------------------------------------------------
std::cout << "Inserting " << loader.getNumberOfParticles() << " particles ..." << std::endl;
......
......@@ -8,6 +8,7 @@
#include <time.h>
#include "../Src/Utils/FGlobal.hpp"
#include "../Src/Utils/FParameters.hpp"
// This file can generate basic particles files in the FMA format
// g++ testLoaderFMATsmCreate.cpp -o testLoaderFMATsmCreate.exe
......@@ -23,7 +24,7 @@ int main(int argc, char ** argv){
std::cout << ">> [x] [y] [z] [physical value] [1 if target 0 if source]...\n";
//////////////////////////////////////////////////////////////
// Nb of particles
const long NbParticles = 200000;
const long NbParticles = FParameters::getValue(argc,argv,"-nb", long(20000));
const FReal FRandMax = FReal(RAND_MAX);
// Center of the box
......@@ -34,7 +35,7 @@ int main(int argc, char ** argv){
// Box width
const FReal BoxWidth = 1.0/2;
// Output file please let .temp extension
const char defaultFilename[] = "testLoaderFMA.tsm.fma";
const char defaultFilename[] = "../Data/test20k.tsm.fma";
const char* Output;
......
......@@ -53,7 +53,7 @@ int main(int argc, char ** argv){
std::cout << ">> This executable has to be used to test the FMM algorithm.\n";
//////////////////////////////////////////////////////////////
const int NbLevels = FParameters::getValue(argc,argv,"-h", 9);
const int NbLevels = FParameters::getValue(argc,argv,"-h", 5);
const int SizeSubLevels = FParameters::getValue(argc,argv,"-sh", 3);
const long NbPart = FParameters::getValue(argc,argv,"-nb", 2000000);
const FReal FRandMax = FReal(RAND_MAX);
......
......@@ -101,7 +101,7 @@ int main(int argc, char ** argv){
const int NbLevels = 6;
const int SizeSubLevels = 2;
FTic counter;
const char* const defaultFilename = "../Data/testH.txt";
const char* const defaultFilename = "../Data/testMortonIndex.txt";
const char* filename;
if(argc == 1){
......
......@@ -48,10 +48,10 @@ int main(int argc, char ** argv){
std::cout << ">> This executable has to be used to show some stat about the tree.\n";
//////////////////////////////////////////////////////////////
const int NbLevels = FParameters::getValue(argc,argv,"-h", 9);
const int NbLevels = FParameters::getValue(argc,argv,"-h", 5);
const int SizeSubLevels = FParameters::getValue(argc,argv,"-sh", 3);
FTic counter;
const char* const defaultFilename = "testLoaderFMA.fma"; //../../Data/ "testLoaderFMA.fma" "testFMAlgorithm.fma" Sphere.fma
const char* const defaultFilename = "../Data/test20k.fma";
const char* filename;
if(argc == 1){
......
......@@ -32,10 +32,10 @@ int main(int argc, char ** argv){
std::cout << ">> This executable has to be used to load or retrieve an entier tree.\n";
//////////////////////////////////////////////////////////////
const int NbLevels = FParameters::getValue(argc,argv,"-h", 9);
const int NbLevels = FParameters::getValue(argc,argv,"-h", 5);
const int SizeSubLevels = FParameters::getValue(argc,argv,"-sh", 3);
FTic counter;
const char* const defaultFilename = "testLoaderFMA.fma"; //../../Data/ "testLoaderFMA.fma" "testFMAlgorithm.fma" Sphere.fma
const char* const defaultFilename = "../Data/test20k.fma";
const char* filename;
if(argc == 1){
......
......@@ -31,7 +31,7 @@ class TestFmb : public FUTester<TestFmb> {
const int NbLevels = 5;
const int SizeSubLevels = 3;
FFmaBinLoader<ParticleClass> loader("../UTests/data/fmb.bin.fma");
FFmaBinLoader<ParticleClass> loader("../Data/utestFmb.bin.fma");
if(!loader.isOpen()){
Print("Cannot open particles file.");
return;
......@@ -54,7 +54,7 @@ class TestFmb : public FUTester<TestFmb> {
//FTreeIO::Save<OctreeClass, CellClass, ParticleClass, FTreeIO::Copier<CellClass, ParticleClass> >("../UTests/data/fmb.data", testTree);
OctreeClass goodTree(NbLevels, SizeSubLevels, loader.getBoxWidth(), loader.getCenterOfBox());
FTreeIO::Load<OctreeClass, CellClass, ParticleClass, FTreeIO::Copier<CellClass, ParticleClass> >("../UTests/data/fmb.data", goodTree);
FTreeIO::Load<OctreeClass, CellClass, ParticleClass, FTreeIO::Copier<CellClass, ParticleClass> >("../Data/utestFmb.data", goodTree);
Print("Check the particles...");
......@@ -67,12 +67,12 @@ class TestFmb : public FUTester<TestFmb> {
do{
if(testOctreeIterator.getCurrentGlobalIndex() != goodOctreeIterator.getCurrentGlobalIndex()){
///assert(false);
assert(false);
break;
}
if(testOctreeIterator.getCurrentListSrc()->getSize() != goodOctreeIterator.getCurrentListSrc()->getSize()){
///assert(false);
assert(false);
break;
}
......@@ -89,12 +89,12 @@ class TestFmb : public FUTester<TestFmb> {
if(!testOctreeIterator.moveRight()){
if(goodOctreeIterator.moveRight()){
///assert(false);
assert(false);
}
break;
}
if(!goodOctreeIterator.moveRight()){
///assert(false);
assert(false);
break;
}
......@@ -111,7 +111,7 @@ class TestFmb : public FUTester<TestFmb> {
for(int idxLevel = NbLevels - 1 ; idxLevel > 1 ; --idxLevel ){
do{
if(testOctreeIterator.getCurrentGlobalIndex() != goodOctreeIterator.getCurrentGlobalIndex()){
///assert(false);
assert(false);
break;
}
......@@ -123,12 +123,12 @@ class TestFmb : public FUTester<TestFmb> {
if(!testOctreeIterator.moveRight()){
if(goodOctreeIterator.moveRight()){
///assert(false);
assert(false);
}
break;
}
if(!goodOctreeIterator.moveRight()){
///assert(false);
assert(false);
break;
}
......
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