Giter VIP home page Giter VIP logo

asdf-library's Introduction

Build Status

Landing page for all things ASDF: https://seismic-data.org

This is Adaptable Seismic Data Format - if you are looking for the Advanced Scientific Data Format, go here: https://asdf.readthedocs.io/en/latest/

Instruction to install the hdf5 parallel library on mac.

Remove everything hdf5 and mpi related from conda

$ conda uninstall hdf5 h5py mpi4py

Install mpi and parallel hdf5 somehow - on mac i strongly recommend homebrew.

$ brew install open-mpi
$ brew tap homebrew/science
$ brew install hdf5 --with-mpi

Then - with the pip in the conda (environement) Will make sure mpi4py is linked against your systems MPI

$ pip install mpi4py

Download h5py and unpack it and make sure the conda env is active

$ python setup.py configure --mpi
$ python setup.py build
$ python setup.py install

This will then install a parallel h5py version.

Usage

The following instructions are for in-source builds.

$ cmake .
$ make

Finding the correct MPI / HDF5 libraries does not seem to be working all the same on different systems.

If the compilation complains about a missing use mpi, try the following:

$ cmake . -DCMAKE_Fortran_COMPILER=mpif90
$ make

If the compilation still complains about missing hdf5 libraries, try:

$ cmake . -DCMAKE_Fortran_COMPILER=h5pfc
$ make

If you want to get cmake to find your local boost directory, try:

$ cmake -DBoost_NO_BOOST_CMAKE=TRUE \
    -DBoost_NO_SYSTEM_PATHS=TRUE \
    -DBOOST_ROOT:PATHNAME=$TARGET \
    -DBoost_LIBRARY_DIRS:FILEPATH=${TARGET}/lib

It should create a library in lib/ examples programs are in test/ and generated there.

If documentation needs to be generated:

cmake -DBUILD_DOCUMENTATION=ON

You should have doxygen installed. Documentation will be generated in doc/.

For out-of source builds, start with:

$ mkdir build/
$ cd build/

and follow the previous instructions, replacing . with ..

Once build, you may run test with:

$ make test

To install in a nonstandard location (e.g., a user directory without root privileges), you can either set CMAKE_INSTALL_PREFIX during configuration or DESTDIR during install, e.g.,

$ cmake -DCMAKE_INSTALL_PREFIX=/path/to/toplevel/install/directory <options> .
$ make
$ make install

or

$ cmake <options> .
$ make
$ make DESTDIR=/path/to/toplevel/install/directory install

Note that the files end up in $DESTDIR/$CMAKE_INSTALL_PREFIX/*, so it is only necessary to set one of these.

Titan compilation

modules
cmake/2.8.10 (or higher)
PrgEnv-gnu/5.2.40
cray-hdf5-parallel
boost/1.57.0 (or higher)
configuration
cd asdf-library
Uncomment line 27 in CMakeLists.txt (Delete the # symbol)
mkdir build
cd build
cmake .. -DCMAKE_Fortran_COMPILER=ftn -DBoost_NO_SYSTEM_PATHS=TRUE
compilation
make
make doc
make install DESTDIR=</path/to/toplevel/install/directory>

asdf-library's People

Contributors

1sbeller avatar krischer avatar qulogic avatar wjlei1990 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asdf-library's Issues

specfem3d_globe output to asdf very slow

Hej there, I am trying to output specfem 3D globe synthetics in large number, like 100 000 seismograms per component. Writing these to binary sac in parallel is very fast, (for a short, very low frequency test setup about 10 minutes) but the handling of the data becomes extremely cumbersome. Thus, asdf would be perfect for my purposes.

I am running specfem3D_globe on Piz Daint (http://www.cscs.ch/computers/piz_daint_piz_dora/index.html), we managed to compile specfem with asdf, but when running the model with my 100000 receivers the writing stalled. I could watch the size of the synthetics.h5 go up megabyte by megabyte. After two hours I cancelled the job (of which the actual calculation takes a couple of minutes at most). I append the compilation file, Parameters and solver output. I had it write after 1000 time steps, that's why the output stops there. Maybe you can look into this, it would be great if you have an idea what's causing the trouble :) cheers

mk_daint.txt
output_solver.asdf.txt
Par_file.asdf.txt

compile error

cmake . -DCMAKE_Fortran_COMPILER=h5pfc
make

[ 85%] Built target write_example_f90
Scanning dependencies of target write_ASDF
[ 92%] Building C object examples/CMakeFiles/write_ASDF.dir/write_ASDF.c.o
[100%] Linking CXX executable write_ASDF
/usr/bin/ld: cannot find -lhdf5
collect2: error: ld returned 1 exit status
make[2]: *** [examples/CMakeFiles/write_ASDF.dir/build.make:92: examples/write_ASDF] Error 1
make[1]: *** [CMakeFiles/Makefile2:181: examples/CMakeFiles/write_ASDF.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

โžœ asdf-library git:(master) โœ— h5pfc --version
GNU Fortran (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

but i have -lhdf5 already.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/ufo/opt/hdf5/lib
export PATH=$PATH:/home/ufo/opt/hdf5/bin
export CPATH=:$CPATH:/home/ufo/opt/hdf5/include

Release plans

ASDF is now available in SPECFEM3D_GLOBE thanks to @Jas11. There should be a release to make this easier to make a stable installation. Is there a list of items necessarily blocking a release from occurring at this time? Currently, there is one of which I am aware:

  • Install pkg-config/cmake files for dependent libraries (which I'm working on.)

cmake issue with HDF5 lib

line19 in CMakeLists.txt
find_package(HDF5 1.8.0 REQUIRED)
will find the HDF5_LIBRARIES by itself and will not be successful at least on Titan, therefor cause issues like "Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) (Required ..."
This can be resolved by safely comment out line 19 and indicating library manually (already done in instruction). Suggested by Matthieu.

mac installation

Instruction to install the hdf5 parallel library on mac (received from Lion Kirscher)
That might be useful for other so I suggest you add this in the README

Remove everything hdf5 and mpi related from conda

$ conda uninstall hdf5 h5py mpi4py

Install mpi and parallel hdf5 somehow - on mac i strongly recommend

homebrew.

$ brew install open-mpi
$ brew tap homebrew/science
$ brew install hdf5 --with-mpi

Then - with the pip in the conda (environement)

Will make sure mpi4py is linked against your systems MPI

$ pip install mpi4py

Download h5py and unpack it and make sure the conda env is active

$ python setup.py configure --mpi
$ python setup.py build
$ python setup.py install

This will then install a parallel h5py version.

issues found on asdf-library(add more details later)

1. rewrite issue

if already exists, it should first clean it out. But it seems not doing so.

2. stationxml issue

stationxml only reaches station level, not channel level

3. trace time issue

* trace starttime and endtime seems wrong
* trace delta and sampling rate wrong

4. quakeml file

 * header information wrong
 * event origin time calculation wrong
 * add more information in mb, Ms

Remove boost requirement?

I think I will remove the boost requirement since it is only really used for the parser that is not currently needed. This should make installation somewhat simpler. Let me know if you don't think this is a good idea.

Add some info to `README.md`

Hi!

I think it would be helpful for users to explicitly state that the HDF5 environment variables have to be set, e.g., HDF5DIR, LD_LIBRARY_PATH addition, etc.

In retrospective it seems obvious, but it would be nice to add as an FYI if Parallel HDF5 is installed manually and not loaded from cluster modules. For the manual case, it would also help the user to know, if HDF5 is installed manually, that it has to be installed with the following flags:

./configure --enable-shared --enable-parallel \
    --enable-fortran --enable-fortran2003 \
    --prefix=<path/to/your/build>

Thanks!

Cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.