PecanProject / pecan

The Predictive Ecosystem Analyzer (PEcAn) is an integrated ecological bioinformatics toolbox.
www.pecanproject.org
Other
202 stars 235 forks source link

Installing packages with complex dependencies #71

Closed dlebauer closed 11 years ago

dlebauer commented 11 years ago

On Stampede, I was unable to install ncdf4, udunits2, rjags, MCMCpack, and rgdal.

These will all require local installation of dependencies. Has anyone done this? Is the best approach to build all of the dependencies from source? Are there tricks to identifying and loading the correctly configured modules? I currently have this in my .bashrc but am still testing it out:

module load gsl hdf5 parallel-netcdf/4.2.1.1 netcdf nco udunits/2.1.24 R_mkl/3.0.1

In general, it seems that it might be useful to share libraries on such a machine rather than have everyone fiddle around. e.g. if I set /home1/02014/dlebauer/lib/R to read-only, and people put libPaths("~/lib/R/", "/home1/02014/dlebauer/lib/R") it in their .Rprofile, they wouldn't have to install any dependencies, but could if they wanted to (e.g. a different version of PEcAn etc).

dlebauer commented 11 years ago

loading parallel-netcdf/4.2.1.1 instead of netcdf allows the ncdf4 package to install.

dlebauer commented 11 years ago

Here are the PEcAn R dependencies that I haven't been able to install:

The highest priority (for me) is getting udunits2 installed.

I think that I need to figure out where the module udunits/2.1.24 is installed but I am not finding any paths from module spider, module whatis

Here is the error I get:

checking for unistd.h... yes
checking udunits2.h usability... no
checking udunits2.h presence... no
checking for udunits2.h... no
checking for ut_read_xml in -ludunits2... no
-----Error: libununits2.a not found-----
     If the udunits2 library is installed in a non-standard location,
     use --configure-args='--with-udunits2=/usr/local/lib' for example,
     or --configure-args='--with-udunits2-include=/usr/include/udunits2'
     replacing paths with appropriate values for your installation.
     If udunits2 is not installed, please install it.
     It is required for this package.
ERROR: configuration failed for package ‘udunits2’

any suggestions?

dlebauer commented 11 years ago

I have posted a related question on the XSEDE forum

dlebauer commented 11 years ago

and the answer is ... both options are required. I am going to close this now.

module show udunits
find /opt/apps/intel13/udunits/2.1.24/ -name udunits2.h
R
install.packages("udunits2", configure.args='--with-udunits2=/opt/apps/intel13/udunits/2.1.24/ --with-udunits2-include=/opt/apps/intel13/udunits/2.1.24/include')

A quick look makes me think MCMCpack can be done in the same way, starting with

module avail lapack
module spider mkl/13.0.2.146
module show gcc
...
dlebauer commented 9 years ago

on roger ....

module show udunits
-------------------------------------------------------------------
/sw/Modules/modulefiles/udunits/2.1.24:

module-whatis    udunits 2.1.24 
setenv       UDUNITS_HOME /sw/udunits-2.1.24 
prepend-path     PATH /sw/udunits-2.1.24/bin 
prepend-path     LD_LIBRARY_PATH /sw/udunits-2.1.24/lib 
-------------------------------------------------------------------
install.packages("udunits2", configure.args='--with-udunits2=/sw/udunits-2.1.24/ --with-udunits2-include=/sw/udunits-2.1.24/include')
ecn620 commented 8 years ago

I had the same issue with udunits, and it turns out there is a typo in the error message. I suggest using:

install.packages('udunits2',configure.args='--with-udunits2-include=/usr/include/udunits2')

(the error message had "configure-args" instead of "configure.args")