Merge "Merge branch 'origin/release-2020' into master"
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 12 Dec 2019 19:42:34 +0000 (20:42 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Thu, 12 Dec 2019 19:42:34 +0000 (20:42 +0100)
16 files changed:
.gitlab-ci.yml
admin/ci-templates/.build-docs-template.yml
admin/ci-templates/.build-template.yml
admin/ci-templates/.clang-before-script.yml
admin/ci-templates/.gcc-before-script.yml [new file with mode: 0644]
admin/ci-templates/.gcc-build-template.yml
admin/ci-templates/.include-template.yml
admin/ci-templates/.variables-template.yml
scripts/CMakeLists.txt
scripts/CTest2JUnit.xsl [new file with mode: 0644]
src/gromacs/ewald/pme_coordinate_receiver_gpu.h
src/gromacs/ewald/pme_coordinate_receiver_gpu_impl.cpp
src/gromacs/ewald/pme_coordinate_receiver_gpu_impl.cu
src/gromacs/ewald/pme_coordinate_receiver_gpu_impl.h
src/gromacs/ewald/pme_only.cpp
src/programs/mdrun/tests/CMakeLists.txt

index e7446bba54c89db79954f3c62e18e0cad4177fcc..68e1313a78b017410c0437082848b1cbbe4b0a60 100644 (file)
@@ -16,6 +16,13 @@ include:
         - .variables-template
         - .tags-template
 
+.regressiontests-extends-template:
+    extends:
+        - .build-cache-template
+        - .variables-template
+        - .tags-template
+        - .regressiontests-template
+
 before_script:
   - mkdir -p ccache
   - export CCACHE_BASEDIR=${PWD}
@@ -30,17 +37,25 @@ stages:
   - build
   # Test each configuration, perhaps in multiple ways
   - test
+  # Generate documentation files
+  - documentation
+  # Check documentation from source code for errors
+  - source-check
   # Linting, docs, static analysis, coverage, code analysis...
   - post-test
+  # Release work for packaging code and verifying webpage
+  - release
 
 .build-gcc:
     extends:
         - .build-extends-template
+        - .gcc-before-script-template
         - .build-gcc-template
 
 .test-gcc:
     extends:
         - .test-extends-template
+        - .gcc-before-script-template
         - .test-gcc-template
 
 .build-gcc-mpi:
@@ -60,10 +75,18 @@ stages:
         - .clang-before-script-template
         - .test-clang-template
 
-.build-docs:
+.build-docs-binary:
     extends:
         - .build-extends-template
-        - .build-docs-template
+        - .build-docs-binary-template
+        - .clang-before-script-template
+        - .build-clang-template
+
+.build-docs-webpage:
+    extends:
+        - .build-extends-template
+        - .build-docs-webpage-template
+        - .clang-before-script-template
         - .build-clang-template
 
 .build-cuda-gcc:
@@ -72,7 +95,7 @@ stages:
         - .build-cuda-template
 
 prepare-regressiontests:
-    extends: .regressiontests-template
+    extends: .regressiontests-extends-template 
 
 
 build-gcc-7:
@@ -84,6 +107,9 @@ build-gcc-7:
 test-gcc-7:
     extends: .test-gcc
 
+    variables:
+        COMPILER_MAJOR_VERSION: 7
+
     dependencies: 
         - build-gcc-7
         - prepare-regressiontests
@@ -102,9 +128,11 @@ build-gcc-7-double:
         CMAKE_PRECISION_OPTIONS: -DGMX_DOUBLE=ON
 
 test-gcc-7-double:
-    allow_failure: true
     extends: .test-gcc
 
+    variables:
+        COMPILER_MAJOR_VERSION: 7
+
     dependencies:
         - build-gcc-7-double
         - prepare-regressiontests
@@ -119,6 +147,10 @@ build-gcc-8:
 test-gcc-8:
     extends: .test-gcc
 
+    variables:
+        COMPILER_MAJOR_VERSION: 8
+
+
     dependencies:
         - build-gcc-8
         - prepare-regressiontests
@@ -132,6 +164,9 @@ build-gcc-7-simd-sse41:
 test-gcc-7-simd-sse41:
     extends: .test-gcc
 
+    variables:
+        COMPILER_MAJOR_VERSION: 7
+
     dependencies:
         - build-gcc-7-simd-sse41
         - prepare-regressiontests
@@ -152,10 +187,29 @@ build-clang-7:
 test-clang-7:
     extends: .test-clang
 
+    variables:
+        COMPILER_MAJOR_VERSION: 7
+
     dependencies: 
         - build-clang-7
         - prepare-regressiontests
 
+build-clang-8:
+    extends: .build-clang
+
+    variables:
+        COMPILER_MAJOR_VERSION: 8
+
+test-clang-8:
+    extends: .test-clang
+
+    variables:
+        COMPILER_MAJOR_VERSION: 8
+
+    dependencies: 
+        - build-clang-8
+        - prepare-regressiontests
+
 # For version of clang before 7, we need to always provide the full version
 # Use something like this instead in the download script:
 # APT_COMPILER_VERSION=$(($COMPILER_MAJOR_VERSION < 7 ? "${COMPILER_MAJOR_VERSION}.0" : $COMPILER_MAJOR_VERSION))
@@ -168,38 +222,90 @@ build-clang-6:
 test-clang-6:
     extends: .test-clang
 
+    variables:
+        COMPILER_MAJOR_VERSION: "6.0"
+
     dependencies:
         - build-clang-6
         - prepare-regressiontests
 
 # TODO turn on openmp when updating master head
-# TODO needs to be set to not allow failure
 build-clang-tidy:
-  allow_failure: true
   extends: .build-clang
-  stage: post-test
-  dependencies: []
+  stage: source-check
+  needs:
+    - job: prepare-regressiontests
   variables:
     BUILD_DIR: build-clang-tidy
     COMPILER_MAJOR_VERSION: 7
-    CMAKE_EXTRA_OPTIONS: -DCLANG_TIDY=clang-tidy-$COMPILER_MAJOR_VERSION -DCMAKE_BUILD_TYPE=Reference -DGMX_CLANG_TIDY=ON -DGMX_COMPILER_WARNINGS=ON -DGMX_OPENMP=off
+    CMAKE_BUILD_TYPE_OPTIONS: -DCMAKE_BUILD_TYPE=Debug
+    CMAKE_EXTRA_OPTIONS: -DCLANG_TIDY=clang-tidy-$COMPILER_MAJOR_VERSION -DGMX_CLANG_TIDY=ON -DGMX_COMPILER_WARNINGS=ON -DGMX_OPENMP=off
+
+run-clang-format:
+  extends: .build-clang
+  stage: source-check
+  when: always
+  needs:
+    - job: prepare-regressiontests
+  variables:
+    COMPILER_MAJOR_VERSION: 7
+  script:
+    - export CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION
+    - admin/clang-format.sh check --rev=HEAD^ --warnings=clang-format.log
+    - grep -iq "needs formatting" clang-format.log | tee formatting.txt || true
+    - if [ -s formatting.txt ] ; then echo "clang-format.sh found issues"; exit 1; fi
+  artifacts:
+    when: on_failure
+    paths:
+      - clang-format.log
+      - formatting.txt
+
+update-with-clang-format:
+  extends: .build-clang
+  stage: source-check
+  when: manual
+  allow_failure: true
+  dependencies: []
+  variables:
+      COMPILER_MAJOR_VERSION: 7
+  script:
+    - export CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION
+    - admin/clang-format.sh update --rev=HEAD^ --warnings=clang-format.log
+    - grep -iq "clang-format performed" clang-format.log | tee formatting.txt || true
+    - if [ -s formatting.txt ] ; then echo "clang-format.sh updated files"; exit 1; fi
+  artifacts:
+    when: always
+    paths:
+      - clang-format.log
+      - formatting.txt
 
 build-docs:
-  extends: .build-docs
+  when: always
+  extends: .build-docs-binary
+  stage: documentation
+  needs:
+    - job: prepare-regressiontests
   variables:
     BUILD_DIR: build-docs
-    CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on -DCMAKE_BUILD_TYPE=Debug -DGMX_SIMD=None -DGMX_GPU=off
+    COMPILER_MAJOR_VERSION: 7
+    CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on -DGMX_SIMD=None -DGMX_GPU=off
 
 run-check-source:
-  extends: .build-docs
-  stage: test
-  dependencies:
-    - build-docs
+  when: always
+  extends: .build-docs-binary
+  stage: source-check
+  needs:
+    - job: build-docs
+      artifacts: true
   variables:
     BUILD_DIR: build-docs
+    COMPILER_MAJOR_VERSION: 7
   script:
     - cd $BUILD_DIR
     - cmake --build . --target check-source
+    - grep -qi "error" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee doxygenError.txt || true
+    - grep -qi "warning" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true
+    - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
   artifacts:
     name: docs-artifacts-$CI_COMMIT_REF_SLUG
     when: always
@@ -217,19 +323,25 @@ run-check-source:
 # TODO why are the doxygen and sphinx log files disappearing
 # TODO use a feature from gitlab runner instead of using pipefail to get timings for the job
 webpage:
-  extends: .build-docs
+  extends: .build-docs-webpage
+  when: always
   stage: post-test
-  dependencies:
-    - build-docs
-    - check-source
+  needs:
+    - job: build-docs
+      artifacts: true
+    - job: run-check-source
+      artifacts: true
   variables:
     BUILD_DIR: build-docs
-  before_script:
-    - apt-get -yqq install moreutils
+    COMPILER_MAJOR_VERSION: 7
   script:
     - cd $BUILD_DIR
     - set -o pipefail && cmake --build . --target manual 2>&1 > docs/manual/all-output.txt | ts "%Y/%m/%d %H:%M:%S"
     - set -o pipefail && cmake --build . --target webpage | ts "%Y/%m/%d %H:%M:%S"
+    - grep -qi "error" docs/sphinx-*.log | tee sphinxDiagnostics.txt || true
+    - grep -qi "warning" docs/sphinx-*.log | tee -a sphinxDiagnostics.txt || true
+    - if [ -s sphinxDiagnostics.txt ] ; then echo "Found errors during Sphinx documentation build"; cat sphinxDiagnostics.txt; exit 1; fi
+    - cd ..
   artifacts:
     name: docs-artifacts-$CI_COMMIT_REF_SLUG
     when: always
@@ -243,19 +355,19 @@ webpage:
       - $BUILD_DIR/docs/doxygen/doxygen-full.log
       - $BUILD_DIR/docs/sphinx-html.log
 
-# TODO do this only in release pipeline
-#linkchecker:
-#    extends: .build-docs
-#    stage: post-test
-#    when: manual
-#    dependencies:
-#        - webpage
-#    variables:
-#        BUILD_DIR: build-docs
-#    script:
-#        - cd $BUILD_DIR
-#        - linkchecker docs/html/index.html -f ../docs/linkcheckerrc -Fxml
-#  artifacts:
-#    reports:
-#      junit: $BUILD_DIR/docs/linkchecker-out.xml
+linkchecker:
+  extends: .build-docs-webpage
+  stage: release
+  when: manual
+  needs:
+    - job: webpage
+      artifacts: true
+  variables:
+      BUILD_DIR: build-docs
+  script:
+      - cd $BUILD_DIR
+      - linkchecker docs/html/index.html -f ../docs/linkcheckerrc -Fxml --ignore-url html-full --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
+  artifacts:
+    reports:
+      junit: $BUILD_DIR/linkchecker-out.xml
 
index 6330b3ade89e31e5034d64257d4b73c2eeb99b2f..b8508e7e4f611e378a2e2ce02faf77b8de83cc47 100644 (file)
@@ -1,4 +1,4 @@
-.build-docs-template:
+.build-docs-binary-template:
   # Built by admin/dockerfiles/ci-docs
   # TODO this should be organized more like the current documentation.py script
   image: gromacs/gromacs:ci-docs
@@ -6,6 +6,7 @@
     KUBERNETES_CPU_REQUEST: 4
     CMAKE_COMPILER_SCRIPT: ""
     CMAKE_EXTRA_OPTIONS: ""
+    CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
 
   script:
     - echo $BUILD_DIR
@@ -16,6 +17,7 @@
     - cmake ..
         $CMAKE_COMPILER_SCRIPT
         $CMAKE_EXTRA_OPTIONS
+        $CMAKE_BUILD_TYPE_OPTIONS
     - cmake --build . --target gmx -- -j$KUBERNETES_CPU_REQUEST
     - cd ..
   artifacts:
     expire_in: 1 week
     paths:
       - $BUILD_DIR
+
+.build-docs-webpage-template:
+  # Built by admin/dockerfiles/ci-docs
+  # TODO this should be organized more like the current documentation.py script
+  image: gromacs/gromacs:ci-docs
+  variables:
+    KUBERNETES_CPU_REQUEST: 4
+    CMAKE_COMPILER_SCRIPT: ""
+    CMAKE_EXTRA_OPTIONS: ""
+    CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
index c661cf454b3571862fa8cc9f1eab4936bc9f3288..7f02c824688787b3d28029ff40f2374d2b9f2460 100644 (file)
@@ -9,6 +9,8 @@
     CMAKE_SIMD_OPTIONS: ""
     CMAKE_MPI_OPTIONS: ""
     CMAKE_PRECISION_OPTIONS: ""
+    CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
+    CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
 
   script:
     - echo $BUILD_DIR
@@ -17,6 +19,7 @@
     - echo $CMAKE_SIMD_OPTIONS
     - echo $CMAKE_MPI_OPTIONS
     - echo $CMAKE_PRECISION_OPTIONS
+    - echo $CMAKE_BUILD_TYPE_OPTIONS
     - echo $INSTALL_DIR
     - mkdir -p $BUILD_DIR
     - cd $BUILD_DIR
         $CMAKE_SIMD_OPTIONS
         $CMAKE_MPI_OPTIONS
         $CMAKE_PRECISION_OPTIONS
+        $CMAKE_BUILD_TYPE_OPTIONS
+        $CMAKE_GPU_OPTIONS
         -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
-    - cmake --build . -- -j$KUBERNETES_CPU_REQUEST
-    - cmake --build . --target tests -- -j$KUBERNETES_CPU_REQUEST
-    - cmake --build . --target install
+        2>&1 | tee cmakeLog.log
+    - grep -qi "warning" cmakeLog.log | tee cmakeErrors.log || true
+    - cmake --build . -- -j4 2>&1 | tee buildLogFile.log
+    - grep -qi "warning" buildLogFile.log | tee buildErrors.log || true
+    - cmake --build . --target tests -- -j4 2>&1 | tee testBuildLogFile.log
+    - grep -qi "warning" testBuildLogFile.log | tee -a buildErrors.log || true
+    - cmake --build . --target install 2>&1 | tee installBuildLogFile.log
+    - if [ -s cmakeErrors.log  ] ; then echo "Found CMake warning while processing build"; exit 1; fi
+    - if [ -s buildErrors.log ] ; then echo "Found compiler warning during build"; exit 1; fi
     - cd ..
     - tar czf gmx-build.tar.gz $BUILD_DIR/
     - tar czf gmx-install.tar.gz $INSTALL_DIR/
   artifacts:
+    when: always
     paths:
       - gmx-build.tar.gz
       - gmx-install.tar.gz
+      - $BUILD_DIR/*log
index 547f44c28893a1268188aa7b9ae3a38650352055..20464c24f61bd76f9bb65836787dc3858bc16a8d 100644 (file)
@@ -9,8 +9,8 @@
       - time apt-get -qqy --no-install-suggests --no-install-recommends install
           build-essential cmake git ninja-build ccache
           clang++-$COMPILER_MAJOR_VERSION clang-tools-$COMPILER_MAJOR_VERSION
-          clang-tidy-$COMPILER_MAJOR_VERSION
-          libfftw3-dev libhwloc-dev liblapack-dev
+          clang-tidy-$COMPILER_MAJOR_VERSION clang-format-$COMPILER_MAJOR_VERSION libomp-dev
+          libfftw3-dev libhwloc-dev liblapack-dev moreutils grep
       - mkdir -p ccache
       - export CCACHE_BASEDIR=${PWD}
       - export CCACHE_DIR=${PWD}/ccache
diff --git a/admin/ci-templates/.gcc-before-script.yml b/admin/ci-templates/.gcc-before-script.yml
new file mode 100644 (file)
index 0000000..923d6ea
--- /dev/null
@@ -0,0 +1,16 @@
+.gcc-before-script-template:
+  variables:
+    COMPILER_MAJOR_VERSION: 7
+    EXTRA_INSTALLS: ""
+
+  before_script:
+      - time apt-get -qq update
+      - time apt-get -qqy --no-install-suggests --no-install-recommends install
+          build-essential cmake git ninja-build ccache
+          gcc-$COMPILER_MAJOR_VERSION g++-$COMPILER_MAJOR_VERSION
+          libfftw3-dev libhwloc-dev liblapack-dev moreutils grep
+          $EXTRA_INSTALLS
+      - mkdir -p ccache
+      - export CCACHE_BASEDIR=${PWD}
+      - export CCACHE_DIR=${PWD}/ccache
+
index 01a1b9ebf4bb5cd272d554d53459c11dbeb7dba8..7865ee2b77e8a895cf10530b12c99d388eb15d6c 100644 (file)
@@ -3,14 +3,4 @@
     COMPILER_MAJOR_VERSION: 7
     BUILD_DIR: build-gcc-$COMPILER_MAJOR_VERSION
     CMAKE_COMPILER_SCRIPT: -DCMAKE_C_COMPILER=gcc-$COMPILER_MAJOR_VERSION -DCMAKE_CXX_COMPILER=g++-$COMPILER_MAJOR_VERSION
-    EXTRA_INSTALLS: ""
-
-  before_script:
-      - time apt-get -qq update
-      - time apt-get -qqy --no-install-suggests --no-install-recommends install
-          build-essential cmake gcc-$COMPILER_MAJOR_VERSION g++-$COMPILER_MAJOR_VERSION 
-          $EXTRA_INSTALLS
-      - mkdir -p ccache
-      - export CCACHE_BASEDIR=${PWD}
-      - export CCACHE_DIR=${PWD}/ccache
 
index 670ccba84023f3dfd2571b81df490318171dec04..a483bf70382a97178d6ead76aa5a5385882eb90f 100644 (file)
@@ -4,6 +4,7 @@ include:
     - local: '/admin/ci-templates/.variables-template.yml'
     - local: '/admin/ci-templates/.build-template.yml'
     - local: '/admin/ci-templates/.test-runner-template.yml'
+    - local: '/admin/ci-templates/.gcc-before-script.yml'
     - local: '/admin/ci-templates/.gcc-build-template.yml'
     - local: '/admin/ci-templates/.gcc-test-template.yml'
     - local: '/admin/ci-templates/.clang-build-template.yml'
index dede8cc51bfdf28b4876faf23b6ad51153d3f806..1f8d3aa48c7e857bc35ff49af1f22597ee2ca8af 100644 (file)
@@ -1,6 +1,6 @@
 .variables-template:
     variables:
-     KUBERNETES_CPU_LIMIT: 16
+     KUBERNETES_CPU_LIMIT: 4
      KUBERNETES_MEMORY_LIMIT: 32Gi
      CACHE_FALLBACK_KEY: master
      BUILD_DIR: build
index 43aebd6db8d94d845da34a21ba5a44b15a86f121..e46805bfb7d15e5be98f3f8b9e90be095ba65fea 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2010,2014,2018, by the GROMACS development team, led by
+# Copyright (c) 2010,2014,2018,2019, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -37,6 +37,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/GMXRC.bash.cmakein ${CMAKE_CURRENT_BI
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/GMXRC.csh.cmakein  ${CMAKE_CURRENT_BINARY_DIR}/GMXRC.csh @ONLY)
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/GMXRC.zsh.cmakein  ${CMAKE_CURRENT_BINARY_DIR}/GMXRC.zsh @ONLY)
 
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTest2JUnit.xsl ${CMAKE_CURRENT_BINARY_DIR}/CTest2JUnit.xsl COPYONLY)
+
 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/GMXRC      DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime)
 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/GMXRC.bash DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime)
 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/GMXRC.zsh  DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime)
diff --git a/scripts/CTest2JUnit.xsl b/scripts/CTest2JUnit.xsl
new file mode 100644 (file)
index 0000000..0edc214
--- /dev/null
@@ -0,0 +1,121 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml" indent="yes"/>
+    <xsl:template match="/Site">
+    <xsl:variable name="Name"><xsl:value-of select="@Name"/></xsl:variable>
+    <xsl:variable name="Hostname"><xsl:value-of select="@Hostname"/></xsl:variable>
+    <xsl:variable name="TestCount"><xsl:value-of select="count(//TestList/Test)"/> </xsl:variable>
+    <xsl:variable name="ErrorCount"><xsl:value-of select="count(//TestList/Test[@Status='error'])"/> </xsl:variable>
+    <xsl:variable name="FailureCount"><xsl:value-of select="count(//Testing/Test[@Status='failed'])"/> </xsl:variable>
+    <testsuite name="{$Name}" hostname="{$Hostname}" errors="0" failures="{$FailureCount}" tests="{$TestCount}">
+        <xsl:variable name="BuildName"><xsl:value-of select="@BuildName"/></xsl:variable>
+        <xsl:variable name="BuildStamp"><xsl:value-of select="@BuildStamp"/></xsl:variable>
+        <xsl:variable name="Generator"><xsl:value-of select="@Generator"/></xsl:variable>
+        <xsl:variable name="CompilerName"><xsl:value-of select="@CompilerName"/></xsl:variable>
+        <xsl:variable name="OSName"><xsl:value-of select="@OSName"/></xsl:variable>
+        <xsl:variable name="OSRelease"><xsl:value-of select="@OSRelease"/></xsl:variable>
+        <xsl:variable name="OSVersion"><xsl:value-of select="@OSVersion"/></xsl:variable>
+        <xsl:variable name="OSPlatform"><xsl:value-of select="@OSPlatform"/></xsl:variable>
+        <xsl:variable name="Is64Bits"><xsl:value-of select="@Is64Bits"/></xsl:variable>
+        <xsl:variable name="VendorString"><xsl:value-of select="@VendorString"/></xsl:variable>
+        <xsl:variable name="VendorID"><xsl:value-of select="@VendorID"/></xsl:variable>
+        <xsl:variable name="FamilyID"><xsl:value-of select="@FamilyID"/></xsl:variable>
+        <xsl:variable name="ModelID"><xsl:value-of select="@ModelID"/></xsl:variable>
+        <xsl:variable name="ProcessorCacheSize"><xsl:value-of select="@ProcessorCacheSize"/></xsl:variable>
+        <xsl:variable name="NumberOfLogicalCPU"><xsl:value-of select="@NumberOfLogicalCPU"/></xsl:variable>
+        <xsl:variable name="NumberOfPhysicalCPU"><xsl:value-of select="@NumberOfPhysicalCPU"/></xsl:variable>
+        <xsl:variable name="TotalVirtualMemory"><xsl:value-of select="@TotalVirtualMemory"/></xsl:variable>
+        <xsl:variable name="TotalPhysicalMemory"><xsl:value-of select="@TotalPhysicalMemory"/></xsl:variable>
+        <xsl:variable name="LogicalProcessorsPerPhysical"><xsl:value-of select="@LogicalProcessorsPerPhysical"/></xsl:variable>
+        <xsl:variable name="ProcessorClockFrequency"><xsl:value-of select="@ProcessorClockFrequency"/></xsl:variable>
+        <properties>
+        <property name="BuildName" value="{$BuildName}" />
+        <property name="BuildStamp" value="{$BuildStamp}" />
+        <property name="Name" value="{$Name}" />
+        <property name="Generator" value="{$Generator}" />
+        <property name="CompilerName" value="{$CompilerName}" />
+        <property name="OSName" value="{$OSName}" />
+        <property name="Hostname" value="{$Hostname}" />
+        <property name="OSRelease" value="{$OSRelease}" />
+        <property name="OSVersion" value="{$OSVersion}" />
+        <property name="OSPlatform" value="{$OSPlatform}" />
+        <property name="Is64Bits" value="{$Is64Bits}" />
+        <property name="VendorString" value="{$VendorString}" />
+        <property name="VendorID" value="{$VendorID}" />
+        <property name="FamilyID" value="{$FamilyID}" />
+        <property name="ModelID" value="{$ModelID}" />
+        <property name="ProcessorCacheSize" value="{$ProcessorCacheSize}" />
+        <property name="NumberOfLogicalCPU" value="{$NumberOfLogicalCPU}" />
+        <property name="NumberOfPhysicalCPU" value="{$NumberOfPhysicalCPU}" />
+        <property name="TotalVirtualMemory" value="{$TotalVirtualMemory}" />
+        <property name="TotalPhysicalMemory" value="{$TotalPhysicalMemory}" />
+        <property name="LogicalProcessorsPerPhysical" value="{$LogicalProcessorsPerPhysical}" />
+        <property name="ProcessorClockFrequency" value="{$ProcessorClockFrequency}" />
+        </properties>
+        <xsl:apply-templates select="Testing/Test"/>
+
+        <system-out>
+        BuildName: <xsl:value-of select="$BuildName" />
+        BuildStamp: <xsl:value-of select="$BuildStamp" />
+        Name: <xsl:value-of select="$Name" />
+        Generator: <xsl:value-of select="$Generator" />
+        CompilerName: <xsl:value-of select="$CompilerName" />
+        OSName: <xsl:value-of select="$OSName" />
+        Hostname: <xsl:value-of select="$Hostname" />
+        OSRelease: <xsl:value-of select="$OSRelease" />
+        OSVersion: <xsl:value-of select="$OSVersion" />
+        OSPlatform: <xsl:value-of select="$OSPlatform" />
+        Is64Bits: <xsl:value-of select="$Is64Bits" />
+        VendorString: <xsl:value-of select="$VendorString" />
+        VendorID: <xsl:value-of select="$VendorID" />
+        FamilyID: <xsl:value-of select="$FamilyID" />
+        ModelID: <xsl:value-of select="$ModelID" />
+        ProcessorCacheSize: <xsl:value-of select="$ProcessorCacheSize" />
+        NumberOfLogicalCPU: <xsl:value-of select="$NumberOfLogicalCPU" />
+        NumberOfPhysicalCPU: <xsl:value-of select="$NumberOfPhysicalCPU" />
+        TotalVirtualMemory: <xsl:value-of select="$TotalVirtualMemory" />
+        TotalPhysicalMemory: <xsl:value-of select="$TotalPhysicalMemory" />
+        LogicalProcessorsPerPhysical: <xsl:value-of select="$LogicalProcessorsPerPhysical" />
+        ProcessorClockFrequency: <xsl:value-of select="$ProcessorClockFrequency" />
+        </system-out>
+    </testsuite>
+    </xsl:template>
+
+    <xsl:template match="Testing/Test">
+    <xsl:variable name="testcasename"><xsl:value-of select= "Name"/></xsl:variable>
+    <xsl:variable name="testclassname"><xsl:value-of select= " concat('this', substring(Path,2))"/></xsl:variable>
+    <xsl:variable name="exectime">
+        <xsl:for-each select="Results/NamedMeasurement">
+        <xsl:if test="@name = 'Execution Time'">
+            <xsl:value-of select="."/>
+        </xsl:if>
+        </xsl:for-each>
+    </xsl:variable>
+
+    <testcase name="{$testcasename}" classname="{$testclassname}" time="{$exectime}">
+        <xsl:if test="@Status = 'passed'">
+        </xsl:if>
+        <xsl:if test="@Status = 'failed'">
+        <xsl:variable name="failtype">
+            <xsl:for-each select="Results/NamedMeasurement">
+            <xsl:if test="@name = 'Exit Code'">
+                <xsl:value-of select="."/>
+            </xsl:if>
+            </xsl:for-each>
+        </xsl:variable>
+        <xsl:variable name="failcode">
+            <xsl:for-each select="Results/NamedMeasurement">
+            <xsl:if test="@name = 'Exit Value'">
+                <xsl:value-of select="."/>
+            </xsl:if>
+            </xsl:for-each>
+        </xsl:variable>
+        <failure message="{$failtype} ({$failcode})"><xsl:value-of select="Results/Measurement/Value/text()" /></failure>
+        </xsl:if>
+        <xsl:if test="@Status = 'notrun'">
+        <skipped><xsl:value-of select="Results/Measurement/Value/text()" /></skipped>
+        </xsl:if>
+    </testcase>
+    </xsl:template>
+
+</xsl:stylesheet>
+
index dfe848159380f441bb2a12be37fb8963773937ef..a4a608b5a25b1dd265ca412eeb64dc44524389f7 100644 (file)
@@ -66,7 +66,7 @@ public:
      * send coordinates buffer address to PP rank
      * \param[in] d_x   coordinates buffer in GPU memory
      */
-    void sendCoordinateBufferAddressToPpRanks(rvec* d_x);
+    void sendCoordinateBufferAddressToPpRanks(DeviceBuffer<float> d_x);
 
 
     /*! \brief
index 35ddc077336c5b1110a43c697fae388cf91fe117..213a88c59edaf5426aaaad7aa2998a4a685e8135 100644 (file)
@@ -60,9 +60,9 @@ class PmeCoordinateReceiverGpu::Impl
 };
 
 /*!\brief Constructor stub. */
-PmeCoordinateReceiverGpu::PmeCoordinateReceiverGpu(void gmx_unused* pmeStream,
-                                                   MPI_Comm gmx_unused    comm,
-                                                   gmx::ArrayRef<PpRanks> gmx_unused ppRanks) :
+PmeCoordinateReceiverGpu::PmeCoordinateReceiverGpu(void* /* pmeStream */,
+                                                   MPI_Comm /* comm */,
+                                                   gmx::ArrayRef<PpRanks> /* ppRanks */) :
     impl_(nullptr)
 {
     GMX_ASSERT(false,
@@ -73,14 +73,14 @@ PmeCoordinateReceiverGpu::PmeCoordinateReceiverGpu(void gmx_unused* pmeStream,
 PmeCoordinateReceiverGpu::~PmeCoordinateReceiverGpu() = default;
 
 /*!\brief init PME-PP GPU communication stub */
-void PmeCoordinateReceiverGpu::sendCoordinateBufferAddressToPpRanks(rvec gmx_unused* d_x)
+void PmeCoordinateReceiverGpu::sendCoordinateBufferAddressToPpRanks(const DeviceBuffer<float> /* d_x */)
 {
     GMX_ASSERT(false,
                "A CPU stub for PME-PP GPU communication initialization was called instead of the "
                "correct implementation.");
 }
 
-void PmeCoordinateReceiverGpu::launchReceiveCoordinatesFromPpCudaDirect(int gmx_unused ppRank)
+void PmeCoordinateReceiverGpu::launchReceiveCoordinatesFromPpCudaDirect(int /* ppRank */)
 {
     GMX_ASSERT(false,
                "A CPU stub for PME-PP GPU communication was called instead of the correct "
index 3ca69e27a882225bba32590da8afb32f0d2f0501..fd55c832ff2d3dc1c4cf4287766f481113d115d8 100644 (file)
@@ -72,7 +72,7 @@ PmeCoordinateReceiverGpu::Impl::Impl(void* pmeStream, MPI_Comm comm, gmx::ArrayR
 
 PmeCoordinateReceiverGpu::Impl::~Impl() = default;
 
-void PmeCoordinateReceiverGpu::Impl::sendCoordinateBufferAddressToPpRanks(rvec* d_x)
+void PmeCoordinateReceiverGpu::Impl::sendCoordinateBufferAddressToPpRanks(const DeviceBuffer<float> d_x)
 {
 
     int ind_start = 0;
@@ -134,7 +134,7 @@ PmeCoordinateReceiverGpu::PmeCoordinateReceiverGpu(void*                  pmeStr
 
 PmeCoordinateReceiverGpu::~PmeCoordinateReceiverGpu() = default;
 
-void PmeCoordinateReceiverGpu::sendCoordinateBufferAddressToPpRanks(rvec* d_x)
+void PmeCoordinateReceiverGpu::sendCoordinateBufferAddressToPpRanks(const DeviceBuffer<float> d_x)
 {
     impl_->sendCoordinateBufferAddressToPpRanks(d_x);
 }
index fe689799e1cb3a4b46d9578786fc0b9cac5c1fc7..84a554725b8e439c9d0ab595d5afafa6b514d28b 100644 (file)
@@ -67,7 +67,7 @@ public:
      * send coordinates buffer address to PP rank
      * \param[in] d_x   coordinates buffer in GPU memory
      */
-    void sendCoordinateBufferAddressToPpRanks(rvec* d_x);
+    void sendCoordinateBufferAddressToPpRanks(const DeviceBuffer<float> d_x);
 
     /*! \brief
      * launch receive of coordinate data from PP rank
index be7a977daf1313fbf6f982727bd2de86dde75a8a..a4ec1506569247686254ec41de92fda9fe26e318 100644 (file)
@@ -423,14 +423,10 @@ static int gmx_pme_recv_coeffs_coords(struct gmx_pme_t*            pme,
                                "but PME run mode is not PmeRunMode::GPU\n");
 
                     // This rank will have its data accessed directly by PP rank, so needs to send the remote addresses.
-                    rvec* d_x = nullptr;
-                    rvec* d_f = nullptr;
-#    if (GMX_GPU == GMX_GPU_CUDA) // avoid invalid cast for OpenCL
-                    d_x = reinterpret_cast<rvec*>(pme_gpu_get_device_x(pme));
-                    d_f = reinterpret_cast<rvec*>(pme_gpu_get_device_f(pme));
-#    endif
-                    pme_pp->pmeCoordinateReceiverGpu->sendCoordinateBufferAddressToPpRanks(d_x);
-                    pme_pp->pmeForceSenderGpu->sendForceBufferAddressToPpRanks(d_f);
+                    pme_pp->pmeCoordinateReceiverGpu->sendCoordinateBufferAddressToPpRanks(
+                            pme_gpu_get_device_x(pme));
+                    pme_pp->pmeForceSenderGpu->sendForceBufferAddressToPpRanks(
+                            reinterpret_cast<rvec*>(pme_gpu_get_device_f(pme)));
                 }
             }
 
index 685b62d672b7e6bdab3212cad03574d274fc6325..e5869b594ce151b66b8e8faa009b1e9016b48003 100644 (file)
@@ -136,9 +136,10 @@ gmx_add_gtest_executable(
     )
 target_link_libraries(${exename} PRIVATE mdrun_test_infrastructure)
 
-# These tests are extremely slow without optimization, so only run them for
-# build types like Release or RelWithDebInfo
-if (CMAKE_BUILD_TYPE MATCHES "Rel")
+# These tests are extremely slow without optimization or OpenMP, so only run them for
+# build types like Release or RelWithDebInfo and if the build has been configured
+# with OpenMP enabled.
+if (CMAKE_BUILD_TYPE MATCHES "Rel" AND GMX_OPENMP)
     set(testname "MdrunMpiCoordinationTestsOneRank")
     gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 1 SLOW_TEST)
     set(testname "MdrunMpiCoordinationTestsTwoRanks")