diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa569bd24..5f779270a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,6 +38,11 @@ # - tbb # - openmp # - mpich2 +# * .gitlab/ci/docker/ubuntu2004/doxygen/ +# - gcc 9.3 +# - tbb +# - openmp +# - mpich2 .docker_image: &docker_image variables: @@ -78,6 +83,12 @@ extends: - .docker_image +.ubuntu2004_doxygen: &ubuntu2004_doxygen + image: "kitware/vtkm:ci-doxygen-20200601" + extends: + - .docker_image + + .only-default: &only-default only: - master @@ -88,12 +99,9 @@ only: - master + # General Longer Term Tasks: -# - setup asan, and ubsan as sub-pipeline -# - setup clang tidy as sub-pipeline -# -# Current Tasks: -# - Determine if we can get sccache to work with CUDA +# - Setup clang tidy as sub-pipeline # - Setup a machine to replicate the issue in https://gitlab.kitware.com/vtk/vtk-m/-/issues/447 # Note: Centos7 doesn't work as they ship separate standard library # headers for each version. We will have to figure out something else @@ -165,6 +173,7 @@ stages: include: - local: '/.gitlab/ci/centos7.yml' - local: '/.gitlab/ci/centos8.yml' + - local: '/.gitlab/ci/doxygen.yml' - local: '/.gitlab/ci/rhel8.yml' - local: '/.gitlab/ci/ubuntu1604.yml' - local: '/.gitlab/ci/ubuntu1804.yml' diff --git a/.gitlab/ci/docker/ubuntu2004/doxygen/Dockerfile b/.gitlab/ci/docker/ubuntu2004/doxygen/Dockerfile new file mode 100644 index 000000000..5438644d3 --- /dev/null +++ b/.gitlab/ci/docker/ubuntu2004/doxygen/Dockerfile @@ -0,0 +1,33 @@ +FROM ubuntu:20.04 +LABEL maintainer "Robert Maynard" + +# Base dependencies for building VTK-m projects +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + cmake \ + curl \ + doxygen \ + g++ \ + git \ + git-lfs \ + libmpich-dev \ + libomp-dev \ + libtbb-dev \ + mpich \ + ninja-build \ + rsync \ + ssh \ + software-properties-common + +# Need to run git-lfs install manually on ubuntu based images when using the +# system packaged version +RUN git-lfs install + +# Provide CMake 3.17 so we can re-run tests easily +# This will be used when we run just the tests +RUN mkdir /opt/cmake/ && \ + curl -L https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3-Linux-x86_64.sh > cmake-3.17.3-Linux-x86_64.sh && \ + sh cmake-3.17.3-Linux-x86_64.sh --prefix=/opt/cmake/ --exclude-subdir --skip-license && \ + rm cmake-3.17.3-Linux-x86_64.sh && \ + ln -s /opt/cmake/bin/ctest /opt/cmake/bin/ctest-latest + +ENV PATH "${PATH}:/opt/cmake/bin" diff --git a/.gitlab/ci/docker/update_all.sh b/.gitlab/ci/docker/update_all.sh index 81b672ccf..2d8221af1 100755 --- a/.gitlab/ci/docker/update_all.sh +++ b/.gitlab/ci/docker/update_all.sh @@ -34,6 +34,10 @@ cd ubuntu1804/cuda10.1 sudo docker build -t kitware/vtkm:ci-ubuntu1804_cuda10.1-$date . cd ../.. +cd ubuntu2004/doxygen/ +sudo docker build -t kitware/vtkm:ci-doxygen-$date . +cd ../.. + # sudo docker login --username= sudo docker push kitware/vtkm sudo docker system prune diff --git a/.gitlab/ci/doxygen.yml b/.gitlab/ci/doxygen.yml new file mode 100644 index 000000000..953b048ce --- /dev/null +++ b/.gitlab/ci/doxygen.yml @@ -0,0 +1,34 @@ + +# Build on documentation for VTK-m on ubuntu2004 with TBB and OpenMP +# Uses gcc 9 +# Uses MPICH2 +doxygen: + stage: build + environment: + #establish that we need doxygen related + #env variables + name: doxygen-upload + only: + #make sure we are only trigged on + #the vtk-m primary project + variables: + - '$DOXYGEN_UPLOAD_ENABLE == "true"' + timeout: 30 minutes + interruptible: true + tags: + - vtkm + - docker + - linux + extends: + - .ubuntu2004_doxygen + before_script: + - "cmake -V -P .gitlab/ci/config/gitlab_ci_setup.cmake" + - "ctest -VV -S .gitlab/ci/ctest_configure.cmake" + script: + - eval `ssh-agent -s` + - ssh-add <(echo "$DOC_API_KEY_BASE64" | base64 --decode) + - doxygen build/docs/doxyfile + - rsync -tv --recursive --delete -e "ssh -o StrictHostKeyChecking=no" build/docs/doxygen/html/ vtkm.documentation + variables: + CMAKE_BUILD_TYPE: Release + VTKM_SETTINGS: "tbb+openmp+mpi+shared+docs" diff --git a/CMake/doxyfile.in b/CMake/doxyfile.in index dd08fa83a..b2e890922 100644 --- a/CMake/doxyfile.in +++ b/CMake/doxyfile.in @@ -357,8 +357,6 @@ ALLEXTERNALS = NO EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl - #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index 39bb7ff74..ce0bfb1bf 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -10,10 +10,16 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION ".*warning: ignoring loop annotation.*" - ".*warning: Included by graph for.*not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES." + ".*warning: Included by graph for.*not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.*" + + # disable doxygen warnings about no matching members caused by auto keyword + ".*warning: no matching file member found for.*" + + # disable doxygen warning from VTKM_DEPRECATED usage + ".*warning: Found.*while parsing initializer list!.*" # disable doxygen warning about potential recursion. - ".*warning: Detected potential recursive class relation between class vtkm::exec::internal::ArrayPortalTransform" + ".*warning: Detected potential recursive class relation between .*" # disable doxygen warning about not generating graph ".*warning: Included by graph for" diff --git a/Utilities/CI/reproduce_ci_env.py b/Utilities/CI/reproduce_ci_env.py index 62a682f6a..74d83cd3b 100755 --- a/Utilities/CI/reproduce_ci_env.py +++ b/Utilities/CI/reproduce_ci_env.py @@ -57,23 +57,9 @@ def load_ci_file(ci_file_path): ci_state.update(yaml.safe_load(open(include_path))) return ci_state -def ci_stages_and_jobs(ci_state): - stages = ci_state['stages'] - jobs = dict((s,[]) for s in stages) - for key in ci_state: - maybe_stage = key.split(':') - if maybe_stage[0] in stages: - jobs[maybe_stage[0]].append(maybe_stage[1]) - return jobs - -def subset_yml(ci_state, stage, name): - #given a stage and name generate a new yaml - #file that only contains information for stage and name. - #Does basic extend merging so that recreating the env is easier - runner_yml = {} - yml_name = stage+":"+name - runner_yml[yml_name] = ci_state[yml_name] - entry = runner_yml[yml_name] +def flattened_entry_copy(ci_state, name): + import copy + entry = copy.deepcopy(ci_state[name]) #Flatten 'extends' entries, only presume the first level of inheritance is #important @@ -86,6 +72,41 @@ def subset_yml(ci_state, stage, name): for e in entry['extends']: entry.update(ci_state[e]) del entry['extends'] + return entry + +def ci_stages_and_jobs(ci_state): + stages = ci_state['stages'] + jobs = dict((s,[]) for s in stages) + for key in ci_state: + entry = flattened_entry_copy(ci_state, key) + + is_job = False + if 'stage' in entry: + stage = entry['stage'] + if stage in stages: + is_job = True + + # if we have a job ( that isn't private ) + if is_job and not key.startswith('.'): + # clean up the name + clean_name = key + if ':' in key: + clean_name = key.split(':')[1] + jobs[stage].append(clean_name) + + + return jobs + +def subset_yml(ci_state, stage, name): + #given a stage and name generate a new yaml + #file that only contains information for stage and name. + #Does basic extend merging so that recreating the env is easier + runner_yml = {} + + if stage+":"+name in ci_state: + name = stage+":"+name + + runner_yml[name] = flattened_entry_copy(ci_state, name) return runner_yml class CallMode(enum.Enum): @@ -147,8 +168,12 @@ def create_container(ci_file_path, *args): #fully expanded into a single definition subset = subset_yml(ci_state, stage, name) + job_name = name + if stage+":"+name in subset: + job_name = stage+":"+name runner_name = stage+":"+name - runner = subset[runner_name] + + runner = subset[job_name] src_dir = get_root_dir() gitlab_env = [ k + '="' + v + '"' for k,v in runner['variables'].items()] diff --git a/vtkm/Tuple.h b/vtkm/Tuple.h index 83444b850..7544be2c9 100644 --- a/vtkm/Tuple.h +++ b/vtkm/Tuple.h @@ -131,6 +131,7 @@ VTKM_EXEC_CONT auto make_tuple(Ts&&... args) -> decltype(vtkm::MakeTuple(std::fo return vtkm::MakeTuple(std::forward(args)...); } +/// @cond NONE namespace detail { struct TupleTransformFunctor @@ -171,6 +172,7 @@ VTKM_EXEC_CONT auto TupleForEach(TupleType&& tuple, Function&& f) } } // namespace detail +/// @endcond template <> class Tuple<> diff --git a/vtkm/VecTraits.h b/vtkm/VecTraits.h index 57f34ed8d..e4a57c659 100644 --- a/vtkm/VecTraits.h +++ b/vtkm/VecTraits.h @@ -123,8 +123,8 @@ struct VTKM_NEVER_EXPORT VecTraits /// \brief Get a vector of the same type but with a different component. /// /// This type resolves to another vector with a different component type. For example, - /// vtkm::VecTraits>::ReplaceComponentType is vtkm::Vec. - /// This replacement is not recursive. So VecTraits, N>::ReplaceComponentType + /// @code vtkm::VecTraits>::ReplaceComponentType @endcode is vtkm::Vec. + /// This replacement is not recursive. So @code VecTraits, N>::ReplaceComponentType @endcode /// is vtkm::Vec. /// template @@ -134,7 +134,7 @@ struct VTKM_NEVER_EXPORT VecTraits /// /// This type resolves to another vector with a different base component type. The replacement /// is recursive for nested types. For example, - /// VecTraits, N>::ReplaceComponentType is Vec, N>. + /// @code VecTraits, N>::ReplaceComponentType @endcode is Vec, N>. /// template using ReplaceBaseComponentType = VecTemplate< @@ -270,8 +270,8 @@ struct VTKM_NEVER_EXPORT VecTraits> /// \brief Get a vector of the same type but with a different component. /// /// This type resolves to another vector with a different component type. For example, -/// vtkm::VecTraits>::ReplaceComponentType is vtkm::Vec. -/// This replacement is not recursive. So VecTraits, N>::ReplaceComponentType +/// @code vtkm::VecTraits>::ReplaceComponentType @endcode is vtkm::Vec. +/// This replacement is not recursive. So @code VecTraits, N>::ReplaceComponentType @endcode /// is vtkm::Vec. ///@{ #if defined(VTKM_GCC) && (__GNUC__ <= 5) @@ -289,7 +289,7 @@ struct VTKM_NEVER_EXPORT VecTraits> /// /// This type resolves to another vector with a different base component type. The replacement /// is recursive for nested types. For example, -/// VecTraits, N>::ReplaceComponentType is Vec, N>. +/// @code VecTraits, N>::ReplaceComponentType @endcode is Vec, N>. ///@{ #if defined(VTKM_GCC) && (__GNUC__ <= 5) // Silly workaround for bug in GCC <= 5 @@ -381,8 +381,8 @@ struct VTKM_NEVER_EXPORT VecTraits> /// \brief Get a vector of the same type but with a different component. /// /// This type resolves to another vector with a different component type. For example, - /// vtkm::VecTraits>::ReplaceComponentType is vtkm::Vec. - /// This replacement is not recursive. So VecTraits, N>::ReplaceComponentType + /// @code vtkm::VecTraits>::ReplaceComponentType @endcode is vtkm::Vec. + /// This replacement is not recursive. So @code VecTraits, N>::ReplaceComponentType @endcode /// is vtkm::Vec. /// template @@ -392,7 +392,7 @@ struct VTKM_NEVER_EXPORT VecTraits> /// /// This type resolves to another vector with a different base component type. The replacement /// is recursive for nested types. For example, - /// VecTraits, N>::ReplaceComponentType is Vec, N>. + /// @code VecTraits, N>::ReplaceComponentType @endcode is Vec, N>. /// template using ReplaceBaseComponentType = vtkm::VecC< @@ -470,8 +470,8 @@ struct VTKM_NEVER_EXPORT VecTraits> /// \brief Get a vector of the same type but with a different component. /// /// This type resolves to another vector with a different component type. For example, - /// vtkm::VecTraits>::ReplaceComponentType is vtkm::Vec. - /// This replacement is not recursive. So VecTraits, N>::ReplaceComponentType + /// @code vtkm::VecTraits>::ReplaceComponentType @endcode is vtkm::Vec. + /// This replacement is not recursive. So @code VecTraits, N>::ReplaceComponentType @endcode /// is vtkm::Vec. /// template @@ -481,7 +481,7 @@ struct VTKM_NEVER_EXPORT VecTraits> /// /// This type resolves to another vector with a different base component type. The replacement /// is recursive for nested types. For example, - /// VecTraits, N>::ReplaceComponentType is Vec, N>. + /// @code VecTraits, N>::ReplaceComponentType @endcode is Vec, N>. /// template using ReplaceBaseComponentType = vtkm::VecCConst< diff --git a/vtkm/cont/Algorithm.h b/vtkm/cont/Algorithm.h index 7e1260dd4..7a077500b 100644 --- a/vtkm/cont/Algorithm.h +++ b/vtkm/cont/Algorithm.h @@ -23,7 +23,7 @@ namespace vtkm { namespace cont { - +/// @cond NONE namespace detail { template @@ -365,6 +365,7 @@ struct UpperBoundsFunctor } }; } // namespace detail +/// @endcond struct Algorithm { diff --git a/vtkm/cont/ArrayHandle.h b/vtkm/cont/ArrayHandle.h index 4992657ee..11fcd4cd0 100644 --- a/vtkm/cont/ArrayHandle.h +++ b/vtkm/cont/ArrayHandle.h @@ -83,7 +83,6 @@ using IsInValidArrayHandle = template using IsWritableArrayHandle = vtkm::internal::PortalSupportsSets::type::WritePortalType>; -/// @} /// Checks to see if the given object is an array handle. This check is /// compatible with C++11 type_traits. It a typedef named \c type that is diff --git a/vtkm/cont/Logging.h b/vtkm/cont/Logging.h index 9cced3c7e..d348cab3e 100644 --- a/vtkm/cont/Logging.h +++ b/vtkm/cont/Logging.h @@ -175,7 +175,7 @@ /// \def VTKM_LOG_CAST_FAIL(inObj, outType) /// \brief Convenience macro for logging a failed cast of dynamic object. /// \param inObj The dynamic object. -/// \param outObj The candidate type (or typelist) that was unsuccessful. +/// \param outType The candidate type (or typelist) that was unsuccessful. /// \def VTKM_LOG_TRYEXECUTE_FAIL(errorMessage, functorName, deviceId) /// \brief Convenience macro for logging a TryExecute failure to the Error level. diff --git a/vtkm/cont/StorageExtrude.h b/vtkm/cont/StorageExtrude.h index 0651fa169..16e677e46 100644 --- a/vtkm/cont/StorageExtrude.h +++ b/vtkm/cont/StorageExtrude.h @@ -290,9 +290,10 @@ struct VTKM_ALWAYS_EXPORT ArrayPortalExtrude vtkm::Int32 NumberOfPlanes; bool UseCylindrical; }; + template -typename ArrayPortalExtrude::ValueType -ArrayPortalExtrude::ArrayPortalExtrude::Get(vtkm::Id index) const +typename ArrayPortalExtrude::ValueType ArrayPortalExtrude::Get( + vtkm::Id index) const { using CompType = typename ValueType::ComponentType; @@ -313,8 +314,8 @@ ArrayPortalExtrude::ArrayPortalExtrude::Get(vtkm::Id index) const } template -typename ArrayPortalExtrude::ValueType -ArrayPortalExtrude::ArrayPortalExtrude::Get(vtkm::Id2 index) const +typename ArrayPortalExtrude::ValueType ArrayPortalExtrude::Get( + vtkm::Id2 index) const { using CompType = typename ValueType::ComponentType; @@ -336,7 +337,7 @@ ArrayPortalExtrude::ArrayPortalExtrude::Get(vtkm::Id2 index) const template vtkm::Vec::ValueType, 6> -ArrayPortalExtrude::ArrayPortalExtrude::GetWedge(const IndicesExtrude& index) const +ArrayPortalExtrude::GetWedge(const IndicesExtrude& index) const { using CompType = typename ValueType::ComponentType; diff --git a/vtkm/cont/tbb/internal/ParallelSortTBB.cxx b/vtkm/cont/tbb/internal/ParallelSortTBB.cxx index 3076b3a9c..9243017e6 100644 --- a/vtkm/cont/tbb/internal/ParallelSortTBB.cxx +++ b/vtkm/cont/tbb/internal/ParallelSortTBB.cxx @@ -54,7 +54,7 @@ #include #include -#include +#include #if defined(VTKM_MSVC) #pragma pop_macro("__TBB_NO_IMPLICITLINKAGE") @@ -69,7 +69,7 @@ namespace tbb namespace sort { -const size_t MAX_CORES = ::tbb::tbb_thread::hardware_concurrency(); +const size_t MAX_CORES = std::thread::hardware_concurrency(); // Simple TBB task wrapper around a generic functor. template diff --git a/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h b/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h index 60074269f..f461357f0 100644 --- a/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h +++ b/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h @@ -41,6 +41,7 @@ struct FetchTagArrayTopologyMapIn { }; +/// @cond NONE namespace detail { @@ -188,6 +189,7 @@ struct FetchArrayTopologyMapInImplementation< }; } // namespace detail +/// @endcond template struct Fetch& cells, vtkm::Id& nRows, diff --git a/vtkm/worklet/KdTree3D.h b/vtkm/worklet/KdTree3D.h index d3089270f..420265e63 100644 --- a/vtkm/worklet/KdTree3D.h +++ b/vtkm/worklet/KdTree3D.h @@ -51,7 +51,7 @@ public: /// \param nearestNeighborIds Nearest neighbor in the traning data set for each points in the /// testing set /// \param distances Distances between query points and their nearest neighbors. - /// \param device Tag for selecting device adapter. + /// \param deviceId Tag for selecting device adapter. template