Reworked logging model:

Added T+, T3+.
Changes in logging hierarchie: Every species individually logs positions.
This commit is contained in:
Christian
2019-07-22 10:40:21 +02:00
parent ad5b66dc0d
commit 5965e3e90a
10 changed files with 105 additions and 282 deletions
+3 -56
View File
@@ -17,7 +17,9 @@ int main(int argc, char *argv[]) {
int size, rank;
MPI_Comm_size(MPI_COMM_WORLD,&size);
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
std::cout <<"CPU " <<rank <<" of " <<size <<endl;
if (rank==0) {
cout<<"Number CPUs: "<<size<<"\n"<<endl;
}
Simulation Sim;
int start_time = MPI_Wtime();
@@ -25,62 +27,7 @@ int main(int argc, char *argv[]) {
if (rank == 0) {
cout<<"Total Time: "<<MPI_Wtime()-start_time<<" s\n";
}
/*
clock_t start = clock();
cout<<"Duration: "<< ( clock() - start ) / (double) CLOCKS_PER_SEC <<"\n";
*/
MPI_Finalize();
return 0;
}
/*
int main(int argc, char *argv[]) {
MPI_Init(&argc,&argv);
int size, rank;
MPI_Comm_size(MPI_COMM_WORLD,&size);
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
std::cout <<"CPU " <<rank <<" of " <<size <<endl;
MPI_Info info;
MPI_Info_create(&info);
hid_t plist_id = H5Pcreate(H5P_FILE_ACCESS);
H5Pset_fapl_mpio(plist_id, MPI_COMM_WORLD, info);
string filename="/Users/ChristianReiling/Desktop/MPI_test/outfiles/tableout.h5";
hid_t file;
file = H5Fcreate(filename.c_str(), H5F_ACC_TRUNC, H5P_DEFAULT, plist_id);
if(file <0) {
cerr << "Unable to create " << filename << "!" <<endl;
exit(941);
}
H5Pclose(plist_id);
H5TB_Particle_Interface table = H5TB_Particle_Interface("Samples", &file);
if (rank == 1) {
Particle electron = Particle_Builder::create_e(vec3(1,2,3), vec3 (4,5,6), 7, 8);
table.write(electron);
}
if (rank == 0) {
Particle electron = Particle_Builder::create_e(vec3(1,2,3), vec3 (4,5,6), 0, -1);
table.write(electron);
}
H5Fclose(file);
MPI_Finalize();
}
*/