Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ixstools
xrstools
Commits
0fea5ab9
Commit
0fea5ab9
authored
Dec 05, 2020
by
myron
Browse files
finished ant with esynth
parent
758a5daf
Changes
3
Hide whitespace changes
Inline
Side-by-side
fitcc/CMakeLists.txt
View file @
0fea5ab9
...
...
@@ -84,6 +84,16 @@ if(NOT CMAKE_BUILD_TYPE)
set
(
CMAKE_BUILD_TYPE DEBUG
)
endif
()
find_package
(
OpenMP
)
if
(
OPENMP_FOUND
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
OpenMP_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
OpenMP_CXX_FLAGS
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
${
OpenMP_EXE_LINKER_FLAGS
}
"
)
endif
()
## set(CMAKE_CXX_FLAGS "-Wextra -Wall -mfpmath=sse -Ofast -flto -mcpu=native ${CMAKE_CXX_FLAGS} " )
set
(
CMAKE_CXX_FLAGS_DEBUG
"-g -Wextra -Wall -fopenmp
${
CMAKE_CXX_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
" -g -Wextra -Wall -fopenmp -Ofast -mtune=native
${
CMAKE_CXX_FLAGS
}
"
)
...
...
fitcc/frsv.cc
View file @
0fea5ab9
...
...
@@ -192,6 +192,7 @@ public:
int
DIMZ
=
dimpars
.
DIMZ
;
int
DIMY
=
dimpars
.
DIMY
;
int
DIMX
=
dimpars
.
DIMX
;
#pragma omp parallel for
for
(
int
ie
=
0
;
ie
<
NE
;
ie
++
)
{
for
(
int
iz
=
0
;
iz
<
DIMZ
;
iz
++
)
{
for
(
int
iy
=
0
;
iy
<
DIMY
;
iy
++
)
{
...
...
@@ -213,6 +214,7 @@ public:
int
DIMZ
=
dimpars
.
DIMZ
;
int
DIMY
=
dimpars
.
DIMY
;
int
DIMX
=
dimpars
.
DIMX
;
#pragma omp parallel for
for
(
int
ie
=
NE
-
1
;
ie
<
NE
;
ie
++
)
{
for
(
int
iz
=
0
;
iz
<
DIMZ
;
iz
++
)
{
for
(
int
iy
=
0
;
iy
<
DIMY
;
iy
++
)
{
...
...
@@ -228,6 +230,7 @@ public:
int
NE
=
dimpars
.
NE
;
int
NV
=
dimpars
.
NV
;
int
NROI
=
dimpars
.
NROI
;
#pragma omp parallel for
for
(
int
ir
=
0
;
ir
<
NROI
;
ir
++
)
{
for
(
int
ie1
=
0
;
ie1
<
NE
;
ie1
++
)
{
for
(
int
ie2
=
0
;
ie2
<
NE
;
ie2
++
)
{
...
...
@@ -246,6 +249,7 @@ public:
int
NE
=
dimpars
.
NE
;
int
NROI
=
dimpars
.
NROI
;
int
DIMX
=
dimpars
.
DIMX
;
#pragma omp parallel for
for
(
int
ie1
=
0
;
ie1
<
NE
;
ie1
++
)
{
for
(
int
ie2
=
0
;
ie2
<
NE
;
ie2
++
)
{
for
(
int
ix1
=
0
;
ix1
<
DIMX
;
ix1
++
)
{
...
...
@@ -278,7 +282,7 @@ public:
memset
(
Ctmp
,
0
,
NV
*
NROI
*
DIMZ
*
DIMY
*
DIMX
*
sizeof
(
float
));
float
tmp
=
0
;
#pragma parallel for
#pragma
omp
parallel for
for
(
int
iv
=
0
;
iv
<
NV
;
iv
++
)
{
for
(
int
ir
=
0
;
ir
<
NROI
;
ir
++
)
{
for
(
int
iz
=
0
;
iz
<
DIMZ
;
iz
++
)
{
...
...
@@ -296,7 +300,6 @@ public:
}
}
#pragma parallel for
for
(
int
ir
=
0
;
ir
<
NROI
;
ir
++
)
{
double
forza
=
0
;
float
tmp
=
0.0
f
;
...
...
@@ -373,6 +376,7 @@ public:
int
DIMY
=
dimpars
.
DIMY
;
int
DIMX
=
dimpars
.
DIMX
;
#pragma omp parallel for
for
(
int
ie1
=
0
;
ie1
<
NE
;
ie1
++
)
{
for
(
int
iz
=
0
;
iz
<
DIMZ
;
iz
++
)
{
for
(
int
iy
=
0
;
iy
<
DIMY
;
iy
++
)
{
...
...
@@ -719,14 +723,16 @@ int main(int argc, char ** argv) {
pb
.
settoVal
(
Xtmp
,
1.0
f
);
for
(
int
i
=
0
;
i
<
6
0
;
i
++
)
{
for
(
int
i
=
0
;
i
<
1
0
;
i
++
)
{
if
(
0
)
{
pb
.
copyScal
(
fftmp
,
ffacts
,
1.0
);
pb
.
setFreeFacts
(
fftmp
,
X
)
;
}
pb
.
applyMatA
(
grad
,
Xtmp
);
pb
.
gradReg_2_Add
(
grad
,
Xtmp
,
betaE
,
betaV
)
;
double
norma
=
sqrt
(
pb
.
scalar
(
grad
,
grad
));
pb
.
copyScal
(
Xtmp
,
grad
,
1.0
/
norma
)
;
printf
(
"Norma Lipschitz %e
\n
"
,
norma
);
...
...
nonregressions/volumes/esrf_scans/fourmis/esynth/batch_extraction_esynth.py
View file @
0fea5ab9
...
...
@@ -27,7 +27,7 @@ def main():
elastic_scan_for_peaks_shifts
=
38
energy_custom_grid
=
9.96595
+
np
.
arange
(
7
2
)
*
0.0005
energy_custom_grid
=
9.96595
+
np
.
arange
(
6
2
)
*
0.0005
### custom_components_file = "abc.h5"
custom_components_file
=
None
...
...
@@ -64,15 +64,13 @@ def main():
"do_step_scalars"
:
False
,
"do_step_interpolation_coefficients"
:
Tru
e
,
"do_step_interpolation_coefficients"
:
Fals
e
,
"do_step_finalise_for_fit"
:
Fals
e
"do_step_finalise_for_fit"
:
Tru
e
}
os
.
system
(
"mkdir results"
)
scalar_products_target_file
=
"results/scalar_products_target_file.h5"
roi_target_path
=
"results/myrois.h5:/ROIS"
...
...
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