diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2acb5ab5461061245b4e1203a28ad9b443da9899..dab2afb9dc843069324accba041f37fb930b1d83 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,6 +85,9 @@ endif()
 # do not build ETI by default
 set(KOKKOS_ENABLE_EXPLICIT_INSTANTIATION OFF CACHE BOOL "")
 
+# do not use Kokkos deprecated code
+set(KOKKOS_ENABLE_DEPRECATED_CODE OFF CACHE BOOL "")
+
 # Kokkso compiler flags
 add_subdirectory(${PASTIS_SOURCE_DIR}/packages/kokkos)
 include_directories(${Kokkos_INCLUDE_DIRS_RET})
diff --git a/src/mesh/ConnectivityUtils.hpp b/src/mesh/ConnectivityUtils.hpp
index 641ea8356840bfb610e0e1a216dd558f4b6d92c9..8b74b23a4f036777dd972c5b4a4ccc1d45003506 100644
--- a/src/mesh/ConnectivityUtils.hpp
+++ b/src/mesh/ConnectivityUtils.hpp
@@ -21,7 +21,7 @@ public:
     Kokkos::parallel_reduce(number_of_cells, KOKKOS_LAMBDA(const int& j, size_t& nb_max) {
 	const size_t n = cell_nb_nodes[j];
 	if (n > nb_max) nb_max = n;
-      }, Max<size_t>(max_nb_node_per_cell));
+      }, Kokkos::Max<size_t>(max_nb_node_per_cell));
 
     for (unsigned int j=0; j<number_of_cells; ++j) {
       for (unsigned int r=0; r<cell_nb_nodes[j]; ++r) {