Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hysop
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
Container Registry
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
particle_methods
hysop
Commits
b19240e0
Commit
b19240e0
authored
6 years ago
by
Jean-Baptiste Keck
Browse files
Options
Downloads
Patches
Plain Diff
fixed diffusion opencl cpu test
parent
86ee256e
No related branches found
No related tags found
1 merge request
!3
Resolve "Sine and cosine transforms to solve homogeneous Neumann and Dirichlet problems"
Pipeline
#17204
passed
6 years ago
Stage: env
Stage: configure
Stage: build
Stage: install
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ci/scripts/test.sh
+5
-5
5 additions, 5 deletions
ci/scripts/test.sh
hysop/operator/tests/test_diffusion.py
+4
-3
4 additions, 3 deletions
hysop/operator/tests/test_diffusion.py
hysop/operator/tests/test_solenoidal_projection.py
+6
-6
6 additions, 6 deletions
hysop/operator/tests/test_solenoidal_projection.py
with
15 additions
and
14 deletions
ci/scripts/test.sh
+
5
−
5
View file @
b19240e0
...
@@ -68,13 +68,13 @@ python -c 'import hysop; print hysop'
...
@@ -68,13 +68,13 @@ python -c 'import hysop; print hysop'
#python "$HYSOP_DIR/operator/tests/test_spectral_derivative.py"
#python "$HYSOP_DIR/operator/tests/test_spectral_derivative.py"
#python "$HYSOP_DIR/operator/tests/test_spectral_curl.py"
#python "$HYSOP_DIR/operator/tests/test_spectral_curl.py"
python
"
$HYSOP_DIR
/operator/tests/test_diffusion.py"
python
"
$HYSOP_DIR
/operator/tests/test_diffusion.py"
#
python "$HYSOP_DIR/operator/tests/test_poisson.py"
python
"
$HYSOP_DIR
/operator/tests/test_poisson.py"
#
python "$HYSOP_DIR/operator/tests/test_solenoidal_projection.py"
python
"
$HYSOP_DIR
/operator/tests/test_solenoidal_projection.py"
#
python "$HYSOP_DIR/operator/tests/test_poisson_curl.py"
python
"
$HYSOP_DIR
/operator/tests/test_poisson_curl.py"
# If scales (fortran advection library) is installed
# If scales (fortran advection library) is installed
#
python -c "from hysop.f2hysop import scales2py as scales" && python "$HYSOP_DIR/operator/tests/test_scales_advection.py"
python
-c
"from hysop.f2hysop import scales2py as scales"
&&
python
"
$HYSOP_DIR
/operator/tests/test_scales_advection.py"
#
python -c "from hysop.f2hysop import scales2py as scales" && python "$HYSOP_DIR/operator/tests/test_bilevel_advection.py"
python
-c
"from hysop.f2hysop import scales2py as scales"
&&
python
"
$HYSOP_DIR
/operator/tests/test_bilevel_advection.py"
#export HYSOP_VERBOSE=1
#export HYSOP_VERBOSE=1
#EXAMPLE_DIR="$HYSOP_DIR/../examples"
#EXAMPLE_DIR="$HYSOP_DIR/../examples"
...
...
This diff is collapsed.
Click to expand it.
hysop/operator/tests/test_diffusion.py
+
4
−
3
View file @
b19240e0
...
@@ -132,7 +132,7 @@ class TestDiffusionOperator(object):
...
@@ -132,7 +132,7 @@ class TestDiffusionOperator(object):
sys
.
stdout
.
flush
()
sys
.
stdout
.
flush
()
diff
=
Diffusion
(
cl_env
=
cl_env
,
**
base_kwds
)
diff
=
Diffusion
(
cl_env
=
cl_env
,
**
base_kwds
)
yield
diff
.
to_graph
()
yield
diff
.
to_graph
()
msg
=
'
\n
*OpenCl FFTW:
'
msg
=
'
*OpenCl FFTW:
'
print
msg
print
msg
cpu_envs
=
tuple
(
iter_clenv
(
device_type
=
'
cpu
'
))
cpu_envs
=
tuple
(
iter_clenv
(
device_type
=
'
cpu
'
))
if
cpu_envs
:
if
cpu_envs
:
...
@@ -140,7 +140,8 @@ class TestDiffusionOperator(object):
...
@@ -140,7 +140,8 @@ class TestDiffusionOperator(object):
msg
=
'
|platform {}, device {}
'
.
format
(
cl_env
.
platform
.
name
.
strip
(),
msg
=
'
|platform {}, device {}
'
.
format
(
cl_env
.
platform
.
name
.
strip
(),
cl_env
.
device
.
name
.
strip
())
cl_env
.
device
.
name
.
strip
())
print
msg
,
print
msg
,
yield
Diffusion
(
cl_env
=
cl_env
,
enforce_implementation
=
False
,
**
base_kwds
)
diff
=
Diffusion
(
cl_env
=
cl_env
,
enforce_implementation
=
False
,
**
base_kwds
)
yield
diff
.
to_graph
()
else
:
else
:
msg
=
'
Unknown implementation to test {}.
'
.
format
(
impl
)
msg
=
'
Unknown implementation to test {}.
'
.
format
(
impl
)
raise
NotImplementedError
(
msg
)
raise
NotImplementedError
(
msg
)
...
@@ -260,7 +261,7 @@ class TestDiffusionOperator(object):
...
@@ -260,7 +261,7 @@ class TestDiffusionOperator(object):
sys
.
stdout
.
write
(
'
\b
x
\n\n
'
)
sys
.
stdout
.
write
(
'
\b
x
\n\n
'
)
sys
.
stdout
.
flush
()
sys
.
stdout
.
flush
()
raise
raise
print
print
def
test_diffusion_1D_inplace
(
self
):
def
test_diffusion_1D_inplace
(
self
):
...
...
This diff is collapsed.
Click to expand it.
hysop/operator/tests/test_solenoidal_projection.py
+
6
−
6
View file @
b19240e0
...
@@ -209,16 +209,16 @@ class TestSolenoidalProjectionOperator(object):
...
@@ -209,16 +209,16 @@ class TestSolenoidalProjectionOperator(object):
print
'
>Input analytic velocity:
'
print
'
>Input analytic velocity:
'
for
(
Ui
,
ui
)
in
zip
(
U
,
analytic_solutions
[
'
Us
'
]):
for
(
Ui
,
ui
)
in
zip
(
U
,
analytic_solutions
[
'
Us
'
]):
print
'
*{} = {}
'
.
format
(
Ui
.
pretty_name
,
format_expr
(
ui
))
print
'
*{} = {}
'
.
format
(
Ui
.
pretty_name
,
format_expr
(
ui
))
print
'
*div(U) = {}
'
.
format
(
format_expr
(
analytic_solutions
[
'
divUs
'
][
0
]))
print
'
*div(U) = {}
'
.
format
(
format_expr
(
analytic_solutions
[
'
divUs
'
][
0
]))
print
'
>Expected velocity vector potential (solenoidal projection) is:
'
print
'
>Expected velocity vector potential (solenoidal projection) is:
'
for
(
Ui
,
ui
)
in
zip
(
U0
,
analytic_solutions
[
'
U0s
'
]):
for
(
Ui
,
ui
)
in
zip
(
U0
,
analytic_solutions
[
'
U0s
'
]):
print
'
*{} = {}
'
.
format
(
Ui
.
pretty_name
,
format_expr
(
ui
))
print
'
*{} = {}
'
.
format
(
Ui
.
pretty_name
,
format_expr
(
ui
))
print
'
*div(U0) = {}
'
.
format
(
format_expr
(
analytic_solutions
[
'
divU0s
'
][
0
]))
print
'
*div(U0) = {}
'
.
format
(
format_expr
(
analytic_solutions
[
'
divU0s
'
][
0
]))
print
'
>Expected velocity scalar potential is:
'
print
'
>Expected velocity scalar potential is:
'
for
(
Ui
,
ui
)
in
zip
(
U1
,
analytic_solutions
[
'
U1s
'
]):
for
(
Ui
,
ui
)
in
zip
(
U1
,
analytic_solutions
[
'
U1s
'
]):
print
'
*{} = {}
'
.
format
(
Ui
.
pretty_name
,
format_expr
(
ui
))
print
'
*{} = {}
'
.
format
(
Ui
.
pretty_name
,
format_expr
(
ui
))
print
'
*div(U1) = {}
'
.
format
(
format_expr
(
analytic_solutions
[
'
divU1s
'
][
0
]))
print
'
*div(U1) = {}
'
.
format
(
format_expr
(
analytic_solutions
[
'
divU1s
'
][
0
]))
print
'
>Testing all available implementations:
'
print
'
>Testing all available implementations:
'
implementations
=
SolenoidalProjection
.
implementations
()
implementations
=
SolenoidalProjection
.
implementations
()
...
...
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