diff --git a/HySoP/CMakeLists.txt b/HySoP/CMakeLists.txt index 715d373cb1d9b73714073b622934b43f7c241946..65e81800afda1b574a81df0ca12c0b3a4bb3dc18 100644 --- a/HySoP/CMakeLists.txt +++ b/HySoP/CMakeLists.txt @@ -7,7 +7,7 @@ # - parmesscales (fortran library) particular solver from scales, (libparmesscales...) # # parmes depends (optionally) on : -# - parmesscales (USE_SCALES=ON, default) +# - parmesscales (WITH_SCALES=ON, default) # - ppm-core (USE_PPM=ON, default=OFF) # - ppm-numerics (USE_PPMNumerics, default=OFF) # diff --git a/HySoP/hysop/f2py/scales2py.f90 b/HySoP/hysop/f2py/scales2py.f90 index d315a2f341f0842e1bdd22a2001e6ff5bc13efcd..7281e40b8d5f351284d19cbfddd34c1b24376618 100755 --- a/HySoP/hysop/f2py/scales2py.f90 +++ b/HySoP/hysop/f2py/scales2py.f90 @@ -74,17 +74,16 @@ contains topocoords = coord end subroutine getTopoCoords - subroutine advecStep(timeStep,Vx,Vy,Vz,scal,dim_split) + subroutine advecStep(timeStep,Vx,Vy,Vz,scal) real(pk), intent(in) :: timeStep real(pk), dimension(:,:,:), intent(in) :: Vx, Vy, Vz real(pk), dimension(:,:,:), intent(inout) :: scal - character(len=*), optional, intent(in) :: dim_split real(pk) :: t0 t0 = MPI_Wtime() - call advec_step(timeStep,Vx,Vy,Vz,scal,dim_split) + call advec_step(timeStep,Vx,Vy,Vz,scal) print *, "inside ...", cart_rank, ":", MPI_Wtime()-t0 end subroutine advecStep diff --git a/HySoP/setup.py.in b/HySoP/setup.py.in index 158b3c9d115790762c8b9e3a3245bbd1ac9116ad..e9ff02d77a1d1f319c0f5c4bdbe5f5ad7cb701f6 100644 --- a/HySoP/setup.py.in +++ b/HySoP/setup.py.in @@ -26,7 +26,8 @@ packages = ['parmepy', # Enable this to get debug info # DISTUTILS_DEBUG=1 inc_dir = '@MPI_Fortran_INCLUDE_PATH@'.split(';') -inc_dir.remove('') # To avoid -I -I in compiler call. Result in a bug. +while inc_dir.count('') >0: + inc_dir.remove('') # To avoid -I -I in compiler call. Result in a bug. parmes_dir = '@CMAKE_BINARY_DIR@/Modules' inc_dir.append(parmes_dir) parmes_libdir = ['@CMAKE_BINARY_DIR@/src'] @@ -45,19 +46,28 @@ f2py_options = ['--no-lower'] ## ext_modules=[scalesModule] ext_modules =[] +fortran_dir = '@CMAKE_SOURCE_DIR@/parmepy/f2py/' +enable_fortran = False withfftw = "@WITH_FFTW@" if(withfftw is "ON"): #fortran_src = glob.glob('@CMAKE_SOURCE_DIR@/parmepy/f2py/*.f90') - fortran_dir = '@CMAKE_SOURCE_DIR@/parmepy/f2py/' - fortran_src = [fortran_dir+'parameters.f90',fortran_dir+'fftw2py.f90',fortran_dir+'scales2py.f90'] - -# rep = '@CMAKE_SOURCE_DIR@/parmepy/f2py/' - # fortran_src.insert(0,rep+'/parameters.f90') + + fortran_src = [fortran_dir+'parameters.f90',fortran_dir+'fftw2py.f90'] + enable_fortran = True fftwdir = '@FFTWLIB@' fftwdir = os.path.split(fftwdir)[0] parmeslib.append('fftw3') parmeslib.append('fftw3_mpi') parmes_libdir.append(fftwdir) + +withscales = '@WITH_SCALES@' +if(withscales is "ON"): + fortran_src.append(fortran_dir+'scales2py.f90') + enable_fortran = True + +if(enable_fortran): +# rep = '@CMAKE_SOURCE_DIR@/parmepy/f2py/' +# fortran_src.insert(0,rep+'/parameters.f90') parpyModule = Extension(name='parmepy.f2py', f2py_options=f2py_options, sources=fortran_src, diff --git a/HySoP/src/CMakeLists.txt b/HySoP/src/CMakeLists.txt index bf003821cf24a763251dc4e82c451f48f17c3df5..ccf746ce1bafc0a4077edd248f76cad4b8c3c10e 100644 --- a/HySoP/src/CMakeLists.txt +++ b/HySoP/src/CMakeLists.txt @@ -24,6 +24,7 @@ if(WITH_SCALES) scalesInterface/ scalesInterface/layout scalesInterface/particles + scalesInterface/particles/advec_line scalesInterface/output ) endif() diff --git a/HySoP/src/scalesInterface/particles/advec_remesh_formula.f90 b/HySoP/src/scalesInterface/particles/advec_remesh_formula.f90 index 1c6dc2b23d73393af7694a80c77cf27e7fa6da54..8395d0b0fc0a56c98544bc5491658b9c12ccdd9e 100644 --- a/HySoP/src/scalesInterface/particles/advec_remesh_formula.f90 +++ b/HySoP/src/scalesInterface/particles/advec_remesh_formula.f90 @@ -323,10 +323,12 @@ subroutine ac_remesh_lambda2corrected_array(direction, p_pos_adim, scal1d, bl_ty ! XXX Debug - end if (bl_type(bl_ind)) then ! tagged, the first particle belong to a centered block and the last to left block. - call AC_remesh_tag_CL(direction, p_pos_adim(p_ind), scal1D(p_ind), p_pos_adim(p_ind+1), scal1D(p_ind+1), remesh_buffer) + call AC_remesh_tag_CL(direction, p_pos_adim(p_ind), scal1D(p_ind), p_pos_adim(p_ind+1), & + scal1D(p_ind+1), remesh_buffer) else ! tagged, the first particle belong to a left block and the last to centered block. - call AC_remesh_tag_LC(direction, p_pos_adim(p_ind), scal1D(p_ind), p_pos_adim(p_ind+1), scal1D(p_ind+1), remesh_buffer) + call AC_remesh_tag_LC(direction, p_pos_adim(p_ind), scal1D(p_ind), p_pos_adim(p_ind+1), & + scal1D(p_ind+1), remesh_buffer) end if else if (bl_type(bl_ind)) then