Commit b51bd786 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Removed MIC support

parent cbd05a45
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ stages:
    WITH_OPENMP: "no"
    WITH_CUDA: "no"
    WITH_CUDA_ARCH: "auto"
    WITH_MIC: "no"
    WITH_MPI: "no"
    # configurations
    WITH_TESTS: "no"
@@ -52,7 +51,6 @@ stages:
                -DWITH_MPI=${WITH_MPI}
                -DWITH_CUDA=${WITH_CUDA}
                -DWITH_CUDA_ARCH=${WITH_CUDA_ARCH}
                -DWITH_MIC=${WITH_MIC}
                -DWITH_TESTS=${WITH_TESTS}
                -DWITH_DOC=${WITH_DOC}
                -DWITH_COVERAGE=${WITH_COVERAGE}
+0 −18
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ set( tnlVersion "0.1" )

# declare all custom build options
option(OFFLINE_BUILD "Offline build (i.e. without downloading libraries such as pybind11)" OFF)
option(WITH_MIC "Build with MIC support" OFF)
option(WITH_CUDA "Build with CUDA support" ON)
set(WITH_CUDA_ARCH "auto" CACHE STRING "Build for these CUDA architectures")
option(WITH_OPENMP "Build with OpenMP support" ON)
@@ -113,22 +112,6 @@ if( NOT DEFINED ENV{CI_JOB_NAME} )
   endif()
endif()

if( CMAKE_CXX_COMPILER_ID STREQUAL "Intel" )
   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_ICPC -wd2568 -wd2571 -wd2570")
   #####
   #  Check for MIC
   #
   if( ${WITH_MIC} )
      message( "Enabled MIC support." )
      set( MIC_CXX_FLAGS "-DHAVE_MIC")
      # build all tests with MIC support
      set( CXX_TESTS_FLAGS ${CXX_TESTS_FLAGS} -DHAVE_MIC )
      set( WITH_CUDA OFF CACHE BOOL "Build with CUDA support" )
   else()
      set( MIC_CXX_FLAGS "")
   endif()
endif()

# force colorized output in continuous integration
if( DEFINED ENV{CI_JOB_NAME} OR ${CMAKE_GENERATOR} STREQUAL "Ninja" )
   message(STATUS "Continuous integration or Ninja detected -- forcing compilers to produce colorized output.")
@@ -395,7 +378,6 @@ INCLUDE( CPack )
# Print custom build options
message( "-- Build options:" )
message( "   OFFLINE_BUILD = ${OFFLINE_BUILD}" )
message( "   WITH_MIC = ${WITH_MIC}" )
message( "   WITH_CUDA = ${WITH_CUDA}" )
message( "   WITH_CUDA_ARCH = ${WITH_CUDA_ARCH}" )
message( "   WITH_OPENMP = ${WITH_OPENMP}" )
+0 −3
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ do
        --offline-build                  ) OFFLINE_BUILD="yes" ;;
        --with-clang=*                   ) WITH_CLANG="${option#*=}" ;;
        --with-mpi=*                     ) WITH_MPI="${option#*=}" ;;
        --with-mic=*                     ) WITH_MIC="${option#*=}" ;;
        --with-cuda=*                    ) WITH_CUDA="${option#*=}" ;;
        --with-cuda-arch=*               ) WITH_CUDA_ARCH="${option#*=}";;
        --with-openmp=*                  ) WITH_OPENMP="${option#*=}" ;;
@@ -76,7 +75,6 @@ if [[ ${HELP} == "yes" ]]; then
    echo "   --install=yes/no                      Enables the installation of TNL files."
    echo "   --offline-build=yes/no                Disables online updates during the build. 'no' by default."
    echo "   --with-mpi=yes/no                     Enables MPI. 'yes' by default (OpenMPI required)."
    echo "   --with-mic=yes/no                     Enables MIC (Intel Xeon Phi). 'no' by default (Intel Compiler required)."
    echo "   --with-cuda=yes/no                    Enables CUDA. 'yes' by default (CUDA Toolkit is required)."
    echo "   --with-cuda-arch=all/auto/30/35/...   Chooses CUDA architecture. 'auto' by default."
    echo "   --with-openmp=yes/no                  Enables OpenMP. 'yes' by default."
@@ -123,7 +121,6 @@ cmake_command=(
         -DCMAKE_BUILD_TYPE=${BUILD}
         -DCMAKE_INSTALL_PREFIX=${PREFIX}
         -DOFFLINE_BUILD=${OFFLINE_BUILD}
         -DWITH_MIC=${WITH_MIC}
         -DWITH_CUDA=${WITH_CUDA}
         -DWITH_CUDA_ARCH=${WITH_CUDA_ARCH}
         -DWITH_OPENMP=${WITH_OPENMP}
+0 −2
Original line number Diff line number Diff line
@@ -8,8 +8,6 @@

/* See Copyright Notice in tnl/Copyright */

#include <TNL/Devices/MIC.h>

#pragma once

#include "GridTraverser.h"
+0 −22
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@

#pragma once

#include <TNL/Devices/MIC.h>
#include <TNL/Communicators/MpiCommunicator.h>
#include <TNL/Communicators/NoDistrCommunicator.h>
#include "ComputeBlockResidue.h"
@@ -210,27 +209,6 @@ void Euler< Problem, SolverMonitor >::computeNewTimeLevel( DofVectorPointer& u,
#endif
   }

   //MIC
   if( std::is_same< DeviceType, Devices::MIC >::value )
   {

#ifdef HAVE_MIC
      Devices::MICHider<RealType> mu;
      mu.pointer=_u;
      Devices::MICHider<RealType> mk1;
      mk1.pointer=_k1;
    #pragma offload target(mic) in(mu,mk1,size) inout(localResidue)
    {
      #pragma omp parallel for reduction(+:localResidue) firstprivate( mu, mk1 )  
      for( IndexType i = 0; i < size; i ++ )
      {
         const RealType add = tau * mk1.pointer[ i ];
         mu.pointer[ i ] += add;
         localResidue += std::fabs( add );
      }
    }
#endif
   }
   localResidue /= tau * ( RealType ) size;
   Problem::CommunicatorType::Allreduce( &localResidue, &currentResidue, 1, MPI_SUM, Problem::CommunicatorType::AllGroup );
   //std::cerr << "Local residue = " << localResidue << " - globalResidue = " << currentResidue << std::endl;
Loading