Skip to content

Commit ea1a165

Browse files
committed
Clarify intent.
1 parent 2d78610 commit ea1a165

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed

R/openmp.R

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@
2626
#' @section Check if `OpenMP` is installed:
2727
#'
2828
#' Checks the local file system for whether OpenMP runtime library is installed
29-
#' in the default installation location.
29+
#' in the default installation location. Specifically, it checks for the
30+
#' `libomp.dylib` library file and the `omp.h` header file, e.g:
31+
#'
32+
#' ```sh
33+
#' # Check if OpenMP library exists
34+
#' [ -f /usr/local/lib/libomp.dylib ] && echo "Library found" || echo "Library not found"
35+
#' # Check if OpenMP header files exist
36+
#' [ -f /usr/local/include/omp.h ] && echo "Headers found" || echo "Headers not found"
37+
#' ```
3038
#'
3139
#' @rdname openmp
3240
#' @export
@@ -433,19 +441,11 @@ install_openmp_from_url <- function(url, password = NULL, verbose = TRUE) {
433441
}
434442

435443
#' @section Testing OpenMP Installation:
436-
#' After installing OpenMP, you can test if it's working by creating a simple
437-
#' test package or by adding the following to your `~/.R/Makevars` file:
438-
#'
439-
#' ```sh
440-
#' CPPFLAGS += -Xclang -fopenmp
441-
#' LDFLAGS += -lomp
442-
#' ```
444+
#' After installing OpenMP, you can test if it's working by checking the
445+
#' `~/.R/Makevars` file for the correct flags and verifying the library signature.
443446
#'
444-
#' Then try installing a package that uses OpenMP, such as:
445-
#'
446-
#' ```r
447-
#' install.packages("data.table", type = "source")
448-
#' ```
447+
#' **Note:** This function does not attempt to compile any code, it only checks
448+
#' the configuration and library signature.
449449
#'
450450
#' @export
451451
#' @rdname openmp

man/openmp.Rd

Lines changed: 12 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)