Giter Site home page Giter Site logo

fml-fam / fmlr Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 0.0 660 KB

R bindings for the Fused Matrix Library (fml)

License: Boost Software License 1.0

R 37.33% Shell 0.18% M4 1.65% C++ 33.65% Cuda 14.76% C 10.94% Dockerfile 0.65% Singularity 0.84%
r linear-algebra matrix blas cuda mpi scalapack hpc

fmlr's People

Contributors

wrathematics avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fmlr's Issues

Installation issue: undefined symbol: PB_Ctzsymv

I tried to install the stable CPU version, but ran into the following error on Ubuntu 18.04LTS:

> install.packages("fmlr", repos=c("https://hpcran.org", "https://cran.rstudio.com"))
Installing package into/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6’
(aslibis unspecified)
trying URL 'https://hpcran.org/src/contrib/fmlr_0.1-0.tar.gz'
Content type 'application/x-gzip' length 131299 bytes (128 KB)
==================================================
downloaded 128 KB

* installing *source* packagefmlr...
** using staged installation
configure: not using GPU
 
******************* Results of fmlr package configure *******************
 
* R Report:
    >> R_CPPFLAGS=-I/usr/share/R/include
    >> FLOAT_LIBS=-L/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/float/libs -l:float.so -Wl,-rpath=/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/float/libs
    >> FLOAT_INCL=-I/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/float/include
* GPU Report:
    >> not used
* MPI report:
    >> SPMD_CPPFLAGS = -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI
    >> SPMD_LDFLAGS = -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi  -lutil -lpthread
    >> SLAP_LDFLAGS = /home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/pbdSLAP/lib/libslap.a $(LAPACK_LIBS) $(BLAS_LIBS)
*************************************************************************
 
configure: creating ./config.status
config.status: creating src/Makevars
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/02-features.r
** libs
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -I"/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/float/include"   -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c fmlr-native.c -o fmlr-native.o
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -I"/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/float/include"  -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -fopenmp -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c cpumat.cpp -o cpumat.o
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -I"/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/float/include"  -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -fopenmp -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c cpuvec.cpp -o cpuvec.o
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -I"/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/float/include"  -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -fopenmp -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c helpers-cpu.cpp -o helpers-cpu.o
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -I"/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/float/include"  -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -fopenmp -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c linalg-cpu.cpp -o linalg-cpu.o
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -I"/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/float/include"  -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -fopenmp -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c grid.cpp -o grid.o
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -I"/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/float/include"  -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -fopenmp -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c helpers-mpi.cpp -o helpers-mpi.o
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -I"/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/float/include"  -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -fopenmp -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c linalg-mpi.cpp -o linalg-mpi.o
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -I"/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/float/include"  -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -fopenmp -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c mpimat.cpp -o mpimat.o
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -I"/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/float/include"  -I/usr/lib/x86_64-linux-gnu/openmpi/include  -DMPI2 -DOPENMPI -fopenmp -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c gpu-dummy-bindings.cpp -o gpu-dummy-bindings.o
g++ -std=gnu++14 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o fmlr.so fmlr-native.o cpumat.o cpuvec.o helpers-cpu.o linalg-cpu.o grid.o helpers-mpi.o linalg-mpi.o mpimat.o gpu-dummy-bindings.o /home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/pbdSLAP/lib/libslap.a -llapack -lblas -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi -lutil -lpthread -llapack -lblas -lgfortran -lm -lquadmath -fopenmp -L/usr/lib/R/lib -lR
installing to /home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-fmlr/00new/fmlr/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Note: possible error in 'as_gpuvec(v, copy = FALSE)': unused argument (copy = FALSE) 
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed forfmlrin dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-fmlr/00new/fmlr/libs/fmlr.so':
  /home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-fmlr/00new/fmlr/libs/fmlr.so: undefined symbol: PB_Ctzsymv
Error: loading failed
Execution halted
ERROR: loading failed
* removing/home/rzwitch/R/x86_64-pc-linux-gnu-library/3.6/fmlrWarning in install.packages :
  installation of packagefmlrhad non-zero exit status

The downloaded source packages are in/tmp/RtmpbzXFnd/downloaded_packages

GPU on Windows

I do not have the ability to test this, but I think the package can now be built with GPU backend support on Windows. I would appreciate any input/feedback on this.

If you are willing to test, you can download the development version of the package with git (there are submodules so install_github()-like things won't work):

git clone --recurse-submodules https://github.com/fml-fam/fmlr.git

Modify the first 2 lines of src/Makevars.win. The first should be set to USE_GPU = "TRUE". The second should be set to whatever your CUDA path is. The contents should be include, lib, etc. Actually, just giving me an ls of that path would be very helpful.

Install the package dependencies as needed:

install.packages("R6")
install.packages("float")

Next, try to install the package:

R CMD INSTALL fmlr/

Here's a basic test you can run to see if it works:

suppressMessages(library(fmlr))
c = card()
c

x = gpumat(c, 3, 2)
x$fill_linspace(1, 6)
x$info()
x

Here's an example of the output I see on my Linux box:

## GPU 0 (GeForce GTX 1070 Ti) 821/8116 MB - CUDA 10.1

# gpumat 3x2 type=d 
1.0000 4.0000 
2.0000 5.0000 
3.0000 6.0000 

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.