Skip to content
Snippets Groups Projects
Commit 9513cb95 authored by Jean-Baptiste Keck's avatar Jean-Baptiste Keck
Browse files

order ok

parent 6f00650b
No related branches found
No related tags found
No related merge requests found
...@@ -179,7 +179,7 @@ endif() ...@@ -179,7 +179,7 @@ endif()
# --- FFTW --- # --- FFTW ---
if(WITH_FFTW) if(WITH_FFTW)
set(FIND_FFTW_VERBOSE OFF) set(FIND_FFTW_VERBOSE VERBOSE_MODE)
set(FIND_FFTW_DEBUG OFF) set(FIND_FFTW_DEBUG OFF)
compile_with(FFTW compile_with(FFTW
REQUIRED COMPONENTS Fftw3d Fftw3f Fftw3d-mpi Fftw3f-mpi REQUIRED COMPONENTS Fftw3d Fftw3f Fftw3d-mpi Fftw3f-mpi
...@@ -517,7 +517,8 @@ if(VERBOSE_MODE) ...@@ -517,7 +517,8 @@ if(VERBOSE_MODE)
message(STATUS " Project uses Scales : ${WITH_SCALES}") message(STATUS " Project uses Scales : ${WITH_SCALES}")
message(STATUS " Project uses FFTW : ${WITH_FFTW}") message(STATUS " Project uses FFTW : ${WITH_FFTW}")
message(STATUS " Project uses GPU : ${WITH_GPU}") message(STATUS " Project uses GPU : ${WITH_GPU}")
message(STATUS " ${PROJECT_NAME} debug mode : ${DEBUG}") message(STATUS " ${PROJECT_NAME} profile mode : ${PROFILE}")
message(STATUS " ${PROJECT_NAME} debug mode : ${DEBUG}")
message(STATUS " Enable -OO run? : ${OPTIM}") message(STATUS " Enable -OO run? : ${OPTIM}")
message(STATUS "====================== ======= ======================") message(STATUS "====================== ======= ======================")
message(STATUS " ") message(STATUS " ")
......
...@@ -54,6 +54,9 @@ class GPUStretching(DiscreteOperator, GPUOperator): ...@@ -54,6 +54,9 @@ class GPUStretching(DiscreteOperator, GPUOperator):
self.vorticity = vorticity self.vorticity = vorticity
self.velocity = velocity self.velocity = velocity
# order of spatial scheme
self.order = 2 if self.method[SpaceDiscretisation] is FDC2 else 4
# Worksize handling # Worksize handling
#TODO #TODO
self._cl_work_size = 0 self._cl_work_size = 0
...@@ -128,7 +131,6 @@ class GPUStretching(DiscreteOperator, GPUOperator): ...@@ -128,7 +131,6 @@ class GPUStretching(DiscreteOperator, GPUOperator):
hostbuf=mesh_info) hostbuf=mesh_info)
self.mesh_info_buffer = mesh_info_buffer self.mesh_info_buffer = mesh_info_buffer
kernels = {} kernels = {}
kernels['stretching'] = KernelLauncher(prg.all_kernels()[0], self.cl_env.queue, kernels['stretching'] = KernelLauncher(prg.all_kernels()[0], self.cl_env.queue,
gwi, lwi) gwi, lwi)
...@@ -142,7 +144,7 @@ class GPUStretching(DiscreteOperator, GPUOperator): ...@@ -142,7 +144,7 @@ class GPUStretching(DiscreteOperator, GPUOperator):
context = cl_env.ctx context = cl_env.ctx
work_dim = self.dim work_dim = self.dim
symbolic_mode = True symbolic_mode = True
order = 2 order = self.order
known_vars = { 'local_size': lwi } known_vars = { 'local_size': lwi }
codegen = CachedStretchingKernel(typegen=typegen, codegen = CachedStretchingKernel(typegen=typegen,
...@@ -176,8 +178,7 @@ class GPUStretching(DiscreteOperator, GPUOperator): ...@@ -176,8 +178,7 @@ class GPUStretching(DiscreteOperator, GPUOperator):
stretching_evt = self.kernels['stretching'](*kernel_args, wait_for=input_events) stretching_evt = self.kernels['stretching'](*kernel_args, wait_for=input_events)
if to_host: if to_host:
for field in self.variables: self.vorticity.toHost()
field.toHost()
def apply(self, simulation): def apply(self, simulation):
self._compute(simulation) self._compute(simulation)
......
...@@ -73,6 +73,8 @@ class OpenCLEnvironment(object): ...@@ -73,6 +73,8 @@ class OpenCLEnvironment(object):
# Floating point precision # Floating point precision
from hysop.codegen.base.types import OpenClTypeGen from hysop.codegen.base.types import OpenClTypeGen
print '__VERBOSE__',__VERBOSE__
print '__DEBUG__',__DEBUG__
if __VERBOSE__ or __DEBUG__: if __VERBOSE__ or __DEBUG__:
float_dump_mode='dec' float_dump_mode='dec'
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment