Skip to content
Snippets Groups Projects
Commit 0c2ee141 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

COB-60: removed USE_OPENCL and USE_CUDA definitions. Default and only gpu...

COB-60: removed USE_OPENCL and USE_CUDA definitions. Default and only gpu implementation for cobalt is now cuda only
parent 57b3f243
No related branches found
No related tags found
1 merge request!6Import cobalt2 into lofar4
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
option(USE_LOG4CPLUS "Use Log4Cplus" ON) option(USE_LOG4CPLUS "Use Log4Cplus" ON)
option(USE_MPI "Use MPI" ON) option(USE_MPI "Use MPI" ON)
option(USE_CUDA "Use CUDA" ON)
#set(CASACORE_ROOT_DIR /opt/casacore) #set(CASACORE_ROOT_DIR /opt/casacore)
set(CASACORE_ROOT_DIR /localhome/lofar/casacore-1.7.0) set(CASACORE_ROOT_DIR /localhome/lofar/casacore-1.7.0)
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# $Id$ # $Id$
option(USE_MPI "Use MPI" ON) option(USE_MPI "Use MPI" ON)
option(USE_CUDA "Use CUDA" ON)
#option(USE_OPENCL "Use OpenCL" OFF)
#set(GNU_COMPILE_DEFINITIONS -DCL_USE_DEPRECATED_OPENCL_1_1_APIS) #set(GNU_COMPILE_DEFINITIONS -DCL_USE_DEPRECATED_OPENCL_1_1_APIS)
#set(CLANG_COMPILE_DEFINITIONS -DCL_USE_DEPRECATED_OPENCL_1_1_APIS) #set(CLANG_COMPILE_DEFINITIONS -DCL_USE_DEPRECATED_OPENCL_1_1_APIS)
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# $Id$ # $Id$
option(USE_MPI "Use MPI" ON) option(USE_MPI "Use MPI" ON)
option(USE_CUDA "Use CUDA" ON)
# Default search path for LOFAR deps (see CMake/variants/variants): /opt/lofar/external:/usr/local # Default search path for LOFAR deps (see CMake/variants/variants): /opt/lofar/external:/usr/local
# The dirs thereunder must be lower case, e.g. unittest++/ or dal/ # The dirs thereunder must be lower case, e.g. unittest++/ or dal/
......
option(USE_CUDA "Use CUDA" ON)
option(USE_MPI "Use MPI" ON) option(USE_MPI "Use MPI" ON)
option(USE_OPENMP "Use OPENMP" ON) option(USE_OPENMP "Use OPENMP" ON)
option(USE_OPENCL "Don't use OPENCL" OFF)
set(WINCC_ROOT_DIR /opt/WinCC_OA/3.14) set(WINCC_ROOT_DIR /opt/WinCC_OA/3.14)
......
...@@ -2,6 +2,4 @@ ...@@ -2,6 +2,4 @@
lofar_package(CobaltTest 1.0 DEPENDS GPUProc OutputProc) lofar_package(CobaltTest 1.0 DEPENDS GPUProc OutputProc)
add_definitions(-DUSE_CUDA)
add_subdirectory(test) add_subdirectory(test)
...@@ -15,7 +15,6 @@ set(CUDA_PROPAGATE_HOST_FLAGS OFF) ...@@ -15,7 +15,6 @@ set(CUDA_PROPAGATE_HOST_FLAGS OFF)
lofar_find_package(CUDA 4.1 REQUIRED) lofar_find_package(CUDA 4.1 REQUIRED)
lofar_find_package(CUDADriver REQUIRED) lofar_find_package(CUDADriver REQUIRED)
add_definitions(-DUSE_CUDA)
if(LOFAR_BUILD_VARIANT MATCHES "^DEBUG$") if(LOFAR_BUILD_VARIANT MATCHES "^DEBUG$")
list(APPEND CUDA_NVCC_FLAGS -g -G) list(APPEND CUDA_NVCC_FLAGS -g -G)
endif() endif()
......
...@@ -18,8 +18,7 @@ To build and install Cobalt: ...@@ -18,8 +18,7 @@ To build and install Cobalt:
# configure Cobalt # configure Cobalt
mkdir -p $ROOT/build/gnu_opt mkdir -p $ROOT/build/gnu_opt
cd $ROOT/build/gnu_opt cd $ROOT/build/gnu_opt
cmake $ROOT/LOFAR -DBUILD_PACKAGES=Cobalt \ cmake $ROOT/LOFAR -DBUILD_PACKAGES=Cobalt -DUSE_OPENMP=ON -DUSE_MPI=ON
-DUSE_CUDA=ON -DUSE_OPENMP=ON -DUSE_MPI=ON
# build and install into $ROOT/build/gnu_opt/installed/ # build and install into $ROOT/build/gnu_opt/installed/
# Note: you can choose another install directory by setting the *CMake* # Note: you can choose another install directory by setting the *CMake*
......
//# Filter_FFT_Kernel.h
//#
//# Copyright (C) 2013 ASTRON (Netherlands Institute for Radio Astronomy)
//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands
//#
//# This file is part of the LOFAR software suite.
//# The LOFAR software suite is free software: you can redistribute it and/or
//# modify it under the terms of the GNU General Public License as published
//# by the Free Software Foundation, either version 3 of the License, or
//# (at your option) any later version.
//#
//# The LOFAR software suite is distributed in the hope that it will be useful,
//# but WITHOUT ANY WARRANTY; without even the implied warranty of
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//# GNU General Public License for more details.
//#
//# You should have received a copy of the GNU General Public License along
//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>.
//#
//# $Id$
// \file
// Include the right GPU API include with our options.
#ifndef LOFAR_GPUPROC_FILTER_FFT_KERNEL_H
#define LOFAR_GPUPROC_FILTER_FFT_KERNEL_H
#if defined (USE_CUDA) && defined (USE_OPENCL)
# error "Either CUDA or OpenCL must be enabled, not both"
#endif
#if defined (USE_CUDA)
# include <GPUProc/cuda/Kernels/Filter_FFT_Kernel.h>
#elif defined (USE_OPENCL)
# include <GPUProc/opencl/Kernels/Filter_FFT_Kernel.h>
#else
# error "Either CUDA or OpenCL must be enabled, not neither"
#endif
#endif
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#include <lofar_config.h> #include <lofar_config.h>
#ifdef USE_CUDA
#include <cstdio> // for remove() #include <cstdio> // for remove()
#include <cstdlib> // for getenv() #include <cstdlib> // for getenv()
#include <cassert> #include <cassert>
...@@ -37,13 +35,7 @@ ...@@ -37,13 +35,7 @@
using namespace std; using namespace std;
using namespace LOFAR::Cobalt; using namespace LOFAR::Cobalt;
#ifdef USE_CUDA
const char* srcFile("t_gpu_utils.cu"); const char* srcFile("t_gpu_utils.cu");
#elif USE_OPENCL
const char* srcFile("t_gpu_utils.cl");
#else
#error "Either USE_CUDA or USE_OPENCL must be defined"
#endif
struct CreateFixture struct CreateFixture
{ {
...@@ -57,11 +49,8 @@ struct CreateFixture ...@@ -57,11 +49,8 @@ struct CreateFixture
ofs << "#if defined FOO && FOO != 42\n" ofs << "#if defined FOO && FOO != 42\n"
<< "#error FOO != 42\n" << "#error FOO != 42\n"
<< "#endif\n" << "#endif\n"
#ifdef USE_CUDA
<< "__global__ void dummy(void) {}\n" << "__global__ void dummy(void) {}\n"
#elif USE_OPENCL
<< "__kernel void dummy(__global void) {}\n" << "__kernel void dummy(__global void) {}\n"
#endif
<< endl; << endl;
} }
~CreateFixture() { ~CreateFixture() {
...@@ -179,16 +168,3 @@ int main() ...@@ -179,16 +168,3 @@ int main()
return 0; return 0;
} }
} }
#else
#include <iostream>
int main()
{
std::cout << "The GPU wrapper classes are not yet available for OpenCL.\n"
<< "Test skipped." << std::endl;
return 0;
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment