Commit 9e604763 authored by Ramon Nou's avatar Ramon Nou
Browse files

Dataclay minimal support integrated

parent 9173c21c
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -285,10 +285,13 @@ endif()
find_package(DataClay)
find_package(DataClay)
if (DataClay_FOUND)
if (DataClay_FOUND)
  add_compile_definitions(DATACLAY_PLUGIN)
  add_compile_definitions(DATACLAY_PLUGIN)
  add_compile_definitions(DataClay_PATH="${DataClay_MODEL_DIR}/dataclay-plugin")
  message(STATUS "[${PROJECT_NAME}] Found DataClay")
  message(STATUS "[${PROJECT_NAME}] Found DataClay")
endif()
endif()






### Threads: required by ASIO
### Threads: required by ASIO
find_package(Threads REQUIRED)
find_package(Threads REQUIRED)


+2 −2
Original line number Original line Diff line number Diff line
@@ -190,8 +190,8 @@ cli/ccp --server ofi+tcp://127.0.0.1:62000 --input /directory/subdir --output /d
`--if or --of` can be: posix, gekkofs, hercules, dataclay, expand and parallel (for MPIIO requests, but only one side is allowed).
`--if or --of` can be: posix, gekkofs, hercules, dataclay, expand and parallel (for MPIIO requests, but only one side is allowed).


Typically you should use posix or parallel and then one specialized adhocfs. Posix is also able to be used with LD_PRELOAD, however
Typically you should use posix or parallel and then one specialized adhocfs. Posix is also able to be used with LD_PRELOAD, however
higher performance and flexibility can be obtained using the specific configuration.
higher performance and flexibility can be obtained using the specific configuration. Some backends are only available with directory support for stage-in. 


On the other hand, MPIIO (parallel) uses normally file locking so there is a performance imapact, and posix is faster (we supose no external modifications are done).
On the other hand, MPIIO (parallel) uses normally file locking so there is a performance imapact, and posix is faster (we supose no external modifications are done).


Other commands are `ping`, `shutdown` and `shaping` (for bw control).
Other commands are `ping`, `shutdown`, `shaping` (for bw control) and `cargo_ftio` to interactions with ftio (stage-out and gekkofs)
 No newline at end of file
 No newline at end of file
+15 −2
Original line number Original line Diff line number Diff line
@@ -25,8 +25,20 @@


find_path(DataClay_INCLUDE_DIR
find_path(DataClay_INCLUDE_DIR
  NAMES dataclayplugin.h
  NAMES dataclayplugin.h
  PREFIX dataclay-plugin
)
)


find_path(DataClay_MODEL_DIR
  NAMES client.py
  PREFIX dataclay-plugin
)
message(STATUS "[${PROJECT_NAME}] DataClay library MODEL DIR ${DataClay_MODEL_DIR}")

find_package(Python3 REQUIRED Development)
message(STATUS "[${PROJECT_NAME}] DataClay library needs Python include ${Python3_INCLUDE_DIRS}")



find_library(DataClay_LIBRARY
find_library(DataClay_LIBRARY
  NAMES dataclay-plugin/libdataclayplugin.so
  NAMES dataclay-plugin/libdataclayplugin.so
)
)
@@ -37,6 +49,7 @@ find_package_handle_standard_args(
	DEFAULT_MSG
	DEFAULT_MSG
	DataClay_INCLUDE_DIR
	DataClay_INCLUDE_DIR
	DataClay_LIBRARY
	DataClay_LIBRARY
	DataClay_MODEL_DIR
)
)


if(DataClay_FOUND)
if(DataClay_FOUND)
@@ -48,7 +61,7 @@ if(DataClay_FOUND)
	  add_library(DataClay::DataClay UNKNOWN IMPORTED)
	  add_library(DataClay::DataClay UNKNOWN IMPORTED)
	  set_target_properties(DataClay::DataClay PROPERTIES
	  set_target_properties(DataClay::DataClay PROPERTIES
		IMPORTED_LOCATION "${DataClay_LIBRARY}"
		IMPORTED_LOCATION "${DataClay_LIBRARY}"
		INTERFACE_INCLUDE_DIRECTORIES "${DataClay_INCLUDE_DIR}"
		INTERFACE_INCLUDE_DIRECTORIES "${DataClay_INCLUDE_DIR};${Python3_INCLUDE_DIRS}"
	  )
	  )
	endif()
	endif()
endif()
endif()
+4 −7
Original line number Original line Diff line number Diff line
@@ -7,15 +7,15 @@ extern "C" {
#include <iostream>
#include <iostream>
namespace cargo {
namespace cargo {
dataclay_plugin::dataclay_plugin() {
dataclay_plugin::dataclay_plugin() {
    ::dataclay_plugin("cargo");
    ::dataclay_plugin("cargo", DataClay_PATH);
    std::cout << "dataclay_plugin loaded" << std::endl;
}
}


dataclay_plugin::~dataclay_plugin() {}
dataclay_plugin::~dataclay_plugin() {}
// Override the open function
// Override the open function
int
int
dataclay_plugin::open(const std::string& path, int flags, unsigned int mode) {
dataclay_plugin::open(const std::string& path, int flags, unsigned int mode) {
    // Call to dataclayfs has the signature inverted
    return dataclay_open((char *)path.c_str(), flags, mode);
    return dataclay_open(path.c_str(), flags, mode);
}
}


// Override the pread function
// Override the pread function
@@ -27,14 +27,12 @@ dataclay_plugin::pread(int fd, void* buf, size_t count, off_t offset) {
// Override the pwrite function
// Override the pwrite function
ssize_t
ssize_t
dataclay_plugin::pwrite(int fd, const void* buf, size_t count, off_t offset) {
dataclay_plugin::pwrite(int fd, const void* buf, size_t count, off_t offset) {
    int result = dataclay_pwrite(fd, (char*) buf, count, offset);
    return dataclay_pwrite(fd, (char*) buf, count, offset);
    return result;
}
}




bool
bool
dataclay_plugin::mkdir(const std::string& path, mode_t mode) {
dataclay_plugin::mkdir(const std::string& path, mode_t mode) {
    // int result = gkfs::syscall::gkfs_create(path, mode | S_IFDIR);
    (void) path;
    (void) path;
    (void) mode;
    (void) mode;
    return true; // We don't have directories
    return true; // We don't have directories
@@ -61,7 +59,6 @@ dataclay_plugin::fallocate(int fd, int mode, off_t offset, off_t len) {
    (void) mode;
    (void) mode;
    (void) offset;
    (void) offset;
    (void) len;
    (void) len;
    std::cerr << "dataclay_plugin fallocate not supported" << std::endl;
    return len;
    return len;
}
}