diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 44ba6c36b9cad3e44ea5cc8ac7f51027a77234eb..a39cfcd73279d6e25b8020f7b08cfb5a7c962c88 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,10 +8,7 @@ stages: env:ubuntu_zesty: image: keckj/hysop:ubuntu_zesty stage: env - script: "sh ci/scripts/version.sh 2>&1 | tee /tmp/ubuntu_zesty_env" - artifacts: - paths: - - /tmp/ubuntu_zesty_env + script: "sh ci/scripts/version.sh" config:ubuntu_zesty: image: keckj/hysop:ubuntu_zesty diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c4b38fd7e0a24f0f90c009305fe76701ace6c28..2c7743cae842e5debee62edd16c4285cefe963a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ option(VERBOSE "Enable verbose mode for HySoP. Default = ON" ON) option(DEBUG "Enable debug mode for HySoP. Default = OFF" OFF) option(FULL_TEST "Enable all test options (pep8, mpi ...) - Default = OFF" OFF) option(OPTIM "To allow python -OO run, some packages must be deactivated. Set this option to 'ON' to do so. Default = OFF" OFF) -option(WITH_MPI_TESTS "Enable mpi tests. Default = ON if USE_MPI is ON." ON) +option(WITH_MPI_TESTS "Enable mpi tests. Default = OFF." OFF) option(WITH_GOOGLE_TESTS "Enable google tests (c++). Default = OFF." OFF) option(FORTRAN_LAYOUT "Choose default data layout ('fortran', column-major or 'C' order, row-major) for arrays. Default = column-major." OFF) option(WITH_DOCUMENTATION "Build Documentation. Default = OFF" OFF) diff --git a/ci/scripts/build_install_clean.sh b/ci/scripts/build_install_clean.sh index a0663d04a595d0431d4a4add64a9df9df33f31b5..00f85b4ca83928cc382d5c79890cb2fba39ae614 100644 --- a/ci/scripts/build_install_clean.sh +++ b/ci/scripts/build_install_clean.sh @@ -1,11 +1,13 @@ #!/bin/bash +set -e cd build make make install cd - python -c 'import hysop' cd build -echo $'y\n'|make uninstall +echo $'y\n' | make uninstall make clean cd - rm -rf build +exit 0 diff --git a/ci/scripts/config.sh b/ci/scripts/config.sh index fd983559c56973578bda07dfe710dd198f8b9fdd..470a35a3782516e2de5019cd3d36d8362be94f7c 100644 --- a/ci/scripts/config.sh +++ b/ci/scripts/config.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e mkdir build cd build export FC=mpif90 CC=mpicc CXX=mpic++ F77=mpif90 cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_CXX=OFF .. +exit 0 diff --git a/ci/scripts/run_tests.sh b/ci/scripts/run_tests.sh index fc5e1a792093993de07e64f5c5a8e850416e487e..d00b38ddbb0b9fe5e73c7822b7734a3349df37d7 100644 --- a/ci/scripts/run_tests.sh +++ b/ci/scripts/run_tests.sh @@ -1,7 +1,9 @@ #!/bin/bash +set -e mkdir build cd build export FC=mpif90 CC=mpicc CXX=mpic++ cmake -D CMAKE_BUILD_TYPE=Debug -DUSE_CXX=OFF .. make make test +exit 0 diff --git a/ci/scripts/version.sh b/ci/scripts/version.sh index 2e8fdc77edc8a85f9d22a1c2e1d8e8183886bc76..6588201ce29c4ab1eb55fc99d70a1c1339ef647e 100644 --- a/ci/scripts/version.sh +++ b/ci/scripts/version.sh @@ -1,3 +1,5 @@ +#!/bin/bash +set -e echo "HOST" uname -a echo @@ -14,3 +16,4 @@ echo echo "CL_INFO" clinfo echo +exit 0 diff --git a/cmake/hysop_tests.cmake b/cmake/hysop_tests.cmake index b32777bcaa0d58499bda318ecc272a82f8dbecfa..d12fbccd669b75f74ce7abfeb3548f1c9328a296 100755 --- a/cmake/hysop_tests.cmake +++ b/cmake/hysop_tests.cmake @@ -54,33 +54,7 @@ endif() # === Set the list of all directories which may contain tests === -set(py_src_dirs - core - backend - fields - domain - operator - numerics - tools - ) - -# If GPU is on, we add test_XXX.py files of hysop/gpu directory -#if(WITH_GPU) -#endif() - -# Copy the OpenCL sources files to build dir (required since only python files are copied by setup.py) -#set(clfiles) -#file(GLOB clfilestmp RELATIVE ${CMAKE_SOURCE_DIR} hysop/gpu/cl_src/[a-z]*.cl) -#set(clfiles ${clfiles} ${clfilestmp}) -#file(GLOB clfilestmp RELATIVE ${CMAKE_SOURCE_DIR} hysop/gpu/cl_src/kernels/[a-z]*.cl) -#set(clfiles ${clfiles} ${clfilestmp}) -#file(GLOB clfilestmp RELATIVE ${CMAKE_SOURCE_DIR} hysop/gpu/cl_src/advection/[a-z]*.cl) -#set(clfiles ${clfiles} ${clfilestmp}) -#file(GLOB clfilestmp RELATIVE ${CMAKE_SOURCE_DIR} hysop/gpu/cl_src/remeshing/[a-z]*.cl) -#set(clfiles ${clfiles} ${clfilestmp}) -#foreach(_F ${clfiles}) - #configure_file(${_F} ${testDir}/${_F} COPYONLY) -#endforeach() +set(py_src_dirs operator) # === Create the files list from all directories in py_src_dirs === diff --git a/hysop/__init__.py b/hysop/__init__.py index da7a5a741cc7440e3168119b618ab1f056fa6148..d0b915762e2b99125a145a7f78e909ad187a85d1 100644 --- a/hysop/__init__.py +++ b/hysop/__init__.py @@ -16,7 +16,7 @@ __FFTW_ENABLED__ = "ON" is "ON" __SCALES_ENABLED__ = "ON" is "ON" __OPTIMIZE__ = not __debug__ -__VERBOSE__ = True +__VERBOSE__ = "ON" is "ON" __DEBUG__ = "OFF" is "ON" __PROFILE__ = "ON" is "ON" __TRACE__ = False @@ -26,8 +26,8 @@ __KERNEL_DEBUG__ = False __ENABLE_LONG_TESTS__ = "OFF" is "ON" # OpenCL -__DEFAULT_PLATFORM_ID__ = 0 -__DEFAULT_DEVICE_ID__ = 0 +__DEFAULT_PLATFORM_ID__ = 1 +__DEFAULT_DEVICE_ID__ = 1 if __MPI_ENABLED__: diff --git a/hysop/constants.py b/hysop/constants.py index f244bbf023bc41f8739c77b492666b12d12e07d6..56eebf09dd3a33f9406233fbb185d9b0b127f7e5 100644 --- a/hysop/constants.py +++ b/hysop/constants.py @@ -152,7 +152,7 @@ SpaceDiscretization = EnumFactory.create('SpaceDiscretization', AutotunerFlags = EnumFactory.create('AutotunerFlags', - ['ESTIMATE', 'MEASURE', 'PATIENT', 'EXHAUSTIVE' ]) + ['ESTIMATE', 'MEASURE', 'PATIENT', 'EXHAUSTIVE']) """Configuration flags for kernel autotuner (automatic runtime parameters tuning for cuda and opencl).""" DEFAULT_AUTOTUNER_FLAG = AutotunerFlags.MEASURE