-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,755 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
set(HERMES_VFD_DIR ${HERMES_ADAPTER_DIR}/vfd) | ||
|
||
set(hermes_vfd_tests | ||
hermes_vfd_test | ||
) | ||
|
||
foreach(vfd_test ${hermes_vfd_tests}) | ||
add_executable(${vfd_test} ${CMAKE_CURRENT_SOURCE_DIR}/${vfd_test}.cc) | ||
add_dependencies(${vfd_test} hermes) | ||
target_include_directories(${vfd_test} PRIVATE ${HERMES_VFD_DIR}) | ||
target_include_directories(${vfd_test} | ||
SYSTEM PUBLIC ${HDF5_HERMES_VFD_EXT_INCLUDE_DEPENDENCIES} | ||
) | ||
target_link_libraries(${vfd_test} | ||
MPI::MPI_CXX | ||
hermes | ||
${HDF5_HERMES_VFD_EXPORTED_LIBS} | ||
${HDF5_HERMES_VFD_EXT_LIB_DEPENDENCIES} | ||
${HDF5_HERMES_VFD_EXT_PKG_DEPENDENCIES} | ||
) | ||
add_test(NAME "Test${vfd_test}" COMMAND ${vfd_test}) | ||
set_property(TEST "Test${vfd_test}" | ||
PROPERTY ENVIRONMENT HERMES_CONF=${CMAKE_CURRENT_SOURCE_DIR}/hermes.conf) | ||
set_property(TEST "Test${vfd_test}" APPEND | ||
PROPERTY ENVIRONMENT LSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/test/data/asan.supp) | ||
endforeach() | ||
|
||
# IOR tests | ||
if(HERMES_HAVE_IOR) | ||
add_test(NAME "TestVFDWrite" COMMAND ${IOR_EXE} -a HDF5 -w -W -r -R) | ||
set_property(TEST "TestVFDWrite" | ||
PROPERTY ENVIRONMENT HERMES_CONF=${CMAKE_CURRENT_SOURCE_DIR}/hermes.conf) | ||
set_property(TEST "TestVFDWrite" APPEND | ||
PROPERTY ENVIRONMENT HDF5_PLUGIN_PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
set_property(TEST "TestVFDWrite" APPEND | ||
PROPERTY ENVIRONMENT HDF5_DRIVER_CONFIG=true\ 1024) | ||
set_property(TEST "TestVFDWrite" APPEND | ||
PROPERTY ENVIRONMENT HDF5_DRIVER=hermes) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
num_devices = 4; | ||
num_targets = 4; | ||
|
||
capacities_mb = {50, 50, 50, 50}; | ||
block_sizes_kb = {1, 1, 1, 1}; | ||
num_slabs = {1, 1, 1, 1}; | ||
|
||
slab_unit_sizes = { | ||
{1}, | ||
{1}, | ||
{1}, | ||
{1}, | ||
}; | ||
|
||
desired_slab_percentages = { | ||
{1}, | ||
{1}, | ||
{1}, | ||
{1}, | ||
}; | ||
|
||
bandwidths_mbps = {6000, 300, 150, 70}; | ||
latencies_us = {15, 250000, 500000, 1000000}; | ||
|
||
buffer_pool_arena_percentage = 0.85; | ||
metadata_arena_percentage = 0.04; | ||
transient_arena_percentage = 0.11; | ||
|
||
max_buckets_per_node = 16; | ||
max_vbuckets_per_node = 8; | ||
system_view_state_update_interval_ms = 1000; | ||
|
||
mount_points = {"", "./", "./", "./"}; | ||
is_shared_device = {0, 0, 0, 0}; | ||
swap_mount = "./"; | ||
num_buffer_organizer_retries = 3; | ||
rpc_server_base_name = "localhost"; | ||
rpc_server_suffix = ""; | ||
rpc_protocol = "ofi+sockets"; | ||
rpc_domain = ""; | ||
rpc_port = 8080; | ||
buffer_organizer_port = 8081; | ||
rpc_host_number_range = {}; | ||
rpc_num_threads = 1; | ||
buffer_organizer_num_threads = 4; | ||
buffer_pool_shmem_name = "/hermes_buffer_pool_"; | ||
default_placement_policy = "RoundRobin"; | ||
default_rr_split = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#include <stdio.h> | ||
#include <string.h> | ||
#include <stdlib.h> | ||
#include <unistd.h> | ||
#include <assert.h> | ||
|
||
#include <mpi.h> | ||
#include <hdf5.h> | ||
/* HDF5 header for dynamic plugin loading */ | ||
#include <H5PLextern.h> | ||
|
||
#include "H5FDhermes.h" | ||
|
||
void AssertFunc(bool expr, const char *file, int lineno, const char *message) { | ||
if (!expr) { | ||
fprintf(stderr, "Assertion failed at %s: line %d: %s\n", file, lineno, | ||
message); | ||
exit(-1); | ||
} | ||
} | ||
|
||
#define Assert(expr) AssertFunc((expr), __FILE__, __LINE__, #expr) | ||
|
||
int main(int argc, char *argv[]) { | ||
hid_t file_id; | ||
hid_t dset_id; | ||
hid_t dataspace_id; | ||
hid_t fapl_id; | ||
hsize_t dims[2]; | ||
const char *file_name = "hermes_test.h5"; | ||
const int kNx = 128; | ||
const int kNy = 128; | ||
int data_in[kNx][kNy]; /* data to write */ | ||
int data_out[kNx][kNy]; /* data to read */ | ||
int i, j; | ||
|
||
int mpi_threads_provided; | ||
MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &mpi_threads_provided); | ||
if (mpi_threads_provided < MPI_THREAD_MULTIPLE) { | ||
fprintf(stderr, | ||
"Didn't receive appropriate MPI threading specification\n"); | ||
return 1; | ||
} | ||
|
||
const char kDatasetName[] = "IntArray"; | ||
dims[0] = kNx; | ||
dims[1] = kNy; | ||
|
||
Assert((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) >= 0); | ||
Assert(H5Pset_fapl_hermes(fapl_id, true, 1024) >= 0); | ||
|
||
Assert((file_id = H5Fcreate(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, | ||
fapl_id)) >= 0); | ||
Assert((dataspace_id = H5Screate_simple(2, dims, NULL)) >= 0); | ||
dset_id = H5Dcreate(file_id, kDatasetName, H5T_NATIVE_INT, dataspace_id, | ||
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); | ||
Assert(dset_id >= 0); | ||
|
||
for (j = 0; j < kNx; j++) { | ||
for (i = 0; i < kNy; i++) { | ||
data_in[j][i] = i + j; | ||
data_out[j][i] = 0; | ||
} | ||
} | ||
|
||
Assert(H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, | ||
data_in) >= 0); | ||
Assert(H5Dclose(dset_id) >= 0); | ||
Assert(H5Fclose(file_id) >= 0); | ||
|
||
hid_t fid; | ||
Assert((fid = H5Fopen(file_name, H5F_ACC_RDONLY, H5P_DEFAULT)) >= 0); | ||
Assert((dset_id = H5Dopen(fid, kDatasetName, H5P_DEFAULT)) >= 0); | ||
Assert(H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, | ||
data_out) >= 0); | ||
|
||
for (j = 0; j < kNx; j++) { | ||
for (i = 0; i < kNy; i++) { | ||
Assert(data_out[j][i] == data_in[j][i]); | ||
} | ||
} | ||
|
||
Assert(H5Dclose(dset_id) >= 0); | ||
Assert(H5Fclose(fid) >= 0); | ||
Assert(H5Sclose(dataspace_id) >= 0); | ||
Assert(H5Pclose(fapl_id) >= 0); | ||
remove(file_name); | ||
|
||
return 0; | ||
} |
Oops, something went wrong.