sdf_example /

Filename Size Date modified Message
38 B
347 B
1.1 KB
2.3 KB
596 B
2.9 KB
Low-Level Routines for Reading SDF Files
========================================

example.c: Read in a few halos from ds14_a_halos_1.0000, also calculating the total number of halos in the file.
example.F90: Read in first 50 halos from ds14_a_halos_1.0000
libsdf_example.c: Link to libSDF for more generalized access. 

Compilation
===========
Feel free to just type:

    make

To compile the libSDF example, type:

    make sdf

This will download the SDF library using git.

Manual Compilation
------------------

example.c:

    gcc -o example_c -O3 -std=c99 example.c

example.F90:

    gfortran -o example_F90 -O3 example.f90

libsdf_example.c:

    git clone http://bitbucket.org/JohnSalmon/SDF
    cd SDF
    make
    cd ../
    gcc -o example_sdf -O3 -Wunused -std=c99 -I./SDF -L./SDF libsdf_example.c -lSDF

Running:
========
The simple C and F90 examples will only work on ds14_a_halos_1.0000:

    ./example_c path/to/ds14_a_halos_1.0000
    ./example_f90 path/to/ds14_a_halos_1.0000

The libSDF example should work on many SDF halo catalogs:

    ./example_sdf path/to/any/halo/file