Skip to content
Commits on Source (10)
......@@ -28,3 +28,6 @@
[submodule "external/GSL"]
path = external/GSL
url = https://github.com/microsoft/GSL
[submodule "external/pybind11"]
path = external/pybind11
url = https://github.com/pybind/pybind11.git
......@@ -37,6 +37,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Logging uses a higher FD limit ([!259](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/259))
- Avoid throwing runtime error if the fd is invalid (may happen on destruction)
- Updated spack for 0.9.4 ([!260](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/260))
- Updated deps to support GCC-15 ([!262](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/262))
### Fixed
- Dup3 is supported if O_CLOEXEC is not used (i.e. hexdump) ([!228](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/228))
......
......@@ -248,6 +248,13 @@ gkfs_define_option(
DEFAULT_VALUE ON
)
#build python bindings
gkfs_define_option(
GKFS_BUILD_PYTHON_BINDINGS
HELP_TEXT "Build Python bindings package with pybind11"
DEFAULT_VALUE OFF
)
# use old resolve function
gkfs_define_option(
GKFS_USE_LEGACY_PATH_RESOLVE
......
......@@ -261,6 +261,16 @@ if (GKFS_ENABLE_CLIENT_METRICS)
)
endif ()
if (GKFS_BUILD_PYTHON_BINDINGS)
### pybind11: for Python bindings
include_from_source(pybind11
MESSAGE "[${PROJECT_NAME}] Searching for pybind11"
SOURCE_DIR ${GKFS_DEPENDENCIES_PATH}/pybind11
GIT_REPOSITORY https://github.com/pybind/pybind11.git
GIT_TAG v2.12.0
)
endif ()
### GSL: Guidelines Support Library
include_from_source(gsl
MESSAGE "[${PROJECT_NAME}] Searching for GSL"
......
......@@ -58,7 +58,7 @@ COPY --from=builder /usr/local/lib/external /root/wacommplusplus/build/external/
WORKDIR /root/wacommplusplus/build/example
RUN mkdir -p input processed output restarts && \
cd input && \
wget -q https://api.meteo.uniparthenope.it/files/rms3/d03/history/2025/01/01/rms3_d03_20250101Z0000.nc && \
wget --no-check-certificate -q https://api.meteo.uniparthenope.it/files/rms3/d03/history/2025/01/01/rms3_d03_20250101Z0000.nc && \
mv rms3_d03_20250101Z0000.nc input.nc && \
ncks -7 -L 9 --qnt default=1 --ppc default=1 input.nc rms3_d03_20250101Z0000.nc && \
tar cvzf rms.tar.gz rms3_d03_20250101Z0000.nc && \
......
......@@ -24,25 +24,25 @@ on the specifics of the particular GekkoFS build, both scripts rely on
:code:`configuration profiles` which define a set of related software
packages which should be downloaded and installed for a specific GekkoFS
version and/or configuration. To illustrate this, let's take a look at the
contents of the :code:`default` profile for GekkoFS version :code:`0.9.4`:
contents of the :code:`default` profile for GekkoFS version :code:`0.9.5`:
.. code-block:: console
$ dl_dep.sh -l default:0.9.4
Configuration profiles for '0.9.4':
$ dl_dep.sh -l default:0.9.5
Configuration profiles for '0.9.5':
* default:0.9.4 (/home/user/gekkofs/source/scripts/profiles/0.9.4/default.specs)
* default:0.9.5 (/home/user/gekkofs/source/scripts/profiles/0.9.5/default.specs)
All dependencies
lz4: 1.9.3
capstone: 6.0.0-Alpha1
json-c: 0.15-20200726
libfabric: HEAD@v1.20.1
mercury: v2.4.0
json-c: 0.17-20230812
libfabric: HEAD@v2.2.0
mercury: v2.4.1rc1
argobots: 1.2
margo: v0.18.3
rocksdb: 8.10.0
rocksdb: 10.4.2
syscall_intercept: d8b2a69961921ed123625c79a609331fc56a8931
......@@ -58,10 +58,10 @@ supercomputer) followed by an optional :code:`VERSION_TAG`.
.. code-block:: console
$ ./dl_dep.sh -p default:0.9.4 /home/user/gfks/deps
$ ./dl_dep.sh -p default:0.9.5 /home/user/gfks/deps
Destination path is set to "/tmp/foo"
Profile name: default
Profile version: 0.9.4
Profile version: 0.9.5
------------------------------------
Downloaded 'https://github.com/lz4/lz4/archive/v1.9.4.tar.gz' to 'lz4'
Downloaded 'https://github.com/json-c/json-c/archive/json-c-0.17-20230812.tar.gz' to 'json-c'
......@@ -80,10 +80,10 @@ option. In this case, dependency names follow the
.. code-block:: console
$ ./dl_dep.sh -d mercury@default:0.9.4 /home/user/gfks/deps
$ ./dl_dep.sh -d mercury@default:0.9.5 /home/user/gfks/deps
Destination path is set to "/tmp/foo"
Profile name: default
Profile version: 0.9.3
Profile version: 0.9.5
------------------------------------
Cloned 'https://github.com/mercury-hpc/mercury' to 'mercury' with commit '[v2.4.0]' and flags '--recurse-submodules'
Done
......@@ -105,12 +105,12 @@ certain directory (e.g. :code:`/home/user/gkfs/deps`), the
.. code-block:: console
$ ./compile_dep.sh -p default:0.9.4 /home/user/gkfs/deps /home/user/gkfs/install -j8
$ ./compile_dep.sh -p default:0.9.5 /home/user/gkfs/deps /home/user/gkfs/install -j8
CORES = 8 (default)
Sources download path = /tmp/foo
Installation path = /tmp/bar
Profile name: default
Profile version: 0.9.4
Profile version: 0.9.5
------------------------------------
######## Installing: lz4 ###############################
...
......
import gkfs_python as gk
import os
import stat as st
def main():
gk.init()
path = "/testfile"
path_create_delete = "/testfile2"
symlink_path = "/test_symlink"
renamed_path = "/testfile_renamed"
fd = gk.create(path_create_delete, 0o644)
print(f"Created file: {path_create_delete}, fd={fd}")
gk.remove(path_create_delete)
print(f"Deleted file: {path_create_delete}, fd={fd}")
fd = gk.create(path, 0o644)
fd = gk.open(path, os.O_CREAT | os.O_RDWR, st.S_IRUSR | st.S_IWUSR)
print(f"Open file: {path}, fd={fd}")
print(gk.get_file_list("/"))
gk.write(fd, b"Test GekkoFS!")
print(f"write success")
gk.lseek(fd, 0, os.SEEK_SET)
print(f"lseek success")
data = gk.read(fd, 16)
print(f"Read data: {data}")
gk.pwrite(fd, b"Hello", 0)
print(f"pwrite success")
gk.lseek(fd, 0, os.SEEK_SET)
data = gk.read(fd, 16)
print(f"Read data: {data}")
read_data = gk.pread(fd, 5, 5)
print(f"Pread data: {read_data}")
gk.lseek(fd, 0, os.SEEK_SET)
# TODO
#gk.writev(fd, [b"ABC", b"DEF"])
data_readv = gk.readv(fd, 2)
print(f"Readv data: {data_readv}")
# TODO
#gk.pwritev(fd, [b"ghi", b"jkl"], 3)
data_preadv = gk.preadv(fd, 2, 0)
print(f"Preadv data: {data_preadv}")
dup_fd = gk.dup(fd)
dup2_fd = gk.dup2(fd, dup_fd + 1)
print(f"Duplicated fds: {dup_fd}, {dup2_fd}")
gk.fsync(fd)
res, stat = gk.stat(path, True, False)
print(f"Stat result: {stat}")
res, statx = gk.statx(-1, path, 0, 0xFFF, True)
print(f"Statx result: {statx}")
accessible = gk.access(path, os.R_OK | os.W_OK)
print(f"Access check (R_OK|W_OK): {accessible}")
file_list = gk.get_file_list("/")
print(f"File list: {file_list}")
gk.close(fd)
gk.close(dup_fd)
gk.close(dup2_fd)
gk.truncate(path, 5)
addr = gk.mmap(0, 4096, 1 | 2, 2, gk.open(path, os.O_RDWR, 0), 0)
gk.msync(addr, 4096, 0)
gk.munmap(addr, 4096)
print("mmap/msync/munmap done")
# Symlink if available
try:
gk.mk_symlink(path, symlink_path)
target = gk.readlink(symlink_path, 1024)
print(f"Symlink points to: {target}")
except Exception:
print("Symlink not supported or failed.")
# Rename if available
try:
gk.rename(path, renamed_path)
print(f"Renamed {path} to {renamed_path}")
except Exception:
print("Rename not supported or failed.")
file_list = gk.get_file_list("/")
print(f"File list: {file_list}")
gk.remove(renamed_path)
print(f"Removed {renamed_path}")
file_list = gk.get_file_list("/")
print(f"File list: {file_list}")
gk.end()
if __name__ == "__main__":
main()
Subproject commit 4dc4aca2e120180e6bb48c076986feff41b4f5fb
......@@ -460,7 +460,7 @@ format_clone_flags_arg_to(FmtBuffer& buffer, const printable_arg& parg) {
template <typename FmtBuffer>
inline void
format_clone3_args_arg_to(FmtBuffer& buffer, const printable_arg& parg) {
#ifdef SYS_clone3
// struct clone_args {
// u64 flags; /* Flags bit mask */
// u64 pidfd; /* Where to store PID file descriptor
......@@ -529,7 +529,7 @@ format_clone3_args_arg_to(FmtBuffer& buffer, const printable_arg& parg) {
// set_tid size and cgroup
fmt::format_to(std::back_inserter(buffer), ",{}={}", "set_tid_size", ca->set_tid_size);
fmt::format_to(std::back_inserter(buffer), ",{}={}", "cgroup", ca->cgroup);
#endif
return;
......
......@@ -40,14 +40,14 @@ wgetdeps=(
["lz4"]="1.9.4"
["capstone"]="6.0.0-Alpha1"
["argobots"]="1.2"
["rocksdb"]="8.10.0"
["rocksdb"]="10.4.2"
["json-c"]="0.17-20230812"
)
# Dependencies that must be cloned
clonedeps=(
["libfabric"]="HEAD@v1.20.1"
["mercury"]="v2.4.0"
["libfabric"]="HEAD@v2.2.0"
["mercury"]="v2.4.1rc1"
["margo"]="v0.18.3"
["syscall_intercept"]="d8b2a69961921ed123625c79a609331fc56a8931"
["agios"]="c26a6544200f823ebb8f890dd94e653d148bf226@development"
......
......@@ -38,15 +38,15 @@ comment="Dependencies required by the CI"
# Dependencies that must be downloaded directly
wgetdeps=(
["argobots"]="1.2"
["rocksdb"]="8.10.0"
["rocksdb"]="10.4.2"
["prometheus-cpp"]="v1.0.0"
["capstone"]="6.0.0-Alpha1"
)
# Dependencies that must be cloned
clonedeps=(
["libfabric"]="HEAD@v1.20.1"
["mercury"]="v2.4.0"
["libfabric"]="HEAD@v2.2.0"
["mercury"]="v2.4.1rc1"
["margo"]="v0.18.3"
["syscall_intercept"]="d8b2a69961921ed123625c79a609331fc56a8931"
["agios"]="c26a6544200f823ebb8f890dd94e653d148bf226@development"
......
......@@ -40,14 +40,14 @@ wgetdeps=(
["lz4"]="1.9.4"
["capstone"]="6.0.0-Alpha1"
["argobots"]="1.2"
["rocksdb"]="8.10.0"
["rocksdb"]="10.4.2"
["json-c"]="0.17-20230812"
)
# Dependencies that must be cloned.
clonedeps=(
["libfabric"]="HEAD@v1.20.1"
["mercury"]="v2.4.0"
["libfabric"]="HEAD@v2.2.0"
["mercury"]="v2.4.1rc1"
["margo"]="v0.18.3"
["syscall_intercept"]="d8b2a69961921ed123625c79a609331fc56a8931"
)
......
......@@ -40,7 +40,7 @@ wgetdeps=(
["lz4"]="1.9.4"
["capstone"]="6.0.0-Alpha1"
["argobots"]="1.2"
["rocksdb"]="8.10.0"
["rocksdb"]="10.4.2"
["json-c"]="0.17-20230812"
["libzmq"]="4.3.5"
["cppzmq"]="4.10.0"
......@@ -48,8 +48,8 @@ wgetdeps=(
# Dependencies that must be cloned.
clonedeps=(
["libfabric"]="HEAD@v1.20.1"
["mercury"]="v2.4.0"
["libfabric"]="HEAD@v2.2.0"
["mercury"]="v2.4.1rc1"
["margo"]="v0.18.3"
["syscall_intercept"]="d8b2a69961921ed123625c79a609331fc56a8931"
)
......
......@@ -40,14 +40,14 @@ wgetdeps=(
["lz4"]="1.9.4"
["capstone"]="6.0.0-Alpha1"
["argobots"]="1.2"
["rocksdb"]="8.10.0"
["rocksdb"]="10.4.2"
["json-c"]="0.17-20230812"
)
# Dependencies that must be cloned
clonedeps=(
["libfabric%verbs"]="HEAD@v1.20.1"
["mercury"]="v2.4.0"
["libfabric%verbs"]="HEAD@v2.2.0"
["mercury"]="v2.4.1rc1"
["margo"]="v0.18.3"
["syscall_intercept"]="d8b2a69961921ed123625c79a609331fc56a8931"
)
......
......@@ -47,7 +47,7 @@ pkg_install() {
CURR="${SOURCE_DIR}/json-c"
prepare_build_dir "${CURR}"
cd "${CURR}/build"
cmake -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" -DCMAKE_BUILD_TYPE:STRING=Release ..
cmake -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
make -j"${CORES}" install
# Margo doesn't search in both directories, so we make it available in both lib and lib64
if [[ -f "${INSTALL_DIR}/lib64/pkgconfig/json-c.pc" ]]; then
......
......@@ -62,7 +62,7 @@ pkg_install() {
CURR="${SOURCE_DIR}/${ID}"
prepare_build_dir "${CURR}"
cd "${CURR}/build"
PKG_CONFIG_PATH="${INSTALL_DIR}/lib/pkgconfig" $CMAKE \
$CMAKE \
-DCMAKE_PREFIX_PATH=${INSTALL_DIR} \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_TESTING:BOOL=ON \
......
......@@ -61,7 +61,7 @@ pkg_install() {
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DBUILD_EXAMPLES:BOOL=OFF \
-DSTATIC_CAPSTONE:BOOL=OFF \
-DBUILD_TESTS:BOOK=OFF ..
-DBUILD_TESTS:BOOK=OFF -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
make -j"${CORES}" install
if [[ ${EXTRA_INSTALL_ARGS} == "ARM64" ]]; then
cp "${CURR}"/arch/aarch64/include/libsyscall_intercept_hook_point.h ${INSTALL_DIR}/include
......
......@@ -39,17 +39,17 @@ comment="Dependencies for Mogon 2 supercomputer"
wgetdeps=(
["lz4"]="1.9.4"
["capstone"]="6.0.0-Alpha1"
["argobots"]="1.1"
["rocksdb"]="8.10.0"
["argobots"]="1.2"
["rocksdb"]="10.4.2"
["psm2"]="11.2.185"
["json-c"]="0.17-20230812"
)
# Dependencies that must be cloned
clonedeps=(
["libfabric"]="HEAD@v1.20.1"
["mercury"]="v2.3.1"
["margo"]="v0.15.0"
["libfabric"]="HEAD@v2.2.0"
["mercury"]="v2.4.1rc1"
["margo"]="v0.18.3"
["syscall_intercept"]="d8b2a69961921ed123625c79a609331fc56a8931"
["date"]="e7e1482087f58913b80a20b04d5c58d9d6d90155"
)
......
......@@ -40,7 +40,7 @@ wgetdeps=(
["lz4"]="1.9.4"
["capstone"]="6.0.0-Alpha1"
["argobots"]="1.2"
["rocksdb"]="8.10.0"
["rocksdb"]="10.4.2"
["json-c"]="0.17-20230812"
["libzmq"]="4.3.5"
["cppzmq"]="4.10.0"
......@@ -49,7 +49,7 @@ wgetdeps=(
# Dependencies that must be cloned
clonedeps=(
# ["libfabric"]="HEAD@v1.20.1"
["mercury"]="v2.4.0"
["mercury"]="v2.4.1rc1"
["margo"]="v0.18.3"
["syscall_intercept"]="d8b2a69961921ed123625c79a609331fc56a8931"
)
......
......@@ -40,15 +40,15 @@ wgetdeps=(
["lz4"]="1.9.4"
["capstone"]="6.0.0-Alpha1"
["argobots"]="1.2"
["rocksdb"]="8.10.0"
["rocksdb"]="10.4.2"
["json-c"]="0.17-20230812"
["psm2"]="11.2.185"
)
# Dependencies that must be cloned
clonedeps=(
["libfabric"]="HEAD@v1.20.1"
["mercury"]="v2.4.0"
["libfabric"]="HEAD@v2.2.0"
["mercury"]="v2.4.1rc1"
["margo"]="v0.18.3"
["syscall_intercept"]="d8b2a69961921ed123625c79a609331fc56a8931"
["date"]="e7e1482087f58913b80a20b04d5c58d9d6d90155"
......