pbdNCDF4 is on CRAN

94 views
Skip to first unread message

Wei-Chen Chen

unread,
Feb 26, 2013, 8:29:31 AM2/26/13
to rbigdatap...@googlegroups.com
http://cran.r-project.org/package=pbdNCDF4

The pbdNCDF4 is based on ncdf4 R package, but enable parallel read/write
to large NetCDF files via parallel HDF5 and NetCDF libraries. Also, the
pbdNCDF4 is back compatible to ncdf4 if parallel libraries are unavailable.
Existing codes by using ncdf4 can be easily switched to pbdNCD4 through
a few parallel functions plugged in. Examples can be found in the vignette.

Sebastian Konietzny

unread,
Dec 11, 2015, 3:54:57 AM12/11/15
to RBigDataProgramming
Hi!

I am having a problem to install "pbdNCDF4" in R under Ubuntu:

> install_github(repo="RBigData/pbdNCDF4", username="RBigData")
Downloading github repo RBigData/pbdNCDF4@master
Installing pbdNCDF4
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore CMD  \
  INSTALL '/tmp/RtmpnF7eBq/devtools4e083a7d4e59/RBigData-pbdNCDF4-7a36a22'  \
  --library='/home/skonietzny/R/x86_64-pc-linux-gnu-library/3.2'  \
  --install-tests 

* installing *source* package ‘pbdNCDF4’ ...
checking for nc-config... no
-----------------------------------------------------------------------------------
Error, nc-config not found or not executable.  This is a script that comes with the
netcdf library, version 4.1-beta2 or later, and must be present for configuration
to succeed.
 
If you installed the netcdf library (and nc-config) in a standard location, nc-config
should be found automatically.  Otherwise, you can specify the full path and name of
the nc-config script by passing the --with-nc-config=/full/path/nc-config argument
flag to the configure script.  For example:
 
./configure --with-nc-config=/sw/dist/netcdf4/nc-config
 
Special note for R users:
-------------------------
To pass the configure flag to R, use something like this:
 
R CMD INSTALL --configure-args="--with-nc-config=/home/joe/bin/nc-config" ncdf4
 
where you should replace /home/joe/bin etc. with the location where you have
installed the nc-config script that came with the netcdf 4 distribution.
-----------------------------------------------------------------------------------
ERROR: configuration failed for package ‘pbdNCDF4’
* removing ‘/home/skonietzny/R/x86_64-pc-linux-gnu-library/3.2/pbdNCDF4’
Error: Command failed (1)

Can someone see the problem? Do I need to install some libraries beforehand? I tried it with

sudo apt-get install libnetcdf-dev

... but it didn't solve the problem either.

Best regards
Sebastian

Wei-Chen Chen

unread,
Dec 11, 2015, 9:25:24 PM12/11/15
to RBigDataProgramming
The message tell you that configuration needs the nc-config to get information of netcdf4 library. You need to either find out where it is in the ubuntu package or compile hdf5/netcdf4 libraries especially when you have parallel file systems. See pbdNCDF4 vignette for details and how to specify the --with-nc-config. Not every ncdf4 library work correctly with
ncdf4 or pbdNCDF4.

Sebastian Konietzny

unread,
Dec 12, 2015, 5:32:46 AM12/12/15
to RBigDataProgramming
Thanks a lot. Maybe, someone can tell me which package to use best.

Sebastian Konietzny

unread,
Dec 14, 2015, 12:08:02 PM12/14/15
to RBigDataProgramming
Hi again!

Ok. There are still a few problems. I tried to follow the instructions in the pbdNCDF4 vignette to compile hdf5 and netcd4 as parallel versions:

./configure \
--prefix=/usr/local/hdf5 \
--enable-parallel \
--enable-shared \
CC="mpicc -g" \
CFLAGS="-fPIC -I/usr/include/mpi" \
CPPFLAGS="-fPIC -I/usr/include/mpi" \
LDFLAGS="-L/usr/lib -lmpi"

However, I didn't install like this and gave me errors; I had to remove all parts after "--enable-shared". I have openmpi installed. 

Best regards
Reply all
Reply to author
Forward
0 new messages