1.I have a library fpmpi . I made the shared library fpmpi.so from this library.I am using ubuntu .
2.Now, I want to use in my R package .My R package has src folder the there is makevars.in file ### Setup R source code and objects. PKG_CPPFLAGS = @PKG_CPPFLAGS@ PKG_LIBS = -L/home/g/Desktop/Project -fpmpip ### For user configuration. USER_CONF = Makeconf ### Start making here. all: $(SHLIB)@echo "MPIRUN = @MPIRUN@" > $(USER_CONF)@echo "MPIEXEC = @MPIEXEC@" >> $(USER_CONF)@echo "ORTERUN = @ORTERUN@" >> $(USER_CONF)@echo "TMP_INC = @TMP_INC@" >> $(USER_CONF)@echo "TMP_LIB = @TMP_LIB@" >> $(USER_CONF)@echo "MPI_ROOT = @MPI_ROOT@" >> $(USER_CONF)@echo "MPITYPE = @MPITYPE@" >> $(USER_CONF)@echo "MPI_INCLUDE_PATH = @MPI_INCLUDE_PATH@" >> $(USER_CONF)@echo "MPI_LIBPATH = @MPI_LIBPATH@" >> $(USER_CONF)@echo "MPI_LIBS = @MPI_LIBS@" >> $(USER_CONF)@echo "MPI_DEFS = @MPI_DEFS@" >> $(USER_CONF)@echo "MPI_INCL2 = @MPI_INCL2@" >> $(USER_CONF)@echo "PKG_CPPFLAGS = @PKG_CPPFLAGS@" >> $(USER_CONF)@echo "PKG_LIBS = @PKG_LIBS@" >> $(USER_CONF) $(SHLIB): $(OBJECTS) clean:@rm -rf *.o *.d *.rc *.so* *.dll *.dylib *.a *.lib \ Makedeps Makevars $(USER_CONF) $(SHLIB) $(OBJECTS) where do i define the shared library path in it. And how would i verify it has been loaded. The library is dynamic i have check using ldd fpmpi.so I am using R CMD INSTALL package_name command to install package ? The output of the R CMD INSTALL package_name is: g@G:~/Documents/igauravsehrawat.github.io$ sudo R CMD INSTALL pbdMPI/* installing to library /home/g/R/x86_64-pc-linux-gnu-library/2.15* installing *source* package pbdMPI ... checking for gcc... gcc -std=gnu99 checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc -std=gnu99 accepts -g... yes checking for gcc -std=gnu99 option to accept ISO C89... none needed checking for mpirun... mpirun checking for mpiexec... mpiexec checking for orterun... orterun checking for sed... /bin/sed checking for mpicc... mpicc checking for ompi_info... ompi_info checking for mpich2version... mpich2version found sed, mpicc, and ompi_info ... gcc: error: unrecognized option '--showme:incdirs'>> TMP_INC_DIRS = gcc: error: unrecognized option '--showme:libdirs'>> TMP_LIB_DIRS = I am here /usr/lib/openmpi and it is OpenMPITrying to find mpi.h ...Found in /usr/lib/openmpi/includeTrying to find libmpi.so or libmpich.a ...Found libmpi in /usr/lib/openmpi/lib checking for openpty in -lutil... yes checking for main in -lpthread... yes ******************* Results of pbdMPI package configure ***************** >> TMP_INC = F>> TMP_LIB = F>> MPI_ROOT = /usr/lib/openmpi>> MPITYPE = >> OPENMPI>> MPI_INCLUDE_PATH = /usr/lib/openmpi/include>> MPI_LIBPATH = >> /usr/lib/openmpi/lib>> MPI_LIBS = -lutil -lpthread>> MPI_DEFS = -DMPI2>> >> MPI_INCL2 = >> PKG_CPPFLAGS = -I/usr/lib/openmpi/include -DMPI2 -DOPENMPI>> >> PKG_LIBS = -L/usr/lib/openmpi/lib -lmpi -lutil -lpthread ************************************************************************* configure: creating ./config.status config.status: creating src/Makevars configure: creating ./config.status config.status: creating src/Makevars config.status: creating R/zzz.r** libs installing via 'install.libs.R' to /home/g/R/x86_64-pc-linux-gnu-library/2.15/pbdMPI** R** data** moving datasets to lazyload DB** demo** inst** preparing package for lazy loading** help*** installing help indices** building package indices** installing vignettespbdMPI-guide.Rnw ** testing if installed package can be loaded * DONE (pbdMPI) Thanks in advance. [[alternative HTML version deleted]]
______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel