Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
hdf5 [2011/08/30 13:38] – [Utilisation] adminhdf5 [2018/02/01 19:57] (Version actuelle) – [Links] admin
Ligne 2: Ligne 2:
 **HDF5** is a data model, library, and file format for storing and managing data. It supports an unlimited variety of datatypes, and is designed for flexible and efficient I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and applications for managing, manipulating, viewing, and analyzing data in the HDF5 format.  **HDF5** is a data model, library, and file format for storing and managing data. It supports an unlimited variety of datatypes, and is designed for flexible and efficient I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and applications for managing, manipulating, viewing, and analyzing data in the HDF5 format. 
  
-====== Version installé ======+====== Installed versions ======
  
-  * 1.9.63 (version séquentielle)+  * Use module avail lib/hdf5 to view installed version  
 +====== How to? ======
  
-====== Utilisation ====== +  * load the latest HDF5 module
- +
-  * Charger le module HDF5+
 <code bash> <code bash>
-$ module load hdf5+$ module load lib/hdf5
 </code> </code>
  
-===== Manipulation des fichiers depuis des programmes =====+===== Manipulate data from your code =====
  
-**Exemple : Création d'un Dataset** +**Example : Create Dataset** 
  
 <file C dataSet.c> <file C dataSet.c>
Ligne 61: Ligne 60:
  
 </file> </file>
-  * Compiler votre application+  * Compile your code
  
 <code bash> <code bash>
-$ [icc|ifort] myApplication.c -o myProgram.exe -L$(HDF5_HOME)/lib -I$(HDF5_HOME)/include -lz -lhdf5 -lm+$ [icc|ifort|gcc|mpicc] myApplication.c -o myProgram.exe -L$(HDF5_HOME)/lib -I$(HDF5_HOME)/include -lz -lhdf5 -lm
 </code> </code>
  
 +===Python example===
 +We need to load python first <code bash>$ module load lang/python</code>
 +**Wrire HDF5**
 +<code python>
 +#!/usr/bin/env python
 +import h5py
  
-===== Utiliser les utilitaires H5 =====+# Create random data 
 +import numpy as np 
 +data_matrix = np.random.uniform(-1, 1, size=(10, 3)) 
 + 
 +# Write data to HDF5 
 +data_file = h5py.File('file.hdf5', 'w') 
 +data_file.create_dataset('group_name', data=data_matrix) 
 +data_file.close() 
 +</code> 
 + 
 +**Read HDF5** 
 +<code python> 
 + 
 +import h5py 
 +filename = 'file.hdf5' 
 +f = h5py.File(filename, 'r') 
 + 
 +# List all groups 
 +print("Keys: %s" % f.keys()) 
 +a_group_key = list(f.keys())[0] 
 + 
 +# Get the data 
 +data = list(f[a_group_key]) 
 + 
 +</code> 
 +===== Using H5 tools =====
  
  
-La liste des commandes est disponible [[http://www.hdfgroup.org/HDF5/doc/RM/Tools.html|ici]] +Commands are located [[http://www.hdfgroup.org/HDF5/doc/RM/Tools.html|here]] 
  
 +/**
 ===== Visualiser les fichiers HDF  ===== ===== Visualiser les fichiers HDF  =====
  
Ligne 78: Ligne 109:
  
 <code bash> <code bash>
-$ module load hdf5+$ module load tools/hdfview
 $ hdvfiew $ hdvfiew
 </code> </code>
  
 {{ :hdfview.png? |}} {{ :hdfview.png? |}}
-====== Liens ======+*/ 
 +====== Links ======
  
-http://www.hdfgroup.org/HDF5/+  * http://www.hdfgroup.org/HDF5/ 
 +  * https://support.hdfgroup.org/HDF5/doc/H5.intro.html
  • hdf5.1314711509.txt.gz
  • Dernière modification : 2015/02/25 08:45
  • (modification externe)