Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 958c67f8 authored by Ghislain Durif's avatar Ghislain Durif
Browse files

support installation without OpenMP

parent 492e74db
No related branches found
No related tags found
No related merge requests found
Showing with 47 additions and 21 deletions
......@@ -55,13 +55,18 @@ Analysis. arXiv:1710.11028 [stat].
### Installation
You can install the `pCMF` R package with the following R command:
```R
devtools::install_git("https://gitlab.inria.fr/gdurif/pCMF", subdir="pkg", branch="prod")
```
If you don't have OpenMP installed on your machine (for instance on MacOS), you can run the following command:
```R
devtools::install_git("https://gitlab.inria.fr/gdurif/pCMF", subdir="pkg")
devtools::install_git("https://gitlab.inria.fr/gdurif/pCMF", subdir="pkg", branch="prod_no_omp")
```
**Note:** We encourage you to install a compiler (e.g. gcc) that supports OpenMP in order
to benefit from multi-core computing and improve computation performance.
To install the `devtools` package, you can run:
```R
install.packages("devtools")
```
......@@ -70,8 +75,19 @@ You can also use the git repository available at <https://gitlab.inria.fr/gdurif
then build and install the package with Rstudio (the [project file](./pCMF.Rproj)
is set accordingly) or with the R command line tools.
Once you cloned the git repository, you can also run:
To clone the repository, you can do:
```bash
git clone https://gitlab.inria.fr/gdurif/pCMF.git
```
**Note:** if you don't have OpenMP on your system (c.f. previously), after cloning
the repository, you should do:
```bash
cd pCMF
git fetch origin prod_no_omp
git checkout prod_no_omp
```
Once you cloned the git repository, you can run to install the `pCMF` package:
```R
devtools::install("/path/to/pCMF/pkg") # you should edit the path
```
......
......@@ -2,7 +2,7 @@ Package: pCMF
Type: Package
Title: Probabilistic Factorization of Count Matrices
Version: 1.0
Date: 2018-07-04
Date: 2018-10-25
Author: Ghislain Durif
Maintainer: Ghislain Durif <gd.dev@libertymail.net>
Description: Routines for probabilistic count matrices factorization (pCMF).
......
......@@ -23,8 +23,11 @@
* \date 07/02/2018
*/
#if defined(_OPENMP)
#include <omp.h>
// [[Rcpp::plugins(openmp)]]
#endif
#include <Rcpp.h>
#include <RcppEigen.h>
......
......@@ -23,14 +23,11 @@
* \date 03/04/2018
*/
#include <omp.h>
// [[Rcpp::plugins(openmp)]]
#include <Rcpp.h>
#include <RcppEigen.h>
#include "algorithm_variational_EM.h"
#include "gap_factor_model.h"
#include "utils/random.h"
#include "wrapper_gap_factor.h"
// [[Rcpp::depends(RcppEigen)]]
......
......@@ -23,15 +23,11 @@
* \date 26/02/2018
*/
#include <omp.h>
// [[Rcpp::plugins(openmp)]]
#include <Rcpp.h>
#include <RcppEigen.h>
#include <stdio.h>
#include "algorithm_simple_factor.h"
#include "poisson_nmf.h"
#include "utils/random.h"
#include "wrapper_matrix_factor.h"
// [[Rcpp::depends(RcppEigen)]]
......
......@@ -23,14 +23,11 @@
* \date 10/04/2018
*/
#include <omp.h>
// [[Rcpp::plugins(openmp)]]
#include <Rcpp.h>
#include <RcppEigen.h>
#include "algorithm_variational_EM.h"
#include "sparse_gap_factor_model.h"
#include "utils/random.h"
#include "wrapper_sparse_gap_factor.h"
// [[Rcpp::depends(RcppEigen)]]
......
......@@ -23,15 +23,11 @@
* \date 10/04/2018
*/
#include <omp.h>
// [[Rcpp::plugins(openmp)]]
#include <Rcpp.h>
#include <RcppEigen.h>
#include <stdio.h>
#include "algorithm_variational_EM.h"
#include "zi_gap_factor_model.h"
#include "utils/random.h"
#include "wrapper_gap_factor.h"
// [[Rcpp::depends(RcppEigen)]]
......
......@@ -23,14 +23,11 @@
* \date 10/04/2018
*/
#include <omp.h>
// [[Rcpp::plugins(openmp)]]
#include <Rcpp.h>
#include <RcppEigen.h>
#include "algorithm_variational_EM.h"
#include "zi_sparse_gap_factor_model.h"
#include "utils/random.h"
#include "wrapper_sparse_gap_factor.h"
// [[Rcpp::depends(RcppEigen)]]
......
......@@ -23,8 +23,11 @@
* \date 10/04/2018
*/
#if defined(_OPENMP)
#include <omp.h>
// [[Rcpp::plugins(openmp)]]
#endif
#include <Rcpp.h>
#include <RcppEigen.h>
......
......@@ -18,8 +18,11 @@
#ifdef _DEV
#if defined(_OPENMP)
#include <omp.h>
// [[Rcpp::plugins(openmp)]]
#endif
#include <Rcpp.h>
#include <RcppEigen.h>
#include <stdio.h>
......
......@@ -18,8 +18,11 @@
#ifdef _DEV
#if defined(_OPENMP)
#include <omp.h>
// [[Rcpp::plugins(openmp)]]
#endif
#include <Rcpp.h>
#include <RcppEigen.h>
#include <stdio.h>
......
......@@ -27,8 +27,11 @@
#ifndef GAP_FACTOR_WRAPPER_H
#define GAP_FACTOR_WRAPPER_H
#if defined(_OPENMP)
#include <omp.h>
// [[Rcpp::plugins(openmp)]]
#endif
#include <Rcpp.h>
#include <RcppEigen.h>
#include <stdio.h>
......
......@@ -27,8 +27,11 @@
#ifndef MATRIX_FACTOR_WRAPPER_H
#define MATRIX_FACTOR_WRAPPER_H
#if defined(_OPENMP)
#include <omp.h>
// [[Rcpp::plugins(openmp)]]
#endif
#include <Rcpp.h>
#include <RcppEigen.h>
#include <stdio.h>
......
......@@ -27,8 +27,11 @@
#ifndef SPARSE_GAP_FACTOR_WRAPPER_H
#define SPARSE_GAP_FACTOR_WRAPPER_H
#if defined(_OPENMP)
#include <omp.h>
// [[Rcpp::plugins(openmp)]]
#endif
#include <Rcpp.h>
#include <RcppEigen.h>
#include <stdio.h>
......
......@@ -23,8 +23,11 @@
* \date 10/04/2018
*/
#if defined(_OPENMP)
#include <omp.h>
// [[Rcpp::plugins(openmp)]]
#endif
#include <Rcpp.h>
#include <RcppEigen.h>
......
......@@ -23,8 +23,11 @@
* \date 10/04/2018
*/
#if defined(_OPENMP)
#include <omp.h>
// [[Rcpp::plugins(openmp)]]
#endif
#include <Rcpp.h>
#include <RcppEigen.h>
......
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