rhdf5 h5ls output differs from Linux to Windows
1
0
Entering edit mode
@maximefortin-14082
Last seen 7.1 years ago

Dear Users, I report an issue that I encontered on R using rhdf5 h4ls function. Here is the example :
 
library(rhdf5)
file_loc <- file.path(tempdir(), "h5ex_d_sofloat.h5")
download.file(url = "https://support.hdfgroup.org/ftp/HDF5/examples/files/exbyapi/h5ex_d_sofloat.h5",
              destfile = file_loc,mode="wb")
h5ls(file_loc)

 

Linux output :
  group name       otype dclass   dim
0     /  DS1 H5I_DATASET  FLOAT  x 32

 

Windows ouptut :
  group name       otype dclass     dim
0     /  DS1 H5I_DATASET  FLOAT 64 x 32

 

As you can see, the dim columns has been truncated.​

 

Here are the session info :
  Windows :
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

 

Matrix products: default

 

locale:
  [1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252 LC_NUMERIC=C                 
[5] LC_TIME=French_France.1252   

 

attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base    

 

other attached packages:
  [1] assertthat_0.2.0  dplyr_0.7.2       data.table_1.10.4 rhdf5_2.20.0      lubridate_1.6.0 

 

loaded via a namespace (and not attached):
  [1] Rcpp_0.12.12    R6_2.2.2        magrittr_1.5    rlang_0.1.2     stringi_1.1.5   zlibbioc_1.22.0 bindrcpp_0.2    tools_3.4.1   
[9] stringr_1.2.0   glue_1.1.1      compiler_3.4.1  pkgconfig_2.0.1 bindr_0.1       tibble_1.3.4  

 


Linux :
  > sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

 

locale:
  [1] LC_CTYPE=fr_FR.UTF-8       LC_NUMERIC=C
[3] LC_TIME=fr_FR.UTF-8        LC_COLLATE=fr_FR.UTF-8
[5] LC_MONETARY=fr_FR.UTF-8    LC_MESSAGES=fr_FR.UTF-8
[7] LC_PAPER=fr_FR.UTF-8       LC_NAME=C
[9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C

 

attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base

 

other attached packages:
  [1] rhdf5_2.14.0         BiocInstaller_1.20.3

 

loaded via a namespace (and not attached):
  [1] zlibbioc_1.16.0 tools_3.2.3

 

 

 

Any idea?
Thanks in advance

R h5ls windows linux • 1.5k views
ADD COMMENT
0
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 1 hour ago
EMBL Heidelberg

Sorry for the delay in replying to this.  For future reference, on this board it's normally good practice to give the name of the package you're having issue with as one of the tags.  I get notified if there's a post tagged rhdf5 but I don't look out for the individual functions.

I'm don't have a specific reason why the formatting is wrong in the Linux version, but you're using different versions of R and rhdf5 in your comparison.  I suspect there was a change made between the 2.14.0 and 2.20.0 that fixed this problem, and if you use a more recent version on Linux the issue will go away.  Here's my output and sessionInfo running your example and using the current release on Linux Mint:

> h5ls(file_loc)
  group name       otype dclass     dim
0     /  DS1 H5I_DATASET  FLOAT 64 x 32
> 
> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 18.1

Matrix products: default
BLAS: /home/msmith/Applications/R/R-3.4.2/lib/libRblas.so
LAPACK: /home/msmith/Applications/R/R-3.4.2/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rhdf5_2.22.0

loaded via a namespace (and not attached):
[1] zlibbioc_1.24.0 compiler_3.4.2
ADD COMMENT

Login before adding your answer.

Traffic: 790 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6