# How to 

## Steps
* clone nexus code
* build nexus code
* use compiler flags -L and -I

* comile mcstas instr to c-code
* c-compile c-code


## CLI - build
mkdir nexus-for-celine
cd nexus-for-celine/
git clone https://github.com/nexusformat/code.git

cd code/
mkdir Build_01
cd Build_01/
cmake ..
make 

## McStas
mcstas ISIS_SANS2d_Mantid.instr --trace
mcdisplay.pl ISIS_SANS2d_Mantid.instr --format=Mantid -n0

mpicc.gcc-clang -o ISIS_SANS2d_Mantid.out ISIS_SANS2d_Mantid.c -lm -DUSE_MPI -DUSE_NEXUS -lNeXus -L/Users/torbennielsen/nexus-for-celine/code/Build_01/src -I/Users/torbennielsen/nexus-for-celine/code/Build_01/include
time mpirun -np 2 ./ISIS_SANS2d_Mantid.out --format=NeXus -d 1E7_SANS2D --ncount=1E7

## Mantid
* File loads in MantidWorkBench 6.0

## HDF5
* from Homwbrew (default)
* from https://www.hdfgroup.org/downloads/hdf5/
* from ports https://ports.macports.org/port/hdf5/
