Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MPIBP-Hummer
BioEM
Commits
b9140117
Commit
b9140117
authored
Jul 07, 2014
by
Pilar Cossio
Browse files
Merge branch 'devel_drohr' of gitta.rzg.mpg.de:BioEM into devel_drohr
parents
87514487
8c3c729b
Changes
6
Hide whitespace changes
Inline
Side-by-side
bioem.cpp
View file @
b9140117
...
...
@@ -7,6 +7,14 @@
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
#include <mpi.h>
#define MPI_CHK(expr) \
if (expr != MPI_SUCCESS) \
{ \
fprintf(stderr, "Error in MPI function %s: %d\n", __FILE__, __LINE__); \
}
#include <fstream>
#include <boost/program_options.hpp>
#include <iostream>
...
...
@@ -215,7 +223,14 @@ int bioem::configure(int ac, char* av[])
}
#ifdef WITH_MPI
MPI_Bcast
(
&
param
,
sizeof
(
param
),
MPI_BYTE
,
0
,
MPI_COMM_WORLD
);
//refCtf, CtfParam, angles automatically filled by precalculare function below
MPI_Bcast
(
&
Model
,
sizeof
(
Model
),
MPI_BYTE
,
0
,
MPI_COMM_WORLD
);
Model
.
points
=
(
bioem_model
::
bioem_model_point
*
)
mallocchk
(
sizeof
(
bioem_model
::
bioem_model_point
)
*
Model
.
nPointsModel
);
MPI_Bcast
(
Model
.
points
,
sizeof
(
bioem_model
::
bioem_model_point
)
*
Model
.
nPointsModel
,
MPI_BYTE
,
0
,
MPI_COMM_WORLD
);
#endif
if
(
mpi_rank
!=
0
)
return
(
1
);
...
...
include/bioem.h
View file @
b9140117
#ifndef BIOEM_H
#define BIOEM_H
#include <fstream>
#include <iostream>
#include <complex>
#include "defs.h"
#include "bioem.h"
...
...
include/defs.h
View file @
b9140117
...
...
@@ -99,15 +99,6 @@ static inline void* reallocchk(void* oldptr, size_t size)
#define omp_get_thread_num() 0
#endif
#ifdef WITH_MPI
#include <mpi.h>
#define MPI_CHK(expr) \
if (expr != MPI_SUCCESS) \
{ \
fprintf(stderr, "Error in MPI function %s: %d\n", __FILE__, __LINE__); \
}
#endif
extern
int
mpi_rank
;
extern
int
mpi_size
;
...
...
include/param.h
View file @
b9140117
...
...
@@ -39,6 +39,8 @@ public:
int
Alignment
;
mycomplex_t
*
refCTF
;
myfloat3_t
*
CtfParam
;
size_t
getRefCtfCount
()
{
return
nTotCTFs
*
FFTMapSize
;}
size_t
getCtfParamCount
()
{
return
nTotCTFs
;}
myfloat_t
pixelSize
;
// Grid Points in Euler angles, assuming uniform sampling d_alpha=d_gamma (in 2pi) & cos(beta)=-1,1
...
...
main.cpp
View file @
b9140117
#include <mpi.h>
#define MPI_CHK(expr) \
if (expr != MPI_SUCCESS) \
{ \
fprintf(stderr, "Error in MPI function %s: %d\n", __FILE__, __LINE__); \
}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
...
...
param.cpp
View file @
b9140117
...
...
@@ -375,10 +375,10 @@ int bioem_param::CalculateRefCTF()
nTotCTFs
=
numberGridPointsCTF_amp
*
numberGridPointsCTF_phase
*
numberGridPointsEnvelop
;
delete
[]
refCTF
;
refCTF
=
new
mycomplex_t
[
nTotCTFs
*
FFTMapSize
];
refCTF
=
new
mycomplex_t
[
getRefCtfCount
()
];
delete
[]
CtfParam
;
CtfParam
=
new
myfloat3_t
[
nTotCTFs
];
CtfParam
=
new
myfloat3_t
[
getCtfParamCount
()
];
for
(
int
iamp
=
0
;
iamp
<
numberGridPointsCTF_amp
;
iamp
++
)
//Loop over amplitud
{
amp
=
(
myfloat_t
)
iamp
*
gridCTF_amp
+
startGridCTF_amp
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment