Skip to content

Commit

Permalink
make/cmake: remove openmp option: OpenMP is required
Browse files Browse the repository at this point in the history
  • Loading branch information
mgates3 committed Jun 29, 2024
1 parent 7f8b7dc commit e594ea9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 134 deletions.
24 changes: 6 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ endif()
option( BUILD_SHARED_LIBS "Build shared libraries" true )
option( build_tests "Build test suite" "${slate_is_project}" )
option( color "Use ANSI color output" true )
option( use_openmp "Use OpenMP, if available" true )
option( c_api "Build C API" false )
# todo: option( fortran_api "Build Fortran API. Requires C API." false )

Expand Down Expand Up @@ -121,7 +120,6 @@ BUILD_SHARED_LIBS = ${BUILD_SHARED_LIBS}
build_tests = ${build_tests}
color = ${color}
gpu_backend = ${gpu_backend}
use_openmp = ${use_openmp}
c_api = ${c_api}
fortran_api = ${fortran_api}
slate_is_project = ${slate_is_project}
Expand Down Expand Up @@ -300,23 +298,13 @@ endif()
# OpenMP support.
# Needed before BLAS++.
message( "" )
message( "---------------------------------------- OpenMP: use_openmp = ${use_openmp}" )
set( slate_use_openmp false ) # output in slateConfig.cmake.in
if (NOT use_openmp)
message( STATUS "User has requested to NOT use OpenMP" )
message( "---------------------------------------- OpenMP" )
find_package( OpenMP )
if (OpenMP_CXX_FOUND)
target_link_libraries( slate PUBLIC "OpenMP::OpenMP_CXX" )
set( slate_use_openmp true ) # historical; output in slateConfig.cmake.in
else()
find_package( OpenMP )
if (OpenMP_CXX_FOUND)
target_link_libraries( slate PUBLIC "OpenMP::OpenMP_CXX" )
set( slate_use_openmp true )
else()
message( STATUS "No OpenMP support in SLATE" )
target_sources(
slate
PRIVATE
src/stubs/openmp_stubs.cc
)
endif()
message( FATAL_ERROR "OpenMP is required" )
endif()

#-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ ifeq (${openmp},1)
LDFLAGS += -fopenmp
endif
else
slate_src += src/stubs/openmp_stubs.cc
${error ERROR: unsupported `openmp=${openmp}`. OpenMP is required.}
endif

#-------------------------------------------------------------------------------
Expand Down
12 changes: 2 additions & 10 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ which includes BLAS++ and LAPACK++.

Configure and compile the SLATE library and its tester,
then install the headers and library. This will also compile
BLAS++, LAPACK++, and TestSweeper.
BLAS++, LAPACK++, and TestSweeper. SLATE requires MPI and an
OpenMP C++17 compiler.

**Option 1: Makefile**

Expand Down Expand Up @@ -243,10 +244,6 @@ options include:
or other valid HIP architecture, separated by space.
See https://llvm.org/docs/AMDGPUUsage.html

openmp
SLATE will compile with OpenMP by default. To compile without
OpenMP, set `openmp = 0`.

c_api
Whether to build C API. Python is required. One of:
1 build C API
Expand Down Expand Up @@ -320,11 +317,6 @@ options include:
For example, `-DCMAKE_CUDA_ARCHITECTURES=70` should be added for
the Volta architecture.

use_openmp
Whether to use OpenMP, if available. One of:
yes (default)
no

build_tests
Whether to build test suite (test/tester).
Requires ScaLAPACK unless SCALAPACK_LIBRARIES=none. One of:
Expand Down
3 changes: 0 additions & 3 deletions include/slate/internal/openmp.hh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
// This program is free software: you can redistribute it and/or modify it under
// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.

//------------------------------------------------------------------------------
/// @file
///
#ifndef SLATE_OPENMP_HH
#define SLATE_OPENMP_HH

Expand Down
102 changes: 0 additions & 102 deletions src/stubs/openmp_stubs.cc

This file was deleted.

0 comments on commit e594ea9

Please sign in to comment.