diff --git a/DESCRIPTION b/DESCRIPTION new file mode 100644 index 0000000..bb70e82 --- /dev/null +++ b/DESCRIPTION @@ -0,0 +1,9 @@ +Package: RElem +Type: Package +Title: Wrappers to use Elemental library www.elemental.org +Version: 0.01.85 +Date: 2014-10-22 +Author: Rodrigo Canales +Maintainer: Rodrigo Canales +Description: Wrappers to use Elemental library +License: MIT diff --git a/NAMESPACE b/NAMESPACE new file mode 100644 index 0000000..29abfa8 --- /dev/null +++ b/NAMESPACE @@ -0,0 +1,2 @@ +exportPattern("^[[:alpha:]]+") +useDynLib(RElem) diff --git a/R/RElem.R b/R/RElem.R index 66c83ce..df88f22 100644 --- a/R/RElem.R +++ b/R/RElem.R @@ -1,13 +1,3 @@ -libraryName ="RElemental.so" - -#----------------- -#Load the library -#----------------- - -if ( is.loaded(libraryName) ) - dyn.unload(libraryName) -dyn.load(libraryName) - #------------------ # Class Definitions #------------------ diff --git a/src/Makevars b/src/Makevars index 44f7c77..5b4cd01 100644 --- a/src/Makevars +++ b/src/Makevars @@ -1,23 +1,13 @@ -include /usr/local/conf/ElVars - -SRCS = $(wildcard *.c) -OBJS = $(patsubst %.c,%.o,$(SRCS)) - -CC_FLAGS = -std=c99 -O3 -fPIC -Wall - -R_INC = -I/usr/share/R/include +ELEM_LIB_PATH = /usr/local/lib +ELEM_INC_PATH = /usr/local/include +MPI_COMPILE = $(shell mpicc -show:compile) +include /usr/local/conf/ElVars +CC_FLAGS = -std=c99 -O3 EL_PATH=-L$(EL_LIB) -L$(EL_LIB)/external/pmrrr LINK_FLAGS = -Wl,-rpath,$(EL_LIB):$(EL_LIB)/external/pmrrr -all: RElemental.so - -%.o: %.c - $(CC) $(CC_FLAGS) -I/$(EL_INC) $(R_INC) $(MPI_CXX_INCSTRING) -o $@ -c $< - -RElemental.so: $(OBJS) - $(CC) $(CC_FLAGS) -shared -Wl,-soname,$@ -o $@ $(OBJS) $(EL_PATH) $(EL_LIBS) $(LINK_FLAGS) -clean: - rm -f *.o *.so +PKG_CFLAGS = $(CC_FLAGS) -I/$(EL_INC) $(R_INC) $(MPI_CXX_INCSTRING) +PKG_LIBS = $(EL_PATH) $(EL_LIBS)