Giter Site home page Giter Site logo

nightwing1914 / tgp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cran/tgp

0.0 0.0 0.0 30.74 MB

:exclamation: This is a read-only mirror of the CRAN R package repository. tgp — Bayesian Treed Gaussian Process Models. Homepage: https://bobby.gramacy.com/r_packages/tgp/

R 16.28% C 30.15% C++ 53.57%

tgp's Introduction

This is the R-package: tgp.  

It has been tested on Linux, FreeBSD, OSX, and Windows.  

This README is a sub.  Please see the R-package documentation or 
vignette for more information.  It should be possible to install 
this source package via "R CMD INSTALL tgp", where "tgp" is this 
directory, from "../".

Below are some comments on compiling with support for pthreads,
and linking with ATLAS, or other linear algebra library (different
than the one already used by R).


SUPPORT FOR PTHREADS
--------------------

1.) Add "-DPARALLEL" to PKG_CXXFLAGS of src/Makevars

2.) You may need to add "-pthread" to PKG_LIBS of src/Makevars, 
or whatever is needed by your compiler in order to correctly link
code with pthreads functions.


SUPPORT FOR ATLAS
-----------------

ATLAS is supported as an alternative to standard BLAS and LAPACK for
fast, automatically tuned, linear algebra routines.  There are three
easy steps to enable ATLAS support (assuming, of course, you have
already installed it -- http://math-atlas.sourceforge.net) which need
to be done before you install the package from source:

Note that this is not the recommended method for getting fast linear
algebra routines for tgp.  The best way to do this is to compile R
with ATLAS (or other libraries) support.  See the R installation 
manual: http://cran.r-project.org/doc/manuals/R-admin.html under
A.2.2

-- Begin ATLAS Instructions

1.: Edit src/Makevars.  Comment out the existing PKG_LIBS line, and
replace it with:
	
PKG_LIBS = -L/path/to/ATLAS/lib -llapack -lcblas -latlas

you may need replace "-llapack -lcblas -latlas" with whatever ATLAS
recommends for your OS.  (see ATLAS README.) For example, if your
ATLAS compilation included F77 support, you would might need to add
"-lF77blas", of if you compiled with pthreads, you would might use
"-llapack -lptcblas -lptf77blas -latlas".

2.: Continue editing src/Makevars.  Add:

PKG_CFLAGS = -I/path/to/ATLAS/include

3.: Edit src/linalg.h and commend out lines 40 & 41:

/*#define FORTPACK
#define FORTBLAS*/

--- End ATLAS Instructions --

Reverse the above instructions to disable ATLAS. Don't forget to
re-install.

tgp's People

Contributors

rbgramacy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.