Skip to content

Commit

Permalink
update cmakelist for hiredis
Browse files Browse the repository at this point in the history
  • Loading branch information
Change72 committed Jun 24, 2024
1 parent dc95c5c commit 5f58fe8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,10 @@ CMakeSettings.json
# Python wheels stuff

*.egg-info/


build-*/
cmake-build-*/
.idea/
.vscode/
*.rdb
9 changes: 6 additions & 3 deletions examples/cache/build_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,27 @@ build_cache() {

make -j32
make install
cd -
cd ${BUILD_DIR}/../
}

start_services() {
echo "Starting redis server and setting environment variables..."
nohup ${SW_DIR}/redis/src/redis-server > ${SW_DIR}redis_server.log 2>&1 &
nohup ${SW_DIR}/adios2/bin/remote_server > ${SW_DIR}remote_server.log 2>&1 &
export DoRemote=1
export useKVCache=1
export PYTHONPATH=${SW_DIR}/adios2/local/lib/python3.10/dist-packages/
export LD_LIBRARY_PATH=${SW_DIR}/adios2/lib:${SW_DIR}/hiredis/lib:$LD_LIBRARY_PATH
nohup ${SW_DIR}/redis/src/redis-server > ${SW_DIR}redis_server.log 2>&1 &
nohup ${SW_DIR}/adios2/bin/adios2_remote_server > ${SW_DIR}remote_server.log 2>&1 &
sleep 5
nohup ${SW_DIR}/redis/src/redis-cli monitor > ${SW_DIR}redis_monitor.log 2>&1 &
echo "Services started and environment variables set."
}

# Function to stop services (optional, example purpose)
stop_services() {
echo "Stopping services..."
pkill -f redis-server
pkill -f redis-cli
pkill -f remote_server
unset DoRemote
unset useKVCache
Expand Down
7 changes: 7 additions & 0 deletions source/adios2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,13 @@ if (ADIOS2_HAVE_KVCACHE)
target_sources(adios2_core PRIVATE toolkit/cache/KVCacheCommon.h
toolkit/cache/KVCacheCommon.tcc)
target_link_libraries(adios2_core PRIVATE hiredis::hiredis)

# Ensure the rpath is set correctly
# message(STATUS "PACKAGE_PREFIX_DIR: ${PACKAGE_PREFIX_DIR}")
set_target_properties(adios2_core PROPERTIES
BUILD_RPATH "$ORIGIN:${PACKAGE_PREFIX_DIR}/lib"
INSTALL_RPATH "$ORIGIN:${PACKAGE_PREFIX_DIR}/lib"
)
endif ()

if(ADIOS2_HAVE_Campaign)
Expand Down

0 comments on commit 5f58fe8

Please sign in to comment.