Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/amuse_etics/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ support/config.mk:
# Building the code into a static library
DEPFLAGS += $(CUDA_FLAGS)
CXXFLAGS += $(DEPFLAGS) -Wall
LDFLAGS += $(CUDA_LDFLAGS)
LDLIBS += -lcudart
LDFLAGS += $(CUDA_LDFLAGS) $(HDF5_LDFLAGS)
LDLIBS += -lcudart -lhdf5_cpp -lhdf5

CODELIB = src/libetics.a

Expand Down
2 changes: 1 addition & 1 deletion src/amuse_etics/packages/amuse-etics-cuda.amuse_deps
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c++ mpi cuda hdf5
c++ mpi cuda hdf5-cxx
2 changes: 1 addition & 1 deletion src/amuse_etics/src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ scf-optimize-lc: mathaux.o scf.o scf-optimize-lc.o ic.o

# only io.cpp should be compiled with all the weird HDF5 flags
io.o: io.cpp
$(CXX) $(CPPFLAGS) -I@HDF5_ROOT@/include $(CXXFLAGS) -c -o io.o io.cpp
$(CXX) $(CPPFLAGS) $(HDF5_CXXFLAGS) $(CXXFLAGS) -c -o io.o io.cpp

.cu.o: $<
$(NVCC) $(CUDAFLAGS) $(CPPFLAGS) -Xcompiler "$(CXXFLAGS)" -dc -o $@ $<
Expand Down
1 change: 1 addition & 0 deletions src/amuse_etics/src/amuse_lib_hdf5.m4
143 changes: 10 additions & 133 deletions src/amuse_etics/src/configure
Original file line number Diff line number Diff line change
Expand Up @@ -652,11 +652,11 @@ ac_header_cxx_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
BOOSTINC
HDF5_ROOT
HDF5_LDFLAGS
HDF5_CXXFLAGS
STATICLIBS
GPU_ARCH
CUDA_ROOT
H5CXX
MPICXX
ac_ct_CC
CFLAGS
Expand Down Expand Up @@ -3053,11 +3053,11 @@ if test x$ac_prog_cxx_stdcxx = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
printf %s "checking for $CXX option to enable C++11 features... " >&6; }
if test ${ac_cv_prog_cxx_11+y}
if test ${ac_cv_prog_cxx_cxx11+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_cv_prog_cxx_11=no
ac_cv_prog_cxx_cxx11=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
Expand Down Expand Up @@ -3099,11 +3099,11 @@ if test x$ac_prog_cxx_stdcxx = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
printf %s "checking for $CXX option to enable C++98 features... " >&6; }
if test ${ac_cv_prog_cxx_98+y}
if test ${ac_cv_prog_cxx_cxx98+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_cv_prog_cxx_98=no
ac_cv_prog_cxx_cxx98=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
Expand Down Expand Up @@ -4499,138 +4499,14 @@ fi

fi

if test -z $HDF5_ROOT
then :
AMUSE_LIB_HDF5()

# Extract the first word of "h5c++", so it can be a program name with args.
set dummy h5c++; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_H5CXX+y}
if test "$HDF5_CXX_FOUND" == "no"
then :
printf %s "(cached) " >&6
else $as_nop
if test -n "$H5CXX"; then
ac_cv_prog_H5CXX="$H5CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
case $as_dir in #(((
'') as_dir=./ ;;
*/) ;;
*) as_dir=$as_dir/ ;;
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_H5CXX="h5c++"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

test -z "$ac_cv_prog_H5CXX" && ac_cv_prog_H5CXX="no"
fi
fi
H5CXX=$ac_cv_prog_H5CXX
if test -n "$H5CXX"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $H5CXX" >&5
printf "%s\n" "$H5CXX" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
as_fn_error $? "Could not find HDF5 library with C++ support" "$LINENO" 5
fi


if test "$H5CXX" == "no"
then :
as_fn_error $? "This package needs HDF5 (not really but this configure script does)" "$LINENO" 5
fi
HDF5_ROOT=`which h5c++ | sed 's:/bin/h5c++$::'`

else $as_nop

# Extract the first word of "h5c++", so it can be a program name with args.
set dummy h5c++; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_H5CXX+y}
then :
printf %s "(cached) " >&6
else $as_nop
if test -n "$H5CXX"; then
ac_cv_prog_H5CXX="$H5CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $HDF5_ROOT/bin
do
IFS=$as_save_IFS
case $as_dir in #(((
'') as_dir=./ ;;
*/) ;;
*) as_dir=$as_dir/ ;;
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_H5CXX="$HDF5_ROOT/bin/h5c++"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

test -z "$ac_cv_prog_H5CXX" && ac_cv_prog_H5CXX="no"
fi
fi
H5CXX=$ac_cv_prog_H5CXX
if test -n "$H5CXX"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $H5CXX" >&5
printf "%s\n" "$H5CXX" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


if test "$H5CXX" == "no"
then :
as_fn_error $? "Cound not find HDF5 compiler in $HDF5_ROOT/bin" "$LINENO" 5
fi

fi


# # Check HDF5
# AS_IF([test -z $HDF5_ROOT],
# [
# AC_CHECK_LIB([hdf5], [main], [],
# [
# AS_UNSET([ac_cv_lib_hdf5_main])
# AC_CHECK_PROG([HDF5CC], [h5cc], [h5cc], [:])
# AS_IF([test "$HDF5CC" == :], [AC_MSG_ERROR([This package needs HDF5])],
# [
# AC_PROG_SED
# AC_MSG_NOTICE([H5CC executable found, trying to find library nearby])
# HDF5_ROOT=`which h5cc | sed 's:/bin/h5cc$::'`
# AC_MSG_NOTICE([XXXXX $HDF5_ROOT])
# # AX_LDFLAGS_PUSH([dgsfgdfgd /home/ymeiron/local/lib/libhdf5.a])
# # AC_CHECK_LIB([hdf5], [main], [], [AC_MSG_ERROR([This package needs HDF5])])
# # AX_LDFLAGS_POP
# ])
# ])
# ],
# [
# AX_LDFLAGS_PUSH([-L$HDF5_ROOT/lib])
# AC_CHECK_LIB([hdf5], [main], [], [AC_MSG_ERROR([No compatible HDF5 library was found in $HDF5_ROOT/lib])])
# AX_LDFLAGS_POP
# ])



H5CXX_SHOW=`h5c++ -show`
MPICXX_SHOW=`mpic++ -show`

Expand Down Expand Up @@ -4788,6 +4664,7 @@ fi




ac_config_files="$ac_config_files Makefile"


Expand Down
41 changes: 4 additions & 37 deletions src/amuse_etics/src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -130,43 +130,9 @@ AS_IF([test -z $MPI_ROOT],
AS_IF([test "$MPICXX" == "no"], [AC_MSG_ERROR([Cound not find MPI compiler in $MPI_ROOT/bin])])
])

AS_IF([test -z $HDF5_ROOT],
[
AC_CHECK_PROG([H5CXX], [h5c++], [h5c++], [no])
AS_IF([test "$H5CXX" == "no"], [AC_MSG_ERROR([This package needs HDF5 (not really but this configure script does)])])
HDF5_ROOT=`which h5c++ | sed 's:/bin/h5c++$::'`
],
[
AC_CHECK_PROG([H5CXX], [h5c++], [$HDF5_ROOT/bin/h5c++], [no], [$HDF5_ROOT/bin])
AS_IF([test "$H5CXX" == "no"], [AC_MSG_ERROR([Cound not find HDF5 compiler in $HDF5_ROOT/bin])])
])


# # Check HDF5
# AS_IF([test -z $HDF5_ROOT],
# [
# AC_CHECK_LIB([hdf5], [main], [],
# [
# AS_UNSET([ac_cv_lib_hdf5_main])
# AC_CHECK_PROG([HDF5CC], [h5cc], [h5cc], [:])
# AS_IF([test "$HDF5CC" == :], [AC_MSG_ERROR([This package needs HDF5])],
# [
# AC_PROG_SED
# AC_MSG_NOTICE([H5CC executable found, trying to find library nearby])
# HDF5_ROOT=`which h5cc | sed 's:/bin/h5cc$::'`
# AC_MSG_NOTICE([XXXXX $HDF5_ROOT])
# # AX_LDFLAGS_PUSH([dgsfgdfgd /home/ymeiron/local/lib/libhdf5.a])
# # AC_CHECK_LIB([hdf5], [main], [], [AC_MSG_ERROR([This package needs HDF5])])
# # AX_LDFLAGS_POP
# ])
# ])
# ],
# [
# AX_LDFLAGS_PUSH([-L$HDF5_ROOT/lib])
# AC_CHECK_LIB([hdf5], [main], [], [AC_MSG_ERROR([No compatible HDF5 library was found in $HDF5_ROOT/lib])])
# AX_LDFLAGS_POP
# ])
AMUSE_LIB_HDF5()

AS_IF([test "$HDF5_CXX_FOUND" == "no"], [AC_MSG_ERROR([Could not find HDF5 library with C++ support])])


H5CXX_SHOW=`h5c++ -show`
Expand Down Expand Up @@ -246,7 +212,8 @@ AC_SUBST([CUDA_ROOT])
AC_SUBST([NVCC])
AC_SUBST([GPU_ARCH])
AC_SUBST([STATICLIBS])
AC_SUBST([HDF5_ROOT])
AC_SUBST([HDF5_CXXFLAGS])
AC_SUBST([HDF5_LDFLAGS])
AC_SUBST([BOOSTINC])
AC_CONFIG_FILES([Makefile])

Expand Down
2 changes: 1 addition & 1 deletion src/amuse_etics/support/aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_include([shared/m4/amuse_cuda.m4])
m4_include([shared/m4/amuse_lib_hdf5.m4])
m4_include([shared/m4/amuse_log_envvars.m4])
m4_include([shared/m4/amuse_venv.m4])
m4_include([shared/m4/ax_count_cpus.m4])
m4_include([shared/m4/ax_lib_hdf5.m4])
m4_include([shared/m4/ax_mpi.m4])
8 changes: 2 additions & 6 deletions src/amuse_etics/support/config.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ NVCC = @NVCC@
CUDA_FLAGS = @CUDA_FLAGS@
CUDA_LDFLAGS = @CUDA_LDFLAGS@

HDF5_VERSION = @HDF5_VERSION@
HDF5_CFLAGS = @HDF5_CFLAGS@
HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
HDF5_LIBS = @HDF5_LIBS@
HDF5_FLIBS = @HDF5_FLIBS@

HDF5_CXXFLAGS = @HDF5_CXXFLAGS@
HDF5_LDFLAGS = @HDF5_LDFLAGS@

Loading
Loading