Skip to content

Commit ca8e59d

Browse files
Feature/dart (#11)
Update to avoid fixing compilation issue on src/tools (due to : HDF5 cannot be found)
1 parent 7fc75f0 commit ca8e59d

File tree

5 files changed

+17
-70
lines changed

5 files changed

+17
-70
lines changed

.devcontainer/post-create.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ mkdir -p /workspaces/install/pdc
2424
ln -s /workspaces/install/pdc $(dirname $PDC_SRC_DIR)
2525

2626
# Build and install PDC
27-
export PDC_CMAKE_FLAGS="-DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DUSE_SYSTEM_HDF5=OFF -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX=$PDC_DIR -DPDC_ENABLE_MPI=ON -DMERCURY_DIR=$MERCURY_DIR -DCMAKE_C_COMPILER=mpicc -DMPI_RUN_CMD=mpiexec "
27+
export PDC_CMAKE_FLAGS="-DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TOOLS=OFF -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX=$PDC_DIR -DPDC_ENABLE_MPI=ON -DMERCURY_DIR=$MERCURY_DIR -DCMAKE_C_COMPILER=mpicc -DMPI_RUN_CMD=mpiexec "
2828

2929
cd $PDC_SRC_DIR
3030
rm -rf build && mkdir -p build

.docker/dev_base.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,6 @@ RUN echo 'export LD_LIBRARY_PATH=$MERCURY_DIR/lib:$LD_LIBRARY_PATH' >> $WORK_SPA
123123
echo 'export PATH=$MERCURY_DIR/include:$MERCURY_DIR/lib:$PATH' >> $WORK_SPACE/pdc_env.sh
124124

125125

126-
ENV PDC_CMAKE_FLAGS="-DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DUSE_SYSTEM_HDF5=OFF -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX=$PDC_DIR -DPDC_ENABLE_MPI=ON -DMERCURY_DIR=$MERCURY_DIR -DCMAKE_C_COMPILER=mpicc -DMPI_RUN_CMD=mpiexec "
126+
ENV PDC_CMAKE_FLAGS="-DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX=$PDC_DIR -DPDC_ENABLE_MPI=ON -DMERCURY_DIR=$MERCURY_DIR -DCMAKE_C_COMPILER=mpicc -DMPI_RUN_CMD=mpiexec "
127127

128128
ENTRYPOINT [ "/workspaces/pdc/.devcontainer/post-attach.sh" ]

CMakeLists.txt

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -322,45 +322,6 @@ if(PDC_USE_CRAY_DRC)
322322
endif()
323323
endif()
324324

325-
#-----------------------------------------------------------------------------
326-
# Find HDF5
327-
#-----------------------------------------------------------------------------
328-
#HDF5
329-
option(USE_SYSTEM_HDF5 "Use system-installed HDF5." ON)
330-
if(USE_SYSTEM_HDF5)
331-
find_package(HDF5 NO_MODULE NAMES hdf5 COMPONENTS C shared)
332-
if(HDF5_FOUND)
333-
set(HDF5_C_SHARED_LIBRARY hdf5-shared)
334-
# if(NOT TARGET ${HDF5_C_SHARED_LIBRARY})
335-
# message(FATAL_ERROR "Could not find hdf5 shared target, please make "
336-
#"sure that HDF5 has ben compiled with shared libraries enabled.")
337-
# endif()
338-
set(PDC_EXT_INCLUDE_DEPENDENCIES
339-
${PDC_EXT_INCLUDE_DEPENDENCIES}
340-
${HDF5_INCLUDE_DIR}
341-
)
342-
set(PDC_EXT_LIB_DEPENDENCIES
343-
${PDC_EXT_LIB_DEPENDENCIES}
344-
${HDF5_C_SHARED_LIBRARY}
345-
)
346-
else()
347-
# Allow for HDF5 autotools builds
348-
find_package(HDF5 MODULE REQUIRED)
349-
if(HDF5_FOUND)
350-
set(PDC_EXT_INCLUDE_DEPENDENCIES
351-
${PDC_EXT_INCLUDE_DEPENDENCIES}
352-
${HDF5_INCLUDE_DIRS}
353-
)
354-
set(PDC_EXT_LIB_DEPENDENCIES
355-
${PDC_EXT_LIB_DEPENDENCIES}
356-
${HDF5_LIBRARIES}
357-
)
358-
else()
359-
message(FATAL_ERROR "Could not find HDF5, please check HDF5_DIR.")
360-
endif()
361-
endif()
362-
endif()
363-
364325
#-----------------------------------------------------------------------------
365326
# DART Suffix Tree mode
366327
#-----------------------------------------------------------------------------
@@ -688,5 +649,4 @@ add_custom_target(format
688649
| xargs -0 clang-format -i -style=file && echo "... done"
689650
COMMENT "clang-format all source codes"
690651
VERBATIM
691-
)
692-
652+
)

src/tests/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ if(UUID_FOUND)
3030
endif(UUID_FOUND)
3131

3232
# *************************************************
33-
# * Find MERCURY
33+
# * MERCURY
3434
# *************************************************
35-
# Mercury
3635
find_package(MERCURY REQUIRED)
3736
if(MERCURY_FOUND)
3837
set(TEST_EXT_INCLUDE_DIRS ${MERCURY_INCLUDE_DIRS}
@@ -136,6 +135,13 @@ set(PROGRAMS
136135
query_data
137136
)
138137

138+
# TODO: Check if import_vpic.c is needed. If yes, we have to add the following :
139+
# if (HDF5_FOUND)
140+
# set(TEST_EXT_LIB ${HDF5_LIBRARIES} ${TEST_EXT_LIB})
141+
# set(TEST_EXT_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} ${TEST_EXT_INCLUDE_DIRS})
142+
# else ()
143+
# message(FATAL_ERROR "Could not find HDF5, please make sure that HDF5 has been compiled with shared libraries enabled.")
144+
# endif()
139145

140146

141147
foreach(program ${PROGRAMS})
@@ -212,12 +218,6 @@ foreach(script ${SCRIPTS})
212218
endforeach(script)
213219

214220

215-
# *******************************************
216-
# Add the HDF5 library for pdc-neon
217-
# *******************************************
218-
FIND_LIBRARY(HDF5_LIBRARY NAMES hdf5_debug PATHS $ENV{HOME}/lib)
219-
220-
221221
# *******************************************
222222
# Create a transform library which contains:
223223
# 1. compression/depression functions

src/tools/CMakeLists.txt

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,22 @@ include_directories(
1212
$ENV{HOME}/include
1313
)
1414

15-
set(EXT_LIB "")
16-
set(EXT_INCLUDE_DIRS "")
17-
18-
# *************************************************
19-
# * Find MERCURY
20-
# *************************************************
21-
# Mercury
22-
find_package(MERCURY REQUIRED)
23-
if(MERCURY_FOUND)
24-
set(EXT_INCLUDE_DIRS ${MERCURY_INCLUDE_DIRS}
25-
${EXT_INCLUDE_DIRS}
26-
)
27-
set(EXT_LIB ${MERCURY_LIBRARIES} ${EXT_LIB})
28-
endif()
29-
include_directories(${EXT_INCLUDE_DIRS})
30-
3115
set(PROGRAMS
3216
pdc_import
3317
pdc_export
3418
pdc_ls
3519
)
3620

3721
add_library(cjson cjson/cJSON.c)
38-
set(EXT_LIB cjson ${EXT_LIB})
3922

4023
foreach(program ${PROGRAMS})
4124
add_executable(${program} ${program}.c)
42-
target_link_libraries(${program} pdc pdc_commons ${EXT_LIB})
25+
target_link_libraries(${program} pdc)
26+
target_link_libraries(${program} cjson)
4327
endforeach(program)
4428

4529

46-
30+
# *******************************************
31+
# Add the HDF5 library for pdc-neon
32+
# *******************************************
33+
FIND_LIBRARY(HDF5_LIBRARY NAMES hdf5_debug PATHS $ENV{HOME}/lib)

0 commit comments

Comments
 (0)