Commit 5a11f129 authored by Pilar Cossio's avatar Pilar Cossio

ReadOrientations MPI

parent 168005a8
......@@ -288,12 +288,23 @@ int bioem::configure(int ac, char* av[])
cout << "Exiting::: WRITE CROSS-CORRELATION ONLY VAILD FOR 1 MPI PROCESS\n";
exit(1);
}
param.CalculateGridsParam();
}
#ifdef WITH_MPI
if (mpi_size > 1)
{
if (DebugOutput >= 2 && mpi_rank == 0) timer.ResetStart();
MPI_Bcast(&param, sizeof(param), MPI_BYTE, 0, MPI_COMM_WORLD);
// cout << param.inanglef << " Here " << mpi_rank << "\n";
// cout << param.nTotGridAngles << " Here " << mpi_rank << "\n";
if (mpi_rank != 0)param.angles = (myfloat3_t*) mallocchk(2 * param.nTotGridAngles * sizeof (myfloat3_t*));
MPI_Bcast(param.angles, 2 * param.nTotGridAngles * sizeof (myfloat3_t*),MPI_BYTE, 0, MPI_COMM_WORLD);
if (mpi_rank != 0) {
for(int n=1;n<param.nTotGridAngles;n++){
cout << "CHECK: Angle orient " << mpi_rank << " "<< n << " " << param.angles[n].pos[0] << " " << param.angles[n].pos[1] << " " << param.angles[n].pos[2] << "\n";
}}
//refCtf, CtfParam, angles automatically filled by precalculare function below
MPI_Bcast(&Model, sizeof(Model), MPI_BYTE, 0, MPI_COMM_WORLD);
......@@ -304,11 +315,11 @@ int bioem::configure(int ac, char* av[])
if (mpi_rank != 0) RefMap.maps = (myfloat_t*) mallocchk(RefMap.refMapSize * sizeof(myfloat_t) * RefMap.ntotRefMap);
MPI_Bcast(RefMap.maps, RefMap.refMapSize * sizeof(myfloat_t) * RefMap.ntotRefMap, MPI_BYTE, 0, MPI_COMM_WORLD);
if (DebugOutput >= 2 && mpi_rank == 0) printf("MPI Broadcast of Input Data %f\n", timer.GetCurrentElapsedTime());
}
#endif
// ****************** Precalculating Necessary Stuff *********************
//exit(1);
if (DebugOutput >= 2 && mpi_rank == 0) timer.ResetStart();
param.PrepareFFTs();
if (DebugOutput >= 2 && mpi_rank == 0)
......@@ -358,7 +369,7 @@ int bioem::precalculate()
HighResTimer timer;
// Generating Grids of orientations
param.CalculateGridsParam();
//param.CalculateGridsParam();
if (DebugOutput >= 3)
{
......@@ -1020,6 +1031,10 @@ if(param.printrotmod) {
if (i < 0 || j < 0 || i >= param.param_device.NumberPixels || j >= param.param_device.NumberPixels)
{
if (DebugOutput >= 0) cout << "WARNING::: Model Point out of Projection map: " << i << ", " << j << "\n";
cout << "Model point " << n << "Rotation: " << iMap <<" "<< RotatedPointsModel[n].pos[0] << " " << RotatedPointsModel[n].pos[1] << " " << RotatedPointsModel[n].pos[2] << "\n";
cout << "Original coor " << n <<" " << Model.points[n].point.pos[0] << " " << Model.points[n].point.pos[1] << " " <<Model.points[n].point.pos[2] << "\n";
cout << "WARNING: Angle orient " << n << " " << param.angles[iMap].pos[0] << " " << param.angles[iMap].pos[1] << " " << param.angles[iMap].pos[2] << "\n";
cout << "WARNING: MPI rank " << mpi_rank <<"\n";
// continue;
exit(1);
}
......
......@@ -89,6 +89,7 @@ int bioem_param::readParameters(const char* fileinput,const char* fileangles)
//Storing angle file name if existing.
inanglef=std::string(fileangles);
cout << " HERE " << inanglef.c_str() << " " << mpi_rank <<"\n";
NotUn_angles=0;
ifstream input(fileinput);
......@@ -777,7 +778,7 @@ if(!notuniformangles){
if (!input.good())
{
cout << "Problem with Quaterion List file " << quatfile.c_str() << " " << endl ;
cout << "Problem with Quaterion List file " << inanglef.c_str() << " " << endl ;
exit(1);
}
......
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