lawmurray / LibBi

Bayesian state-space modelling on high-performance hardware, including multicore, GPUs and distributed clusters.
http://www.libbi.org
Other
96 stars 22 forks source link

NetCDF error #2

Closed whiteBox123 closed 10 years ago

whiteBox123 commented 10 years ago

Hi,

I have just installed libbi, sampling from the prior works fine but when sampling from the posterior (or running any of the example run.sh files) the following error is thrown:

Error: Could not define attribute libbi_schema pmmh: src/bi/buffer/netcdf.cpp:166: void bi::nc_put_att(int, const string&, const string&): Assertion `status == 0' failed.

Is this a bug or my machine? Thanks

lawmurray commented 10 years ago

Just make sure that you have NetCDF 4.2 or later installed -- this error usually comes up with NetCDF 4.1 or earlier.

Regards,

Lawrence Murray CSIRO Computational Informatics

On 23/11/13 04:55, robinsonjj wrote:

Hi,

I have just installed libbi, sampling from the prior works fine but when sampling from the posterior (or running any of the example run.sh files) the following error is thrown:

Error: Could not define attribute libbi_schema pmmh: src/bi/buffer/netcdf.cpp:166: void bi::nc_put_att(int, const string&, const string&): Assertion `status == 0' failed.

Is this a bug or my machine? Thanks

— Reply to this email directly or view it on GitHub https://github.com/libbi/LibBi/issues/2.

whiteBox123 commented 10 years ago

Hi Lawrence,

Thanks for the reply, much appreciated. I have installed netCDF 4.3.0 installed now but I am now getting new errors, which I'm guessing means I haven't installed the right thing but hoping you might be able to let me know where I'm going wrong. I now get 'error: 'bi_sparsify_var' undefined near line 0 column 1' when running init.sh and 'Error: Could not ope data/obs_sparse.nc' when running run.sh

Incidentally, I am running ubuntu and followed the install instructions originally but these installed netCDF 4.1.3 is this something that needs changing in the install instructions or is it something wrong with my repositories (or something else?)

Thanks for your help.

lawmurray commented 10 years ago

I presume this is with the Lorenz96 package? It shouldn't be necessary to run init.sh actually, it just creates a new simulated data set if you would like one, but there is one already included with the package. With that said, having run it, and having it fail, leaves you without that very data set, the data/obs_sparse.nc file! I'd suggest just extracting the package again to restore the lost file, then going straight to run.sh.

If you do want to generate a new data set, init.sh calls GNU Octave to create the data set, so you will need that installed (if seems you have this already). You will also need OctBi installed (see http://libbi.org/related.html), which provides the bi_sparsify_var function that is reported as being missing in the error message that you've posted.

Thanks for the info regarding Ubuntu. I guess it must have this older version as standard. We've made a few changes in the development version of LibBi that I think should restore NetCDF 4.1 support for the next release. It was supported in version 1.0.0 and 1.0.1, for 1.0.2 we wrote out the C++ interface in favour of the C interface, as the C++ interface had a few limitations. This seemed to break NetCDF 4.1 support.

whiteBox123 commented 10 years ago

Fantastic, that looks like it was exactly the problem, thanks for all your help, looking forward to exploring libbi.