Skip to content
Snippets Groups Projects
Commit de7d5d20 authored by William F Godoy's avatar William F Godoy
Browse files

Merge remote-tracking branch 'upstream/master' into bp1read

Conflicts:
	examples/hello/datamanReader/helloDataManReader.cpp
	source/adios2/engine/dataman/DataManReader.cpp
	source/adios2/toolkit/transport/wan/WANZmq.cpp
	source/adios2/toolkit/transportman/dataman/DataMan.cpp
parents 84bd6856 c57d4a0c
No related branches found
No related tags found
1 merge request!294Bp1read : Initial Reading Capabilities and latest API
Showing
with 964 additions and 81 deletions
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#.rst:
# EnvironmentModules
# ------------------
#
# Make environment module commands available to CMake scripts. This module
# is compatible with both Lua based Lmod and TCL based EnvironmentModules
#
# Module Command
# ^^^^^^^^^^^^^^
#
# This module searched for the module command in the following variable:
#
# ::
#
# MODULE_COMMAND - The low level module command to use. Currently supported
# are implementations are the Lua based Lmod and TCL based
# EnvironmentModules. The ENV{MODULESHOME} variable,
# usually set by the module environment, is used as a hint
# to locate the command.
#
# Provided Functions
# ^^^^^^^^^^^^^^^^^^
#
# This module defines the following functions:
#
# ::
#
# module(...) - Execute an arbitry module command
# module_swap(out_mod in_mod) - Swap out one currently loaded module for
# another
# module_list(out_var) - Retrieve the currently loaded modules,
# making the output available as a properly
# formatted CMake ;list variable.
# module_avail(out_var) - Retrieve the availabe modules that can be
# loaded, making the output available as a
# properly formatted CMake ;-seperated list
# variable.
# Execute an aribitrary module command. Usage:
# module(cmd arg1 ... argN)
# Process the given command and arguments as if they were passed
# directly to the module command in your shell environment.
# module(
# COMMAND cmd arg1 .. argN
# [OUTPUT_VARIABLE out_var]
# [RESULT_VARIABLE ret_var]
# )
function(module)
if(NOT MODULE_COMMAND)
message(ERROR "Failed to process module command. MODULE_COMMAND not found")
return()
endif()
set(options)
set(oneValueArgs OUTPUT_VARIABLE RESULT_VARIABLE)
set(multiValueArgs COMMAND)
cmake_parse_arguments(MOD_ARGS
"${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV}
)
if(NOT MOD_ARGS_COMMAND)
# If no explicit command argument was given, then treat the calling syntax
# as: module(cmd args...)
set(exec_cmd ${ARGV})
else()
set(exec_cmd ${MOD_ARGS_COMMAND})
endif()
if(MOD_ARGS_OUTPUT_VARIABLE)
set(err_var_args ERROR_VARIABLE err_var)
endif()
execute_process(
COMMAND mktemp -t module.cmake.XXXXXXXXXXXX
OUTPUT_VARIABLE tempfile_name
)
string(STRIP "${tempfile_name}" tempfile_name)
# If the $MODULESHOME/init/cmake file exists then assume that the CMake
# "shell" functionality exits
if(EXISTS "$ENV{MODULESHOME}/init/cmake")
execute_process(
COMMAND ${MODULE_COMMAND} cmake ${exec_cmd}
OUTPUT_FILE ${tempfile_name}
${err_var_args}
RESULT_VARIABLE ret_var
)
else() # fallback to the sh shell and manually convert to CMake
execute_process(
COMMAND ${MODULE_COMMAND} sh ${exec_cmd}
OUTPUT_VARIABLE out_var
${err_var_args}
RESULT_VARIABLE ret_var
)
endif()
# If we executed successfully then process and cleanup the temp file
if("${ret_var}" EQUAL 0)
# No CMake shell so we need to process the sh output into CMake code
if(NOT EXISTS "$ENV{MODULESHOME}/init/cmake")
file(WRITE ${tempfile_name} "")
string(REPLACE "\n" ";" out_var "${out_var}")
foreach(sh_cmd IN LISTS out_var)
if(sh_cmd MATCHES "^ *unset *([^ ]*)")
set(cmake_cmd "unset(ENV{${CMAKE_MATCH_1}})")
elseif(sh_cmd MATCHES "^ *export *([^ ]*)")
set(cmake_cmd "set(ENV{${CMAKE_MATCH_1}} \"\${${CMAKE_MATCH_1}}\")")
elseif(sh_cmd MATCHES " *([^ =]*) *= *(.*)")
set(var_name "${CMAKE_MATCH_1}")
set(var_value "${CMAKE_MATCH_2}")
if(var_value MATCHES "^\"(.*[^\\])\"")
# If it's in quotes, take the value as is
set(var_value "${CMAKE_MATCH_1}")
else()
# Otherwise, strip trailing spaces
string(REGEX REPLACE "([^\\])? +$" "\\1" var_value "${var_value}")
endif()
string(REPLACE "\\ " " " var_value "${var_value}")
set(cmake_cmd "set(${var_name} \"${var_value}\")")
else()
continue()
endif()
file(APPEND ${tempfile_name} "${cmake_cmd}\n")
endforeach()
endif()
# Process the change in environment variables
include(${tempfile_name})
file(REMOVE ${tempfile_name})
endif()
# Push the output back out to the calling scope
if(MOD_ARGS_OUTPUT_VARIABLE)
set(${MOD_ARGS_OUTPUT_VARIABLE} "${err_var}" PARENT_SCOPE)
endif()
if(MOD_ARGS_RESULT_VARIABLE)
set(${MOD_ARGS_RESULT_VARIABLE} ${ret_var} PARENT_SCOPE)
endif()
endfunction(module)
# Swap one module for another
function(module_swap out_mod in_mod)
module(COMMAND -t swap ${out_mod} ${in_mod} OUTPUT_VARIABLE tmp_out)
endfunction()
# Retrieve the currently loaded modules
function(module_list out_var)
cmake_policy(SET CMP0007 NEW)
module(COMMAND -t list OUTPUT_VARIABLE tmp_out)
# Convert output into a CMake list
string(REPLACE "\n" ";" ${out_var} "${tmp_out}")
# Remove title headers and empty entries
list(REMOVE_ITEM ${out_var} "No modules loaded")
if(${out_var})
list(FILTER ${out_var} EXCLUDE REGEX "^(.*:)?$")
endif()
list(FILTER ${out_var} EXCLUDE REGEX "^(.*:)?$")
set(${out_var} ${${out_var}} PARENT_SCOPE)
endfunction()
# Retrieve the list of available modules
function(module_avail out_var)
cmake_policy(SET CMP0007 NEW)
module(COMMAND -t avail OUTPUT_VARIABLE tmp_out)
# Convert output into a CMake list
string(REPLACE "\n" ";" tmp_out "${tmp_out}")
set(${out_var})
foreach(MOD IN LISTS tmp_out)
# Remove directory entries and empty values
if(MOD MATCHES "^(.*:)?$")
continue()
endif()
# Convert default modules
if(MOD MATCHES "^(.*)/$" ) # "foo/"
list(APPEND ${out_var} ${CMAKE_MATCH_1})
elseif(MOD MATCHES "^((.*)/.*)\\(default\\)$") # "foo/1.2.3(default)"
list(APPEND ${out_var} ${CMAKE_MATCH_2})
list(APPEND ${out_var} ${CMAKE_MATCH_1})
else()
list(APPEND ${out_var} ${MOD})
endif()
endforeach()
set(${out_var} ${${out_var}} PARENT_SCOPE)
endfunction()
# Make sure our CMake is new enough
if(CMAKE_VERSION VERSION_LESS 3.6)
message(FATAL_ERROR
"The EnvironmentModules interface requires at least CMake v3.6"
)
endif()
# Make sure we know where the underlying module command is
find_program(MODULE_COMMAND
NAMES lmod modulecmd
HINTS ENV MODULESHOME
PATH_SUFFIXES libexec
)
...@@ -66,6 +66,9 @@ set(CTEST_PROJECT_NAME "ADIOS2") ...@@ -66,6 +66,9 @@ set(CTEST_PROJECT_NAME "ADIOS2")
set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_SITE "open.cdash.org")
set(dashboard_git_url "https://github.com/ornladios/ADIOS2.git") set(dashboard_git_url "https://github.com/ornladios/ADIOS2.git")
if(NOT DEFINED CTEST_TEST_TIMEOUT)
set(CTEST_TEST_TIMEOUT 300)
endif()
if(NOT ADIOS_CTEST_SUBMIT_NOTES) if(NOT ADIOS_CTEST_SUBMIT_NOTES)
set(ADIOS_CTEST_SUBMIT_NOTES TRUE) set(ADIOS_CTEST_SUBMIT_NOTES TRUE)
endif() endif()
......
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
# dashboard_do_test = True to enable the Test step # dashboard_do_test = True to enable the Test step
# dashboard_do_coverage = True to enable coverage (ex: gcov) # dashboard_do_coverage = True to enable coverage (ex: gcov)
# dashboard_do_memcheck = True to enable memcheck (ex: valgrind) # dashboard_do_memcheck = True to enable memcheck (ex: valgrind)
# dashboard_do_submit = Submit each step (ON)
# dashboard_do_submit_only = Only submit step results, do nto run them (OFF)
# CTEST_GIT_COMMAND = path to git command-line client # CTEST_GIT_COMMAND = path to git command-line client
# CTEST_BUILD_FLAGS = build tool arguments (ex: -j2) # CTEST_BUILD_FLAGS = build tool arguments (ex: -j2)
...@@ -107,6 +109,14 @@ if(NOT DEFINED dashboard_fresh) ...@@ -107,6 +109,14 @@ if(NOT DEFINED dashboard_fresh)
endif() endif()
endif() endif()
if(NOT DEFINED dashboard_do_submit_only)
set(dashboard_do_submit_only FALSE)
endif()
if(NOT DEFINED dashboard_do_submit)
set(dashboard_do_submit TRUE)
endif()
if(NOT DEFINED CTEST_PROJECT_NAME) if(NOT DEFINED CTEST_PROJECT_NAME)
message(FATAL_ERROR "project-specific script including 'universal.cmake' should set CTEST_PROJECT_NAME") message(FATAL_ERROR "project-specific script including 'universal.cmake' should set CTEST_PROJECT_NAME")
endif() endif()
...@@ -347,9 +357,9 @@ if(COMMAND dashboard_hook_init) ...@@ -347,9 +357,9 @@ if(COMMAND dashboard_hook_init)
endif() endif()
if(dashboard_fresh) if(dashboard_fresh)
if(EXISTS CTEST_BINARY_DIRECTORY) if(EXISTS "${CTEST_BINARY_DIRECTORY}")
message("Clearing build tree...") message("Clearing build tree...")
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}")
else() else()
file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
endif() endif()
...@@ -367,7 +377,9 @@ if(dashboard_fresh) ...@@ -367,7 +377,9 @@ if(dashboard_fresh)
dashboard_hook_start() dashboard_hook_start()
endif() endif()
ctest_start(${dashboard_model} ${dashboard_track_arg}) ctest_start(${dashboard_model} ${dashboard_track_arg})
ctest_submit(PARTS Start) if(dashboard_do_submit)
ctest_submit(PARTS Start)
endif()
if(COMMAND dashboard_hook_started) if(COMMAND dashboard_hook_started)
dashboard_hook_started() dashboard_hook_started()
endif() endif()
...@@ -377,85 +389,109 @@ endif() ...@@ -377,85 +389,109 @@ endif()
# Look for updates. # Look for updates.
if(dashboard_do_update) if(dashboard_do_update)
if(COMMAND dashboard_hook_update) if(NOT dashboard_do_submit_only)
dashboard_hook_update() if(COMMAND dashboard_hook_update)
dashboard_hook_update()
endif()
message("Calling ctest_update...")
ctest_update(RETURN_VALUE count)
set(CTEST_CHECKOUT_COMMAND) # checkout on first iteration only
message("Found ${count} changed files")
endif() endif()
message("Calling ctest_update...")
ctest_update(RETURN_VALUE count) if(dashboard_do_submit)
set(CTEST_CHECKOUT_COMMAND) # checkout on first iteration only if(ADIOS_CTEST_SUBMIT_NOTES)
message("Found ${count} changed files") message("Submitting dashboard scripts as Notes")
# Send the main script as a note while submitting the Update part
if(ADIOS_CTEST_SUBMIT_NOTES) set(CTEST_NOTES_FILES
message("Submitting dashboard scripts as Notes") "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
# Send the main script as a note while submitting the Update part "${CMAKE_CURRENT_LIST_FILE}"
set(CTEST_NOTES_FILES )
"${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}" ctest_submit(PARTS Update Notes)
"${CMAKE_CURRENT_LIST_FILE}" else()
) message("Skipping notes submission for Update step")
ctest_submit(PARTS Update Notes) ctest_submit(PARTS Update)
else() endif()
message("Skipping notes submission for Update step")
ctest_submit(PARTS Update)
endif() endif()
endif() endif()
if(dashboard_do_configure) if(dashboard_do_configure)
if(COMMAND dashboard_hook_configure) if(NOT dashboard_do_submit_only)
dashboard_hook_configure() if(COMMAND dashboard_hook_configure)
dashboard_hook_configure()
endif()
message("Calling ctest_configure")
ctest_configure(${dashboard_configure_args})
endif() endif()
message("Calling ctest_configure") if(dashboard_do_submit)
ctest_configure(${dashboard_configure_args}) if(ADIOS_CTEST_SUBMIT_NOTES)
if(ADIOS_CTEST_SUBMIT_NOTES) message("Submitting CMakeCache.txt as Notes")
message("Submitting CMakeCache.txt as Notes") set(CTEST_NOTES_FILES "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
set(CTEST_NOTES_FILES "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt") ctest_submit(PARTS Configure Notes)
ctest_submit(PARTS Configure Notes) else()
else() message("Skipping notes submission for Configure step")
message("Skipping notes submission for Configure step") ctest_submit(PARTS Configure)
ctest_submit(PARTS Configure) endif()
endif() endif()
endif() endif()
ctest_read_custom_files(${CTEST_BINARY_DIRECTORY}) ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})
if(dashboard_do_build) if(dashboard_do_build)
if(COMMAND dashboard_hook_build) if(NOT dashboard_do_submit_only)
dashboard_hook_build() if(COMMAND dashboard_hook_build)
dashboard_hook_build()
endif()
message("Calling ctest_build")
ctest_build()
endif()
if(dashboard_do_submit)
ctest_submit(PARTS Build)
endif() endif()
message("Calling ctest_build")
ctest_build()
ctest_submit(PARTS Build)
endif() endif()
if(dashboard_do_test) if(dashboard_do_test)
if(COMMAND dashboard_hook_test) if(NOT dashboard_do_submit_only)
dashboard_hook_test() if(COMMAND dashboard_hook_test)
dashboard_hook_test()
endif()
message("Calling ctest_test")
ctest_test(${CTEST_TEST_ARGS} RETURN_VALUE TEST_RESULTS)
if(${TEST_RESULTS} EQUAL 0)
message("ctest test results return value: ${TEST_RESULTS}")
else()
message(SEND_ERROR "Some tests failed")
endif()
endif() endif()
message("Calling ctest_test") if(dashboard_do_submit)
ctest_test(${CTEST_TEST_ARGS} RETURN_VALUE TEST_RESULTS) ctest_submit(PARTS Test)
if(${TEST_RESULTS} EQUAL 0)
message("ctest test results return value: ${TEST_RESULTS}")
else()
message(SEND_ERROR "Some tests failed")
endif() endif()
ctest_submit(PARTS Test)
endif() endif()
if(dashboard_do_coverage) if(dashboard_do_coverage)
if(COMMAND dashboard_hook_coverage) if(NOT dashboard_do_submit_only)
dashboard_hook_coverage() if(COMMAND dashboard_hook_coverage)
dashboard_hook_coverage()
endif()
message("Calling ctest_coverage")
ctest_coverage()
endif()
if(dashboard_do_submit)
ctest_submit(PARTS Coverage)
endif() endif()
message("Calling ctest_coverage")
ctest_coverage()
ctest_submit(PARTS Coverage)
endif() endif()
if(dashboard_do_memcheck) if(dashboard_do_memcheck)
if(COMMAND dashboard_hook_memcheck) if(NOT dashboard_do_submit_only)
dashboard_hook_memcheck() if(COMMAND dashboard_hook_memcheck)
dashboard_hook_memcheck()
endif()
message("Calling ctest_memcheck")
ctest_memcheck()
endif()
if(dashboard_do_submit)
ctest_submit(PARTS MemCheck)
endif() endif()
message("Calling ctest_memcheck")
ctest_memcheck()
ctest_submit(PARTS MemCheck)
endif() endif()
if(COMMAND dashboard_hook_end) if(COMMAND dashboard_hook_end)
......
# Client maintainer: chuck.atkins@kitware.com
set(CTEST_SITE "aaargh.kitware.com")
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_FLAGS "-k -j36")
set(CTEST_TEST_ARGS PARALLEL_LEVEL 36)
set(CTEST_BUILD_NAME "Linux-EL7_GCC5_NoMPI")
set(dashboard_model Nightly)
set(CTEST_DASHBOARD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/${CTEST_BUILD_NAME})
include(${CMAKE_CURRENT_LIST_DIR}/../EnvironmentModules.cmake)
module(purge)
module(load gnu)
module(load hdf5)
module(load numpy)
set(ENV{CC} gcc)
set(ENV{CXX} g++)
set(ENV{FC} gfortran)
set(dashboard_cache "
ADIOS2_USE_ADIOS1:STRING=OFF
ADIOS2_USE_BZip2:STRING=ON
ADIOS2_USE_DataMan:STRING=ON
ADIOS2_USE_Fortran:STRING=ON
ADIOS2_USE_HDF5:STRING=ON
ADIOS2_USE_MPI:STRING=OFF
ADIOS2_USE_Python:STRING=ON
ADIOS2_USE_ZFP:STRING=OFF
ADIOS2_USE_ZeroMQ:STRING=ON
")
include(${CMAKE_CURRENT_LIST_DIR}/../adios_common.cmake)
# Client maintainer: chuck.atkins@kitware.com
set(CTEST_SITE "aaargh.kitware.com")
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_FLAGS "-k -j36")
set(CTEST_TEST_ARGS PARALLEL_LEVEL 1)
if(NOT (DEFINED MPI_MODULE AND DEFINED MPI_NAME))
message("Using default OpenMPI (openmpi)")
set(MPI_MODULE openmpi)
set(MPI_NAME OpenMPI)
endif()
set(CTEST_BUILD_NAME "Linux-EL7_GCC7_${MPI_NAME}")
set(dashboard_model Nightly)
set(CTEST_DASHBOARD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/${CTEST_BUILD_NAME})
include(${CMAKE_CURRENT_LIST_DIR}/../EnvironmentModules.cmake)
module(purge)
module(load gnu7)
module(load numpy)
module(load ${MPI_MODULE})
module(load phdf5)
module(load mpi4py)
module(load adios)
set(ENV{CC} gcc)
set(ENV{CXX} g++)
set(ENV{FC} gfortran)
set(dashboard_cache "
ADIOS2_USE_ADIOS1:STRING=ON
ADIOS2_USE_BZip2:STRING=ON
ADIOS2_USE_DataMan:STRING=ON
ADIOS2_USE_Fortran:STRING=ON
ADIOS2_USE_HDF5:STRING=ON
ADIOS2_USE_MPI:STRING=ON
ADIOS2_USE_Python:STRING=ON
ADIOS2_USE_ZFP:STRING=OFF
ADIOS2_USE_ZeroMQ:STRING=ON
MPIEXEC_MAX_NUMPROCS:STRING=4
")
include(${CMAKE_CURRENT_LIST_DIR}/../adios_common.cmake)
# Client maintainer: chuck.atkins@kitware.com
set(CTEST_SITE "aaargh.kitware.com")
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_FLAGS "-k -j36")
set(CTEST_TEST_ARGS PARALLEL_LEVEL 36)
set(CTEST_BUILD_NAME "Linux-EL7_GCC7_NoMPI")
set(dashboard_model Nightly)
set(CTEST_DASHBOARD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/${CTEST_BUILD_NAME})
include(${CMAKE_CURRENT_LIST_DIR}/../EnvironmentModules.cmake)
module(purge)
module(load gnu7)
module(load hdf5)
module(load numpy)
set(ENV{CC} gcc)
set(ENV{CXX} g++)
set(ENV{FC} gfortran)
set(dashboard_cache "
ADIOS2_USE_ADIOS1:STRING=OFF
ADIOS2_USE_BZip2:STRING=ON
ADIOS2_USE_DataMan:STRING=ON
ADIOS2_USE_Fortran:STRING=ON
ADIOS2_USE_HDF5:STRING=ON
ADIOS2_USE_MPI:STRING=OFF
ADIOS2_USE_Python:STRING=ON
ADIOS2_USE_ZFP:STRING=OFF
ADIOS2_USE_ZeroMQ:STRING=ON
")
include(${CMAKE_CURRENT_LIST_DIR}/../adios_common.cmake)
# Client maintainer: chuck.atkins@kitware.com
set(CTEST_SITE "aaargh.kitware.com")
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_FLAGS "-k -j36")
set(CTEST_TEST_ARGS PARALLEL_LEVEL 1)
if(NOT (DEFINED MPI_MODULE AND DEFINED MPI_NAME))
message("Using default OpenMPI (openmpi)")
set(MPI_MODULE openmpi)
set(MPI_NAME OpenMPI)
endif()
set(CTEST_BUILD_NAME "Linux-EL7_Intel17_${MPI_NAME}")
set(dashboard_model Nightly)
set(CTEST_DASHBOARD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/${CTEST_BUILD_NAME})
include(${CMAKE_CURRENT_LIST_DIR}/../EnvironmentModules.cmake)
module(purge)
module(load intel/17.0.4.196)
module(load numpy)
module(load ${MPI_MODULE})
module(load phdf5)
module(load mpi4py)
module(load adios)
set(ENV{CC} icc)
set(ENV{CXX} icpc)
set(ENV{FC} ifort)
set(dashboard_cache "
ADIOS2_USE_ADIOS1:STRING=ON
ADIOS2_USE_BZip2:STRING=ON
ADIOS2_USE_DataMan:STRING=ON
ADIOS2_USE_Fortran:STRING=ON
ADIOS2_USE_HDF5:STRING=ON
ADIOS2_USE_MPI:STRING=ON
ADIOS2_USE_Python:STRING=ON
ADIOS2_USE_ZFP:STRING=OFF
ADIOS2_USE_ZeroMQ:STRING=ON
MPIEXEC_MAX_NUMPROCS:STRING=4
")
include(${CMAKE_CURRENT_LIST_DIR}/../adios_common.cmake)
# Client maintainer: chuck.atkins@kitware.com
set(CTEST_SITE "aaargh.kitware.com")
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_FLAGS "-k -j36")
set(CTEST_TEST_ARGS PARALLEL_LEVEL 36)
set(CTEST_BUILD_NAME "Linux-EL7_Intel17_NoMPI")
set(dashboard_model Nightly)
set(CTEST_DASHBOARD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/${CTEST_BUILD_NAME})
include(${CMAKE_CURRENT_LIST_DIR}/../EnvironmentModules.cmake)
module(purge)
module(load intel/17.0.4.196)
module(load hdf5)
module(load numpy)
set(ENV{CC} icc)
set(ENV{CXX} icpc)
set(ENV{FC} ifort)
set(dashboard_cache "
ADIOS2_USE_ADIOS1:STRING=OFF
ADIOS2_USE_BZip2:STRING=ON
ADIOS2_USE_DataMan:STRING=ON
ADIOS2_USE_Fortran:STRING=ON
ADIOS2_USE_HDF5:STRING=ON
ADIOS2_USE_MPI:STRING=OFF
ADIOS2_USE_Python:STRING=ON
ADIOS2_USE_ZFP:STRING=OFF
ADIOS2_USE_ZeroMQ:STRING=ON
")
include(${CMAKE_CURRENT_LIST_DIR}/../adios_common.cmake)
#!/bin/bash
function log()
{
local TIMESTAMP=$(date +"%Y%m%dT%T.%N")
echo "${TIMESTAMP} " "$@" | tee -a Logs/aaargh.log
}
mkdir -p ${HOME}/Dashboards/ADIOS2
cd ${HOME}/Dashboards/ADIOS2
mkdir -p Logs
rm -f Logs/aaargh.log
module purge
module load cmake
CTEST=$(which ctest)
if [ ! -d Source/.git ]
then
git clone https://github.com/ornladios/adios2.git Source
else
pushd Source
git fetch --all -p
git checkout -f master
git pull --ff-only
popd
fi
SCRIPT_DIR=${PWD}/Source/scripts/dashboard/nightly
# First run the serial tests
log "Running Serial GCC5"
${CTEST} -VV -S ${SCRIPT_DIR}/aaargh-gcc5-nompi.cmake 2>&1 1>Logs/aaargh-gcc5-nompi.log
log "Running Serial GCC7"
${CTEST} -VV -S ${SCRIPT_DIR}/aaargh-gcc7-nompi.cmake 2>&1 1>Logs/aaargh-gcc7-nompi.log
log "Running Serial Intel17"
${CTEST} -VV -S ${SCRIPT_DIR}/aaargh-intel17-nompi.cmake 2>&1 1>Logs/aaargh-intel17-nompi.log
# Now run the MPI tests
log "Running GCC7 IntelMPI"
${CTEST} -VV -S ${SCRIPT_DIR}/aaargh-gcc7-mpi.cmake \
-DMPI_NAME=IntelMPI -DMPI_MODULE=impi 2>&1 1>Logs/aaargh-gcc7-impi.log
log "Running GCC7 MPICH"
${CTEST} -VV -S ${SCRIPT_DIR}/aaargh-gcc7-mpi.cmake \
-DMPI_NAME=MPICH -DMPI_MODULE=mpich 2>&1 1>Logs/aaargh-gcc7-mpich.log
log "Running GCC7 MVAPICH2"
${CTEST} -VV -S ${SCRIPT_DIR}/aaargh-gcc7-mpi.cmake \
-DMPI_NAME=MVAPICH2 -DMPI_MODULE=mvapich2 2>&1 1>Logs/aaargh-gcc7-mvapich2.log
log "Running Intel17 IntelMPI"
${CTEST} -VV -S ${SCRIPT_DIR}/aaargh-intel17-mpi.cmake \
-DMPI_NAME=IntelMPI -DMPI_MODULE=impi 2>&1 1>Logs/aaargh-intel17-impi.log
log "Running Intel17 MPICH"
${CTEST} -VV -S ${SCRIPT_DIR}/aaargh-intel17-mpi.cmake \
-DMPI_NAME=MPICH -DMPI_MODULE=mpich 2>&1 1>Logs/aaargh-intel17-mpich.log
log "Running Intel17 MVAPICH2"
${CTEST} -VV -S ${SCRIPT_DIR}/aaargh-intel17-mpi.cmake \
-DMPI_NAME=MVAPICH2 -DMPI_MODULE=mvapich2 2>&1 1>Logs/aaargh-intel17-mvapich2.log
# Client maintainer: chuck.atkins@kitware.com
set(CTEST_SITE "summitdev.ccs.ornl.gov")
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_FLAGS "-k -j10")
set(CTEST_TEST_ARGS PARALLEL_LEVEL 10)
set(CTEST_BUILD_NAME "Linux-EL7-PPC64LE_GCC-7.1.0_NoMPI")
set(dashboard_model Nightly)
set(CTEST_DASHBOARD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/${CTEST_BUILD_NAME})
include(${CMAKE_CURRENT_LIST_DIR}/../EnvironmentModules.cmake)
module(purge)
module(load git)
module(load gcc/7.1.0)
module(load hdf5)
set(ENV{CC} gcc)
set(ENV{CXX} g++)
set(ENV{FC} gfortran)
set(dashboard_cache "
#ADIOS2_USE_ADIOS1:STRING=ON
#ADIOS2_USE_BZip2:STRING=ON
#ADIOS2_USE_DataMan:STRING=ON
ADIOS2_USE_Fortran:STRING=ON
#ADIOS2_USE_HDF5:STRING=ON
#ADIOS2_USE_MPI:STRING=ON
#ADIOS2_USE_Python:STRING=ON
#ADIOS2_USE_ZFP:STRING=ON
#ADIOS2_USE_ZeroMQ:STRING=ON
")
include(${CMAKE_CURRENT_LIST_DIR}/../adios_common.cmake)
# Client maintainer: chuck.atkins@kitware.com
set(CTEST_SITE "summitdev.ccs.ornl.gov")
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_FLAGS "-k -j10")
set(CTEST_TEST_ARGS PARALLEL_LEVEL 1)
set(CTEST_BUILD_NAME "Linux-EL7-PPC64LE_GCC-7.1.0_SpectrumMPI")
set(dashboard_model Nightly)
set(CTEST_DASHBOARD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/${CTEST_BUILD_NAME})
include(${CMAKE_CURRENT_LIST_DIR}/../EnvironmentModules.cmake)
module(purge)
module(load git)
module(load gcc/7.1.0)
module(load spectrum-mpi)
module(load lsf-tools)
module(load hdf5)
set(ENV{CC} gcc)
set(ENV{CXX} g++)
set(ENV{FC} gfortran)
set(dashboard_cache "
#ADIOS2_USE_ADIOS1:STRING=ON
#ADIOS2_USE_BZip2:STRING=ON
#ADIOS2_USE_DataMan:STRING=ON
ADIOS2_USE_Fortran:STRING=ON
#ADIOS2_USE_HDF5:STRING=ON
ADIOS2_USE_MPI:STRING=ON
#ADIOS2_USE_Python:STRING=ON
#ADIOS2_USE_ZFP:STRING=ON
#ADIOS2_USE_ZeroMQ:STRING=ON
MPIEXEC_EXECUTABLE:FILEPATH=jsrun
MPIEXEC_MAX_NUMPROCS:STRING=
MPIEXEC_NUMPROC_FLAG:STRING=-n4;-r2;-a10
")
include(${CMAKE_CURRENT_LIST_DIR}/../adios_common.cmake)
# Client maintainer: chuck.atkins@kitware.com
set(CTEST_SITE "summitdev.ccs.ornl.gov")
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_FLAGS "-k -j10")
set(CTEST_TEST_ARGS PARALLEL_LEVEL 10)
set(CTEST_BUILD_NAME "Linux-EL7-PPC64LE_PGI-17.9_NoMPI")
set(dashboard_model Nightly)
set(CTEST_DASHBOARD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/${CTEST_BUILD_NAME})
include(${CMAKE_CURRENT_LIST_DIR}/../EnvironmentModules.cmake)
module(purge)
module(load git)
module(load pgi/17.9)
module(load hdf5)
set(ENV{CC} pgcc)
set(ENV{CXX} pgc++)
set(ENV{FC} pgfortran)
set(dashboard_cache "
#ADIOS2_USE_ADIOS1:STRING=ON
#ADIOS2_USE_BZip2:STRING=ON
#ADIOS2_USE_DataMan:STRING=ON
ADIOS2_USE_Fortran:STRING=ON
#ADIOS2_USE_HDF5:STRING=ON
#ADIOS2_USE_MPI:STRING=ON
#ADIOS2_USE_Python:STRING=ON
#ADIOS2_USE_ZFP:STRING=ON
#ADIOS2_USE_ZeroMQ:STRING=ON
")
include(${CMAKE_CURRENT_LIST_DIR}/../adios_common.cmake)
# Client maintainer: chuck.atkins@kitware.com
set(CTEST_SITE "summitdev.ccs.ornl.gov")
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_FLAGS "-k -j10")
set(CTEST_TEST_ARGS PARALLEL_LEVEL 1)
set(CTEST_BUILD_NAME "Linux-EL7-PPC64LE_PGI-17.9_SpectrumMPI")
set(dashboard_model Nightly)
set(CTEST_DASHBOARD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/${CTEST_BUILD_NAME})
include(${CMAKE_CURRENT_LIST_DIR}/../EnvironmentModules.cmake)
module(purge)
module(load git)
module(load pgi/17.9)
module(load spectrum-mpi)
module(load lsf-tools)
module(load hdf5)
set(ENV{CC} pgcc)
set(ENV{CXX} pgc++)
set(ENV{FC} pgfortran)
set(dashboard_cache "
#ADIOS2_USE_ADIOS1:STRING=ON
#ADIOS2_USE_BZip2:STRING=ON
#ADIOS2_USE_DataMan:STRING=ON
ADIOS2_USE_Fortran:STRING=ON
#ADIOS2_USE_HDF5:STRING=ON
ADIOS2_USE_MPI:STRING=ON
#ADIOS2_USE_Python:STRING=ON
#ADIOS2_USE_ZFP:STRING=ON
#ADIOS2_USE_ZeroMQ:STRING=ON
MPIEXEC_EXECUTABLE:FILEPATH=jsrun
MPIEXEC_MAX_NUMPROCS:STRING=
MPIEXEC_NUMPROC_FLAG:STRING=-n4;-r2;-a10
")
include(${CMAKE_CURRENT_LIST_DIR}/../adios_common.cmake)
#!/bin/bash
#BSUB -P CSC143SUMMITDEV
#BSUB -W 30
#BSUB -nnodes 2
#BSUB -o adios2_nightly.%I.out
#BSUB -e adios2_nightly.%I.err
case ${LSB_JOBINDEX} in
1) CTEST_COMPILER=gcc
;;
2) CTEST_COMPILER=xl
;;
3) CTEST_COMPILER=pgi
;;
*) echo "Error: Unsupported LSB_JOBINDEX: ${LSB_JOBINDEX}"
exit
;;
esac
echo "LSB_JOBINDEX: ${LSB_JOBINDEX}"
echo "CTEST_COMPILER: ${CTEST_COMPILER}"
module purge
module load git cmake
CTEST=$(which ctest)
SCRIPT_DIR=${PWD}/source/scripts/dashboard/nightly
${CTEST} -VV -S ${SCRIPT_DIR}/summitdev-${CTEST_COMPILER}-spectrum.cmake \
-Ddashboard_full=OFF \
-Ddashboard_do_test=ON \
-Ddashboard_do_submit=OFF 2>&1 1>>summitdev-${CTEST_COMPILER}-spectrum.log
# Client maintainer: chuck.atkins@kitware.com
set(CTEST_SITE "summitdev.ccs.ornl.gov")
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_FLAGS "-k -j10")
set(CTEST_TEST_ARGS PARALLEL_LEVEL 10)
set(CTEST_BUILD_NAME "Linux-EL7-PPC64LE_XL-13.1.5_NoMPI")
set(dashboard_model Nightly)
set(CTEST_DASHBOARD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/${CTEST_BUILD_NAME})
include(${CMAKE_CURRENT_LIST_DIR}/../EnvironmentModules.cmake)
module(purge)
module(load git)
module(load xl)
module(load hdf5)
set(ENV{CC} xlc)
set(ENV{CXX} xlC)
set(ENV{FC} xlf)
set(dashboard_cache "
#ADIOS2_USE_ADIOS1:STRING=ON
#ADIOS2_USE_BZip2:STRING=ON
#ADIOS2_USE_DataMan:STRING=ON
ADIOS2_USE_Fortran:STRING=ON
#ADIOS2_USE_HDF5:STRING=ON
#ADIOS2_USE_MPI:STRING=ON
#ADIOS2_USE_Python:STRING=ON
#ADIOS2_USE_ZFP:STRING=ON
#ADIOS2_USE_ZeroMQ:STRING=ON
")
include(${CMAKE_CURRENT_LIST_DIR}/../adios_common.cmake)
# Client maintainer: chuck.atkins@kitware.com
set(CTEST_SITE "summitdev.ccs.ornl.gov")
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_FLAGS "-k -j10")
set(CTEST_TEST_ARGS PARALLEL_LEVEL 1)
set(CTEST_BUILD_NAME "Linux-EL7-PPC64LE_XL-13.1.5_SpectrumMPI")
set(dashboard_model Nightly)
set(CTEST_DASHBOARD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/${CTEST_BUILD_NAME})
include(${CMAKE_CURRENT_LIST_DIR}/../EnvironmentModules.cmake)
module(purge)
module(load git)
module(load xl)
module(load spectrum-mpi)
module(load lsf-tools)
module(load hdf5)
set(ENV{CC} xlc)
set(ENV{CXX} xlC)
set(ENV{FC} xlf)
set(dashboard_cache "
#ADIOS2_USE_ADIOS1:STRING=ON
#ADIOS2_USE_BZip2:STRING=ON
#ADIOS2_USE_DataMan:STRING=ON
ADIOS2_USE_Fortran:STRING=ON
#ADIOS2_USE_HDF5:STRING=ON
ADIOS2_USE_MPI:STRING=ON
#ADIOS2_USE_Python:STRING=ON
#ADIOS2_USE_ZFP:STRING=ON
#ADIOS2_USE_ZeroMQ:STRING=ON
MPIEXEC_EXECUTABLE:FILEPATH=jsrun
MPIEXEC_MAX_NUMPROCS:STRING=
MPIEXEC_NUMPROC_FLAG:STRING=-n4;-r2;-a10
")
include(${CMAKE_CURRENT_LIST_DIR}/../adios_common.cmake)
#!/bin/bash
function log()
{
local TIMESTAMP=$(date +"%Y%m%dT%T.%N")
echo "${TIMESTAMP} " "$@" | tee -a summitdev.log
}
mkdir -p ${HOME}/dashboards/summitdev/adios2
cd ${HOME}/dashboards/summitdev/adios2
rm -f summitdev.log
module purge
module load git cmake lsf-tools
CTEST=$(which ctest)
if [ ! -d source/.git ]
then
git clone https://github.com/ornladios/adios2.git source
else
pushd source
git fetch --all -p
git checkout -f master
git pull --ff-only
popd
fi
SCRIPT_DIR=${PWD}/source/scripts/dashboard/nightly
# First run the serial tests
log "Running Serial GCC"
${CTEST} -VV -S ${SCRIPT_DIR}/summitdev-gcc-nompi.cmake 2>&1 1>summitdev-gcc-nompi.log
log "Running Serial XL"
${CTEST} -VV -S ${SCRIPT_DIR}/summitdev-xl-nompi.cmake 2>&1 1>summitdev-xl-nompi.log
log "Running Serial XL"
${CTEST} -VV -S ${SCRIPT_DIR}/summitdev-pgi-nompi.cmake 2>&1 1>summitdev-pgi-nompi.log
# Now run the configure and build steps for the MPI tests
log "Running Parallel GCC Build"
${CTEST} -VV -S ${SCRIPT_DIR}/summitdev-gcc-spectrum.cmake \
-Ddashboard_full=OFF \
-Ddashboard_fresh=ON \
-Ddashboard_do_checkout=ON \
-Ddashboard_do_update=ON \
-Ddashboard_do_configure=ON \
-Ddashboard_do_build=ON 2>&1 1>summitdev-gcc-spectrum.log
log "Running Parallel XL Build"
${CTEST} -VV -S ${SCRIPT_DIR}/summitdev-xl-spectrum.cmake \
-Ddashboard_full=OFF \
-Ddashboard_fresh=ON \
-Ddashboard_do_checkout=ON \
-Ddashboard_do_update=ON \
-Ddashboard_do_configure=ON \
-Ddashboard_do_build=ON 2>&1 1>summitdev-xl-spectrum.log
log "Running Parallel PGI Build"
${CTEST} -VV -S ${SCRIPT_DIR}/summitdev-pgi-spectrum.cmake \
-Ddashboard_full=OFF \
-Ddashboard_fresh=ON \
-Ddashboard_do_checkout=ON \
-Ddashboard_do_update=ON \
-Ddashboard_do_configure=ON \
-Ddashboard_do_build=ON 2>&1 1>summitdev-pgi-spectrum.log
# Now run the MPI tests in a batch job
log "Submitting Parallel Tests"
JOBID=$(bsub -J "adios2_nightly[1-3]" ${SCRIPT_DIR}/summitdev-spectrum-tests.lsf | awk '{print $2}' | sed 's|<\([0-9]*\)>|\1|')
while true
do
NJOBS=$(bjobs 2>/dev/null | grep "^${JOBID} " | wc -l)
log "Test jobs active in queue for job array ${JOBID}: ${NJOBS}"
if [ ${NJOBS} -eq 0 ]
then
break
fi
sleep 30
done
# Finaly submit the test results from the batch job
log "Submitting Parallel GCC Test Results"
${CTEST} -VV -S ${SCRIPT_DIR}/summitdev-gcc-spectrum.cmake \
-Ddashboard_full=OFF \
-Ddashboard_do_test=ON \
-Ddashboard_do_submit_only=ON 2>&1 1>>summitdev-gcc-spectrum.log
log "Submitting Parallel XL Test Results"
${CTEST} -VV -S ${SCRIPT_DIR}/summitdev-xl-spectrum.cmake \
-Ddashboard_full=OFF \
-Ddashboard_do_test=ON \
-Ddashboard_do_submit_only=ON 2>&1 1>>summitdev-xl-spectrum.log
log "Submitting Parallel PGI Test Results"
${CTEST} -VV -S ${SCRIPT_DIR}/summitdev-pgi-spectrum.cmake \
-Ddashboard_full=OFF \
-Ddashboard_do_test=ON \
-Ddashboard_do_submit_only=ON 2>&1 1>>summitdev-pgi-spectrum.log
...@@ -45,7 +45,7 @@ public: ...@@ -45,7 +45,7 @@ public:
* @param callback function (get) provided by the user to be applied in * @param callback function (get) provided by the user to be applied in
* DataMan * DataMan
*/ */
void SetCallback(std::function<void(const void *, std::string, std::string, void SetCallBack(std::function<void(const void *, std::string, std::string,
std::string, Dims)> std::string, Dims)>
callback); callback);
......
...@@ -30,6 +30,10 @@ void DataManWriter::PutSyncCommon(Variable<T> &variable, const T *values) ...@@ -30,6 +30,10 @@ void DataManWriter::PutSyncCommon(Variable<T> &variable, const T *values)
// This part will go away, this is just to monitor variables per rank // This part will go away, this is just to monitor variables per rank
if (variable.m_Shape.empty())
{
variable.m_Shape = variable.m_Count;
}
if (variable.m_Count.empty()) if (variable.m_Count.empty())
{ {
variable.m_Count = variable.m_Shape; variable.m_Count = variable.m_Shape;
......
...@@ -28,17 +28,10 @@ void DataMan::OpenWANTransports(const std::string &name, const Mode openMode, ...@@ -28,17 +28,10 @@ void DataMan::OpenWANTransports(const std::string &name, const Mode openMode,
const std::vector<Params> &parametersVector, const std::vector<Params> &parametersVector,
const bool profile) const bool profile)
{ {
unsigned int counter = 0;
for (const auto &parameters : parametersVector) for (const auto &parameters : parametersVector)
{ {
std::shared_ptr<Transport> wanTransport, controlTransport; std::shared_ptr<Transport> wanTransport, controlTransport;
// to be removed
for (auto &i : parameters)
{
std::cout << i.first << " " << i.second << std::endl;
}
const std::string type(GetParameter( const std::string type(GetParameter(
"type", parameters, true, m_DebugMode, "Transport Type Parameter")); "type", parameters, true, m_DebugMode, "Transport Type Parameter"));
...@@ -72,13 +65,27 @@ void DataMan::OpenWANTransports(const std::string &name, const Mode openMode, ...@@ -72,13 +65,27 @@ void DataMan::OpenWANTransports(const std::string &name, const Mode openMode,
if (type == "wan" || type == "WAN") if (type == "wan" || type == "WAN")
{ {
if (library == "zmq") if (library == "zmq" || library == "ZMQ")
{ {
#ifdef ADIOS2_HAVE_ZEROMQ #ifdef ADIOS2_HAVE_ZEROMQ
wanTransport = std::make_shared<transport::WANZmq>( wanTransport = std::make_shared<transport::WANZmq>(
ipAddress, portData, m_MPIComm, m_DebugMode); ipAddress, portData, m_MPIComm, m_DebugMode);
controlTransport = std::make_shared<transport::WANZmq>( controlTransport = std::make_shared<transport::WANZmq>(
ipAddress, portControl, m_MPIComm, m_DebugMode); ipAddress, portControl, m_MPIComm, m_DebugMode);
wanTransport->Open(messageName, openMode);
m_Transports.emplace(counter, std::move(wanTransport));
controlTransport->Open(messageName, openMode);
m_ControlTransports.push_back(std::move(controlTransport));
if (openMode == OpenMode::Read)
{
m_Listening = true;
m_ControlThreads.push_back(std::thread(&DataMan::ReadThread,
this, wanTransport,
controlTransport));
}
#else #else
throw std::invalid_argument( throw std::invalid_argument(
"ERROR: this version of ADIOS2 didn't compile with " "ERROR: this version of ADIOS2 didn't compile with "
...@@ -96,12 +103,7 @@ void DataMan::OpenWANTransports(const std::string &name, const Mode openMode, ...@@ -96,12 +103,7 @@ void DataMan::OpenWANTransports(const std::string &name, const Mode openMode,
"in call to Open\n"); "in call to Open\n");
} }
} }
wanTransport->Open(messageName, openMode);
m_Transports.emplace(counter, std::move(wanTransport));
controlTransport->Open(messageName, openMode);
m_ControlTransports.push_back(std::move(controlTransport));
} }
++counter;
} }
} }
...@@ -113,6 +115,8 @@ void DataMan::WriteWAN(const void *buffer, nlohmann::json jmsg) ...@@ -113,6 +115,8 @@ void DataMan::WriteWAN(const void *buffer, nlohmann::json jmsg)
jmsg["bytes"].get<size_t>()); jmsg["bytes"].get<size_t>());
} }
void DataMan::ReadWAN(void *buffer, nlohmann::json jmsg) {}
void DataMan::SetCallback(std::function<void(const void *, std::string, void DataMan::SetCallback(std::function<void(const void *, std::string,
std::string, std::string, Dims)> std::string, std::string, Dims)>
callback) callback)
...@@ -125,20 +129,30 @@ void DataMan::ReadThread(std::shared_ptr<Transport> trans, ...@@ -125,20 +129,30 @@ void DataMan::ReadThread(std::shared_ptr<Transport> trans,
{ {
while (m_Listening) while (m_Listening)
{ {
// Wait for Read API to be implemented char buffer[1024];
/* size_t bytes;
if (ctl_trans->Read() >= 0) nlohmann::json jmsg;
{ ctl_trans->Read(buffer, 1024);
std::string smsg; std::string smsg(buffer);
nlohmann::json jmsg = json::parse(smsg); jmsg = nlohmann::json::parse(smsg);
} bytes = jmsg.value("bytes", 0);
else
if (bytes > 0)
{ {
usleep(1); std::vector<char> data(bytes);
trans->Read(data.data(), bytes);
std::string doid = jmsg.value("doid", "Unknown Data Object");
std::string var = jmsg.value("var", "Unknown Variable");
std::string dtype = jmsg.value("dtype", "Unknown Data Type");
std::vector<size_t> putshape =
jmsg.value("putshape", std::vector<size_t>());
if (m_CallBack)
{
m_CallBack(data.data(), doid, var, dtype, putshape);
}
} }
*/
} }
} }
} // end namespace transportman } // end namespace transportman
} // end namespace adios } // end namespace adios2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment