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
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,19 @@ spack:
- adios
- adios2
- hdf5
- openmpi

packages:
hdf5:
variants: ~mpi
adios:
variants: ~zfp ~sz ~lz4 ~blosc
variants: ~mpi ~zfp ~sz ~lz4 ~blosc
adios2:
variants: ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2
variants: ~mpi ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2
cmake:
externals:
- spec: "cmake"
prefix: /usr
buildable: False
openmpi:
externals:
- spec: "openmpi"
prefix: /usr
buildable: False
perl:
externals:
- spec: "perl"
Expand All @@ -43,7 +37,7 @@ spack:
variants: ~fortran
providers:
mpi: [openmpi]
compiler: [clang@10.0.0]
compiler: [clang@12.0.0]

compilers:
- compiler:
Expand All @@ -53,11 +47,11 @@ spack:
modules: []
operating_system: ubuntu20.04
paths:
cc: /usr/lib/llvm-10/bin/clang
cxx: /usr/lib/llvm-10/bin/clang++
cc: /usr/lib/llvm-12/bin/clang
cxx: /usr/lib/llvm-12/bin/clang++
f77: /usr/bin/gfortran
fc: /usr/bin/gfortran
spec: clang@10.0.0
spec: clang@12.0.0
target: x86_64

config:
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,29 +106,33 @@ jobs:
# TODO
# clang6_py36_nompi_h5_ad1_ad2_libcpp

clang10_py38_nompi_h5_ad1_ad2_libcpp:
clang12_py38_nompi_h5_ad1_ad2:
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v2
- name: Spack Cache
uses: actions/cache@v2
with: {path: /opt/spack, key: clang12_py38_nompi_h5_ad1_ad2 }
- name: Install
run: |
sudo apt-get update
sudo apt-get install clang-10 libc++-dev libc++abi-dev libhdf5-dev python3
python3 -m pip install -U pip
python3 -m pip install -U numpy
# TODO ADIOS1 ADIOS2
sudo apt-get install clang-12 libhdf5-dev python3 python3-pip python3-numpy python3-pandas
sudo .github/workflows/dependencies/install_spack
- name: Build
env: {CC: clang-10, CXX: clang++-10, CXXFLAGS: -Werror -Wno-deprecated-declarations}
# TODO
# , CXXFLAGS: -nostdinc++ -I/usr/include/c++/10 -I/usr/include/x86_64-linux-gnu/c++/10/, LDFLAGS: -stdlib=libc++ -lc++ -lc++abi}
env: {CC: clang-12, CXX: clang++-12, CXXFLAGS: -Werror -Wno-deprecated-declarations}
run: |
eval $(spack env activate --sh .github/ci/spack-envs/clang12_py38_nompi_h5_ad1_ad2/)
spack install

share/openPMD/download_samples.sh build
chmod u-w build/samples/git-sample/*.h5
cmake -S . -B build \
-DopenPMD_USE_PYTHON=ON \
-DopenPMD_USE_MPI=OFF \
-DopenPMD_USE_HDF5=ON \
-DopenPMD_USE_ADIOS1=ON \
-DopenPMD_USE_ADIOS2=ON \
-DopenPMD_USE_INVASIVE_TESTS=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build build --parallel 2
Expand Down
15 changes: 7 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -574,13 +574,6 @@ if(openPMD_HAVE_ADIOS1)
target_include_directories(openPMD.ADIOS1.Parallel PRIVATE
${openPMD_SOURCE_DIR}/include ${openPMD_BINARY_DIR}/include)

if(openPMD_HAVE_MPI)
target_link_libraries(openPMD.ADIOS1.Parallel PUBLIC ${openPMD_MPI_TARGETS})
target_compile_definitions(openPMD.ADIOS1.Parallel PRIVATE openPMD_HAVE_MPI=1)
else()
target_compile_definitions(openPMD.ADIOS1.Parallel PRIVATE openPMD_HAVE_MPI=0)
endif()

target_include_directories(openPMD.ADIOS1.Serial SYSTEM PRIVATE
$<TARGET_PROPERTY:openPMD::thirdparty::nlohmann_json,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:openPMD::thirdparty::toml11,INTERFACE_INCLUDE_DIRECTORIES>)
Expand Down Expand Up @@ -610,7 +603,7 @@ if(openPMD_HAVE_ADIOS1)
target_compile_definitions(openPMD.ADIOS1.Serial PRIVATE "${ADIOS_DEFINITIONS_SEQUENTIAL}")
target_compile_definitions(openPMD.ADIOS1.Serial PRIVATE openPMD_HAVE_ADIOS1=1)
target_compile_definitions(openPMD.ADIOS1.Serial PRIVATE openPMD_HAVE_MPI=0)
target_compile_definitions(openPMD.ADIOS1.Serial PRIVATE _NOMPI=1)
target_compile_definitions(openPMD.ADIOS1.Serial PRIVATE _NOMPI) # ADIOS header

if(openPMD_HAVE_MPI)
set_target_properties(openPMD.ADIOS1.Parallel PROPERTIES
Expand All @@ -631,10 +624,16 @@ if(openPMD_HAVE_ADIOS1)
foreach(adlib ${ADIOS_LIBRARIES})
target_link_libraries(openPMD.ADIOS1.Parallel PRIVATE ${adlib})
endforeach()
target_link_libraries(openPMD.ADIOS1.Parallel PUBLIC ${openPMD_MPI_TARGETS})

target_include_directories(openPMD.ADIOS1.Parallel SYSTEM PRIVATE ${ADIOS_INCLUDE_DIRS})
target_compile_definitions(openPMD.ADIOS1.Parallel PRIVATE "${ADIOS_DEFINITIONS}")
target_compile_definitions(openPMD.ADIOS1.Parallel PRIVATE openPMD_HAVE_ADIOS1=1)
target_compile_definitions(openPMD.ADIOS1.Parallel PRIVATE openPMD_HAVE_MPI=1)
else()
target_compile_definitions(openPMD.ADIOS1.Parallel PRIVATE openPMD_HAVE_ADIOS1=0)
target_compile_definitions(openPMD.ADIOS1.Parallel PRIVATE openPMD_HAVE_MPI=0)
target_compile_definitions(openPMD.ADIOS1.Parallel PRIVATE _NOMPI) # ADIOS header
endif()

# Runtime parameter and API status checks ("asserts")
Expand Down
5 changes: 3 additions & 2 deletions src/IO/ADIOS/CommonADIOS1IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1788,6 +1788,7 @@ void CommonADIOS1IOHandlerImpl< ChildClass >::initJson(
template class CommonADIOS1IOHandlerImpl< ADIOS1IOHandlerImpl >;
#if openPMD_HAVE_MPI
template class CommonADIOS1IOHandlerImpl< ParallelADIOS1IOHandlerImpl >;
#endif // opepnPMD_HAVE_MPI
#endif // openPMD_HAVE_MPI

} // namespace openPMD
#endif // openPMD_HAVE_ADIOS1
}
10 changes: 6 additions & 4 deletions src/IO/ADIOS/ParallelADIOS1IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ ParallelADIOS1IOHandlerImpl::initialize_group(std::string const &name)
return group;
}

#else
#else // openPMD_HAVE_ADIOS1 && openPMD_HAVE_MPI
# if openPMD_HAVE_MPI
ParallelADIOS1IOHandler::ParallelADIOS1IOHandler(std::string path,
Access at,
Expand All @@ -364,7 +364,7 @@ ParallelADIOS1IOHandler::ParallelADIOS1IOHandler(std::string path,
{
throw std::runtime_error("openPMD-api built without parallel ADIOS1 support");
}
# endif
# endif // openPMD_HAVE_MPI

ParallelADIOS1IOHandler::~ParallelADIOS1IOHandler() = default;

Expand All @@ -374,9 +374,11 @@ ParallelADIOS1IOHandler::flush()
return std::future< void >();
}

#if openPMD_HAVE_ADIOS1
void
ParallelADIOS1IOHandler::enqueue(IOTask const&)
{
}
#endif
} // openPMD
#endif // openPMD_HAVE_ADIOS1
#endif // openPMD_HAVE_ADIOS1 && openPMD_HAVE_MPI
} // namespace openPMD