Commit 0edfa656 authored by Pietro Incardona's avatar Pietro Incardona

Adding detection of HDF5

parent 5b7b5367
......@@ -37,6 +37,7 @@ m4_ifdef([AX_BLAS],,[m4_include([m4/ax_blas.m4])])
m4_ifdef([AX_LAPACK],,[m4_include([m4/ax_lapack.m4])])
m4_ifdef([AX_SUITESPARSE],,[m4_include([m4/ax_suitesparse.m4])])
m4_ifdef([AX_EIGEN],,[m4_include([m4/ax_eigen.m4])])
m4_ifdef([AX_LIB_HDF5],,[m4_include([m4/ax_lib_hdf5.m4])]])
CXXFLAGS+=" --std=c++11 "
......@@ -100,6 +101,13 @@ fi
IMMDX_LIB_METIS([],[echo "Cannot detect metis, use the --with-metis option if it is not installed in the default location"
exit 201])
#########
## Check for HDF5
AX_LIB_HDF5([],[echo "Cannot detect hdf5, use the --with-hdf5 option if it is not installed in the default location"
exit 206])
########
## Enable scan coverty
......
include ../../example.mk
CC=mpic++
LDIR =
OBJ = main.o
%.o: %.cpp
$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
cell: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
all: cell
.PHONY: clean all
clean:
rm -f *.o *~ core cell
include ../../example.mk
CC=mpic++
LDIR =
OBJ = main.o
%.o: %.cpp
$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
verlet: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
all: vect
.PHONY: clean all
clean:
rm -f *.o *~ core verlet
......@@ -137,6 +137,7 @@ BOOST_installed=0
LAPACK_installed=0
SUITESPARSE_installed=0
EIGEN_installed=0
HDF5_installed=0
blas_options=""
conf_err=1
......@@ -213,6 +214,14 @@ else
./script/install_EIGEN.sh $i_dir $compiler_opt
configure_options=" $configure_options --with-eigen=$i_dir/EIGEN "
EIGEN_installed=1
elif [ $conf_err -eq 207 ]; then
echo "HDF5 not found try to install"
if [ $HDF5_installed -eq 1 ]; then
echo "Error the installation of HDF5 failed"
fi
./script/install_HDF5.sh $i_dir $compiler_opt
configure_options=" $configure_options --with-hdf5=$i_dir/HDF5 "
HDF5_installed=1
elif [ $conf_err -ne 0 ]; then
echo "I do not know how to recover from this error"
exit 1
......
This diff is collapsed.
openfpm_data @ d99d6e28
Subproject commit 726d347a31701409657d5bf4b45336ce47eba73e
Subproject commit d99d6e286199f5483327a9fd86ee84277c279310
openfpm_io @ 52333293
Subproject commit cb37b2bc9e40a02de36ed664dc0bfe43f6257f37
Subproject commit 523332938de0a47a1ca1d652a8e171cf9b8a6f5b
openfpm_vcluster @ 0ed3620c
Subproject commit 6e360fcbf118277ca59b2709eb2ffa0661c677a8
Subproject commit 0ed3620ce1e91e5fa3541e01c1654dfad7515b87
#! /bin/bash
# check if the directory $1/HDF5 exist
if [ -d "$1/HDF5" ]; then
echo "HDF5 already installed"
exit 0
fi
wget http://ppmcore.mpi-cbg.de/upload/hdf5-1.8.16.tar.bz2
tar -xf hdf5-1.8.16.tar.bz2
cd hdf5-1.8.16
./configure --enable-parallel --prefix=$1/HDF5
make -j 4
mkdir $1/HDF5
make install
......@@ -7,7 +7,7 @@ if [ -d "$1/MPI" ]; then
exit 0
fi
wget http://www.open-mpi.de/software/ompi/v1.8/downloads/openmpi-1.8.7.tar.bz2
wget http://ppmcore.mpi-cbg.de/upload/openmpi-1.8.7.tar.bz2
tar -xvf openmpi-1.8.7.tar.bz2
cd openmpi-1.8.7
sh ./configure --prefix=$1/MPI --enable-opal-multi-threads --enable-mpi-f90 $2 $3
......
......@@ -20,6 +20,8 @@
#include "util/object_util.hpp"
#include "memory/ExtPreAlloc.hpp"
#include "CSVWriter/CSVWriter.hpp"
#include "VTKWriter/VTKWriter.hpp"
#include "H5PartWriter/H5PartWriter.hpp"
#include "Decomposition/common.hpp"
#include "Grid/grid_dist_id_iterator_dec.hpp"
#include "Vector/vector_dist_ofb.hpp"
......@@ -1240,15 +1242,32 @@ public:
* \return if the file has been written correctly
*
*/
inline bool write(std::string out, int opt = NO_GHOST)
inline bool write(std::string out, int opt = NO_GHOST | VTK_WRITER)
{
// CSVWriter test
CSVWriter<openfpm::vector<Point<dim,St>>, openfpm::vector<prop> > csv_writer;
if ((opt & 0xFFFF0000) == CSV_WRITER)
{
// CSVWriter test
CSVWriter<openfpm::vector<Point<dim,St>>, openfpm::vector<prop> > csv_writer;
std::string output = std::to_string(out + std::to_string(v_cl.getProcessUnitID()) + std::to_string(".csv"));
// Write the CSV
return csv_writer.write(output,v_pos,v_prp);
}
else if ((opt & 0xFFFF0000) == VTK_WRITER)
{
// CSVWriter test
VTKWriter<boost::mpl::pair<openfpm::vector<Point<dim,St>>, openfpm::vector<prop>>, VECTOR_POINTS> vtk_writer;
std::string output = std::to_string(out + std::to_string(v_cl.getProcessUnitID()) + std::to_string(".csv"));
std::string output = std::to_string(out + std::to_string(v_cl.getProcessUnitID()) + std::to_string(".csv"));
// Write the CSV
return csv_writer.write(output,v_pos,v_prp);
// Write the CSV
return vtk_writer.write(output,v_pos,v_prp);
}
else if ((opt & 0xFFFF0000) == H5PART_WRITER)
{
}
}
/* \brief It return the id of structure in the allocation list
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment