Skip to content
Merged
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,8 @@ dlio_env
data/file_0_0.dat
*.csv
*.pfw*
poc/bpf-core/vmlinux.h
poc/bpf-core/vmlinux.h
deps

#nfs
*.nfs*
33 changes: 27 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,35 @@
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Current File",
"type": "python",
"type": "lldb",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"name": "Launch",
"program": "/usr/workspace/haridev/datacrumbs/deps/install/bin/bpftime",
"args": [
"--install-location",
"/usr/WS2/haridev/datacrumbs/deps/install/lib",
"load",
"/usr/workspace/haridev/datacrumbs/build/bin/datacrumbs",
"run",
"tuolumne-mpiio",
"--user",
"haridev",
"--config_path",
"/usr/workspace/haridev/datacrumbs/etc/datacrumbs/configs",
"--data_dir",
"/usr/workspace/haridev/datacrumbs/etc/datacrumbs/data",
"--trace_log_dir",
"/usr/workspace/haridev/datacrumbs/etc/datacrumbs/logs"
],
"env": {
"PYTHONPATH": "/home/cc/datacrumbs",
}
"BPFTIME_SHM_MEMORY_MB": "10240",
"BPFTIME_MAX_FD_COUNT": "128000",
"LD_LIBRARY_PATH": "/usr/workspace/haridev/datacrumbs/deps/install/lib:/usr/workspace/haridev/datacrumbs/build/lib:/usr/workspace/haridev/datacrumbs/build/deps/install/lib:/opt/cray/pe/gcc/11.2.0/snos/lib64:/opt/cray/pe/lib64:/opt/cray/lib64:/opt/cray/pe/papi/7.2.0.2/lib64:/opt/cray/libfabric/2.1/lib64"
},
"cwd": "${workspaceFolder}",
"initCommands": [
"settings set target.process.follow-fork-mode child"
]
}
]
}
71 changes: 66 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ if(CMAKE_INSTALL_LIBDIR AND NOT DATACRUMBS_LIBDIR_AS_LIB)
set(DATACRUMBS_INSTALL_DOCDIR
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR})
set(DATACRUMBS_INSTALL_SYSCONFDIR
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_SYSCONFDIR}/modulefiles)
set(DATACRUMBS_INSTALL_BINFDIR
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_SYSCONFDIR}/${PROJECT_NAME})
set(DATACRUMBS_INSTALL_BINARYDIR
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR})
set(DATACRUMBS_INSTALL_LIBEXEC
${CMAKE_INSTALL_PREFIX}/libexec/${PROJECT_NAME})
${CMAKE_INSTALL_PREFIX}/libexec/${PROJECT_NAME})
else()
set(DATACRUMBS_LIBDIR lib)
set(DATACRUMBS_INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
set(DATACRUMBS_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include")
set(DATACRUMBS_INSTALL_DOCDIR "${CMAKE_INSTALL_PREFIX}/doc")
set(DATACRUMBS_INSTALL_SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc/modulefiles")
set(DATACRUMBS_INSTALL_SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc/${PROJECT_NAME}")
set(DATACRUMBS_INSTALL_BINARYDIR "${CMAKE_INSTALL_PREFIX}/bin")
set(DATACRUMBS_INSTALL_LIBEXEC ${CMAKE_INSTALL_PREFIX}/libexec)
endif()
Expand Down Expand Up @@ -193,6 +193,28 @@ else()
set(DATACRUMBS_ENABLE 0)
endif()

# Detect system kernel version: major, minor, patch
execute_process(
COMMAND uname -r
OUTPUT_VARIABLE KERNEL_VERSION_STR
OUTPUT_STRIP_TRAILING_WHITESPACE
)

# Split kernel version string (e.g., "6.5.0-101-generic") into major, minor, patch
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" KERNEL_VERSION_MATCH "${KERNEL_VERSION_STR}")

if(KERNEL_VERSION_MATCH)
string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" KERNEL_VERSION_MAJOR "${KERNEL_VERSION_STR}")
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\..*" "\\1" KERNEL_VERSION_MINOR "${KERNEL_VERSION_STR}")
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" KERNEL_VERSION_PATCH "${KERNEL_VERSION_STR}")
else()
set(KERNEL_VERSION_MAJOR "0")
set(KERNEL_VERSION_MINOR "0")
set(KERNEL_VERSION_PATCH "0")
endif()

set(KERNEL_VERSION "(${KERNEL_VERSION_MAJOR}, ${KERNEL_VERSION_MINOR}, ${KERNEL_VERSION_PATCH})")

# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -293,6 +315,7 @@ message(STATUS " - DATACRUMBS_CONFIG_PATH: ${DATACRUMBS_CONFIG_PATH}
message(STATUS " - DATACRUMBS_LOG_DIR: ${DATACRUMBS_LOG_DIR}")
message(STATUS " - DATACRUMBS_DATA_DIR: ${DATACRUMBS_DATA_DIR}")
message(STATUS " - DATACRUMBS_ENABLE_INCLUSION_PATH: ${DATACRUMBS_ENABLE_INCLUSION_PATH}")
message(STATUS " - Kernel Version: ${KERNEL_VERSION_MAJOR}.${KERNEL_VERSION_MINOR}.${KERNEL_VERSION_PATCH}")
configure_file("${CMAKE_SOURCE_DIR}/cmake/configure_files/datacrumbs_config.h.in"
"${CMAKE_INCLUDE_OUTPUT_DIRECTORY}/datacrumbs/datacrumbs_config.h" @ONLY)

Expand All @@ -308,7 +331,7 @@ file(MAKE_DIRECTORY ${CMAKE_LIBEXEC_OUTPUT_DIRECTORY}/datacrumbs/server/bpf/)
# Find all dependencies
# ------------------------------------------------------------------------------
set(DEPENDENCY_LIBRARY_DIRS "")
set(DEPENDENCY_LIB ${CMAKE_EXE_LINKER_FLAGS} $ENV{LDFLAGS} -lpthread -static-libstdc++)
set(DEPENDENCY_LIB ${CMAKE_EXE_LINKER_FLAGS} $ENV{LDFLAGS} -lpthread)

message(STATUS "[${UPPER_PROJECT_NAME}] Detecting dependencies")

Expand Down Expand Up @@ -640,6 +663,11 @@ add_executable(${PROJECT_NAME} ${DATACRUMBS_PROCESS_EVENTS_SRC} ${DATACRUMBS_COM
target_link_libraries(${PROJECT_NAME} ${DEPENDENCY_LIB})
add_dependencies(${PROJECT_NAME} datacrumbs_bpf_skel)

# Install the main processing executable into DATACRUMBS_INSTALL_BINARYDIR
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION "${DATACRUMBS_INSTALL_BINARYDIR}"
)

set(DATACRUMBS_VALIDATE_BPF_SRC
${CMAKE_CURRENT_SOURCE_DIR}/src/datacrumbs/validator/bpf/probe.bpf.c
)
Expand Down Expand Up @@ -694,6 +722,35 @@ add_executable(${PROJECT_NAME}_validator ${DATACRUMBS_VALIDATOR_SRC} ${DATACRUMB
target_link_libraries(${PROJECT_NAME}_validator ${DEPENDENCY_LIB})
add_dependencies(${PROJECT_NAME}_validator datacrumbs_validator_bpf_skel)

# Install the main processing executable into DATACRUMBS_INSTALL_BINARYDIR
install(TARGETS ${PROJECT_NAME}_validator
RUNTIME DESTINATION "${DATACRUMBS_INSTALL_BINARYDIR}"
)

# Install host-specific config YAML
set(_DATACRUMBS_HOST_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/etc/datacrumbs/configs/${DATACRUMBS_HOST}.yaml")
if(EXISTS "${_DATACRUMBS_HOST_CONFIG}")
install(FILES "${_DATACRUMBS_HOST_CONFIG}"
DESTINATION "${DATACRUMBS_INSTALL_SYSCONFDIR}/configs"
)
else()
message(WARNING "[${UPPER_PROJECT_NAME}] Host config not found: ${_DATACRUMBS_HOST_CONFIG}; skipping install")
endif()

# Install host/user specific data JSON files
file(GLOB _DATACRUMBS_DATA_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/etc/datacrumbs/data/*${DATACRUMBS_USER}-${DATACRUMBS_HOST}*.json"
)

if(_DATACRUMBS_DATA_FILES)
install(FILES ${_DATACRUMBS_DATA_FILES}
DESTINATION "${DATACRUMBS_INSTALL_SYSCONFDIR}/data"
)
else()
message(WARNING "[${UPPER_PROJECT_NAME}] No data files matching pattern for user '${DATACRUMBS_USER}' and host '${DATACRUMBS_HOST}' found; skipping install.")
endif()


# ------------------------------------------------------------------------------
# Custom executables for Datacrumbs
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -722,6 +779,10 @@ add_test(NAME datacrumbs_start COMMAND ${CMAKE_BINARY_DIR}/bin/datacrumbs start
set_tests_properties(datacrumbs_start PROPERTIES DEPENDS datacrumbs_pretest)
set_tests_properties(datacrumbs_start PROPERTIES DEPENDS ${PROJECT_NAME})

add_test(NAME datacrumbs_run COMMAND ${CMAKE_BINARY_DIR}/bin/datacrumbs run ${DATACRUMBS_HOST} ${DATACRUMBS_VARS})
set_tests_properties(datacrumbs_run PROPERTIES DEPENDS datacrumbs_pretest)
set_tests_properties(datacrumbs_run PROPERTIES DEPENDS ${PROJECT_NAME})

add_test(NAME datacrumbs_stop COMMAND ${CMAKE_BINARY_DIR}/bin/datacrumbs stop ${DATACRUMBS_HOST} ${DATACRUMBS_VARS})
set_tests_properties(datacrumbs_stop PROPERTIES DEPENDS datacrumbs_pretest)
set_tests_properties(datacrumbs_stop PROPERTIES DEPENDS ${PROJECT_NAME})
Expand Down
7 changes: 7 additions & 0 deletions cmake/configure_files/datacrumbs_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
#define DATACRUMBS_ENABLE_INCLUSION_PATH 0
#endif

/* Kernel version */
#define DATACRUMBS_KERNEL_GET_VERSION(MAJOR, MINOR, PATCH) (MAJOR * 100000 + MINOR * 100 + PATCH)
#define DATACRUMBS_KERNEL_VERSION (DATACRUMBS_KERNEL_GET_VERSION @KERNEL_VERSION@)
#define DATACRUMBS_KERNEL_VERSION_MAJOR (DATACRUMBS_KERNEL_VERSION / 100000)
#define DATACRUMBS_KERNEL_VERSION_MINOR ((DATACRUMBS_KERNEL_VERSION / 100) % 1000)
#define DATACRUMBS_KERNEL_VERSION_PATCH (DATACRUMBS_KERNEL_VERSION % 100)

/* clang-format on */

#endif // DATACRUMBS_CONFIG_HPP
28 changes: 28 additions & 0 deletions docs/app.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Install IOR
===========

IOR is a parallel file system benchmarking tool. To install IOR, follow these steps:

1. **Clone the IOR repository:**

.. code-block:: bash

git clone https://github.com/hpc/ior.git
cd ior

2. **Build IOR:**

.. code-block:: bash

./bootstrap
./configure --prefix=$PREFIX
make -j
make install

3. **(Optional) Install system-wide:**

.. code-block:: bash

sudo make install

For more details, refer to the official IOR documentation: https://github.com/hpc/ior
Loading