Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
openfpm_pdata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sbalzarini Lab
Software
Parallel Computing
OpenFPM
openfpm_pdata
Commits
473fad10
Commit
473fad10
authored
6 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Patches
Plain Diff
Fixing example compilation
parent
2289297b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
example/Grid/3_gray_scott_3d_vectorization/Makefile
+2
-2
2 additions, 2 deletions
example/Grid/3_gray_scott_3d_vectorization/Makefile
example/Grid/3_gray_scott_3d_vectorization/main.cpp
+6
-6
6 additions, 6 deletions
example/Grid/3_gray_scott_3d_vectorization/main.cpp
with
8 additions
and
8 deletions
example/Grid/3_gray_scott_3d_vectorization/Makefile
+
2
−
2
View file @
473fad10
...
...
@@ -10,10 +10,10 @@ OBJ = main.o update_new.o
mpif90
-ffree-line-length-none
-fno-range-check
-fno-second-underscore
-fimplicit-none
-mavx
-O3
-c
-g
-o
$@
$<
%.o
:
%.cpp
$(
CC
)
-O3
-mavx
-g
-c
--std
=
c++11
-Wno-ignored-attributes
-o
$@
$<
$(
INCLUDE_PATH
)
-I
/
home/i-bird/VC
/include
$(
CC
)
-O3
-mavx
-g
-c
--std
=
c++11
-Wno-ignored-attributes
-o
$@
$<
$(
INCLUDE_PATH
)
-I
/
where/is/vc/installation
/include
gray_scott
:
$(OBJ)
$(
CC
)
-o
$@
$^
$(
CFLAGS
)
$(
LIBS_PATH
)
$(
LIBS
)
-L
/
home/i-bird/VC
/lib
-lVc
$(
CC
)
-o
$@
$^
$(
CFLAGS
)
$(
LIBS_PATH
)
$(
LIBS
)
-L
/
where/is/vc/installation
/lib
#
-lVc
(
Add
-lVc
if
you use VCDevel
)
all
:
gray_scott
...
...
This diff is collapsed.
Click to expand it.
example/Grid/3_gray_scott_3d_vectorization/main.cpp
+
6
−
6
View file @
473fad10
...
...
@@ -117,12 +117,15 @@ void step(grid_dist_id<3, double, aggregate<double>> & OldU,
grid_dist_id
<
3
,
double
,
aggregate
<
double
>>
&
NewU
,
grid_dist_id
<
3
,
double
,
aggregate
<
double
>>
&
NewV
,
grid_key_dx
<
3
>
(
&
star_stencil_3D
)[
7
],
Vc
::
double
_v
uFactor
,
Vc
::
double
_v
vFactor
,
double
deltaT
,
double
F
,
double
K
)
double
uFactor
_s
,
double
vFactor
_s
,
double
deltaT
,
double
F
,
double
K
)
{
#ifndef FORTRAN_UPDATE
//! \cond [cpp_update] \endcond
Vc
::
double
uFactor
=
uFactor_s
;
Vc
::
double
vFactor
=
vFactor_s
;
WHILE_M
(
OldU
,
star_stencil_3D
)
auto
&
U_old
=
GET_GRID_M
(
OldU
);
auto
&
V_old
=
GET_GRID_M
(
OldV
);
...
...
@@ -184,9 +187,6 @@ void step(grid_dist_id<3, double, aggregate<double>> & OldU,
//! \cond [fort_update] \endcond
double
uFactor_s
=
uFactor
[
0
];
double
vFactor_s
=
vFactor
[
0
];
auto
&
ginfo
=
OldU
.
getLocalGridsInfo
();
for
(
size_t
i
=
0
;
i
<
OldU
.
getN_loc_grid
()
;
i
++
)
...
...
@@ -294,8 +294,8 @@ int main(int argc, char* argv[])
// because we assume that spacing[x] == spacing[y] we use formula 2
// and we calculate the prefactor of Eq 2
Vc
::
double
_v
uFactor
=
deltaT
*
du
/
(
spacing
[
x
]
*
spacing
[
x
]);
Vc
::
double
_v
vFactor
=
deltaT
*
dv
/
(
spacing
[
x
]
*
spacing
[
x
]);
double
uFactor
=
deltaT
*
du
/
(
spacing
[
x
]
*
spacing
[
x
]);
double
vFactor
=
deltaT
*
dv
/
(
spacing
[
x
]
*
spacing
[
x
]);
timer
tot_sim
;
tot_sim
.
start
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment