-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a region calculus #995
base: dev
Are you sure you want to change the base?
Changes from 44 commits
47cb769
84796f8
7eb8dbe
5d0e233
40232dd
3e39868
83c48f4
11d512d
b4d05e5
860ffc4
6e83f3a
e94bf59
940d57f
5b9a95c
529b4ac
75d5661
01ff022
b5c0138
1f76327
e0b85dc
483bd2a
8b3b3ad
331b48b
f1f3c11
cf46121
0751fca
ac9af25
e144d3a
c7b8cf2
4b373a6
bdd1971
77358ae
99a6e62
055ffb7
1463411
a689ecf
fadb375
b145c02
686d14d
2ac1e7f
3fb5920
fb084cc
6fa5863
c09057f
3bedaee
3a45617
2f5018f
84d9108
e9a46cd
c59bc20
5d76387
b5afb43
5145971
7d65e4d
6159f94
93cc8d3
aa6b0be
c435db2
93ad888
0c46a71
68d409a
2fd5c9b
a2f07e7
10fe81b
15399b1
c436db6
8d1de67
8f843cc
092569f
d617383
36551f2
23f2133
5939968
368d2f3
32424d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# This is a Spack environment file. | ||
# | ||
# Activating and installing this environment will provide all dependencies | ||
# that are needed for full-feature development. | ||
# https//spack.readthedocs.io/en/latest/environments.html#anonymous-environments | ||
# | ||
spack: | ||
specs: | ||
- adios | ||
- adios2 | ||
- hdf5 | ||
- openmpi | ||
|
||
packages: | ||
adios: | ||
variants: ~zfp ~sz ~lz4 ~blosc | ||
adios2: | ||
variants: ~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" | ||
prefix: /usr | ||
buildable: False | ||
python: | ||
externals: | ||
- spec: "python" | ||
prefix: /usr | ||
buildable: False | ||
all: | ||
target: ['x86_64'] | ||
variants: ~fortran | ||
compiler: [[email protected]] | ||
|
||
compilers: | ||
- compiler: | ||
environment: {} | ||
extra_rpaths: [] | ||
flags: {} | ||
modules: [] | ||
operating_system: ubuntu18.04 | ||
paths: | ||
cc: /usr/bin/gcc-7 | ||
cxx: /usr/bin/g++-7 | ||
f77: /usr/bin/gfortran | ||
fc: /usr/bin/gfortran | ||
spec: [email protected] | ||
target: x86_64 | ||
|
||
config: | ||
build_jobs: 2 | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -69,6 +69,7 @@ openpmd_option(ADIOS1 "ADIOS1 backend (.bp files)" AUTO) | |||||||||||||||||||
openpmd_option(ADIOS2 "ADIOS2 backend (.bp files)" AUTO) | ||||||||||||||||||||
openpmd_option(PYTHON "Enable Python bindings" AUTO) | ||||||||||||||||||||
|
||||||||||||||||||||
option(openPMD_CXX_STANDARD "Which C++ standard to use (14 or 17)" OFF) | ||||||||||||||||||||
option(openPMD_INSTALL "Add installation targets" ON) | ||||||||||||||||||||
option(openPMD_HAVE_PKGCONFIG "Generate a .pc file for pkg-config" ON) | ||||||||||||||||||||
option(openPMD_USE_INTERNAL_VARIANT "Use internally shipped MPark.Variant" ON) | ||||||||||||||||||||
|
@@ -79,6 +80,17 @@ option(openPMD_USE_INTERNAL_JSON "Use internally shipped nlohmann-json" ON) | |||||||||||||||||||
option(openPMD_USE_INVASIVE_TESTS "Enable unit tests that modify source code" OFF) | ||||||||||||||||||||
option(openPMD_USE_VERIFY "Enable internal VERIFY (assert) macro independent of build type" ON) | ||||||||||||||||||||
|
||||||||||||||||||||
if(NOT openPMD_CXX_STANDARD) | ||||||||||||||||||||
set(openPMD_CXX_STANDARD 14) | ||||||||||||||||||||
endif() | ||||||||||||||||||||
if(openPMD_CXX_STANDARD STREQUAL 14) | ||||||||||||||||||||
set(openPMD_CXX_STD cxx_std_14) | ||||||||||||||||||||
elseif(openPMD_CXX_STANDARD STREQUAL 17) | ||||||||||||||||||||
set(openPMD_CXX_STD cxx_std_17) | ||||||||||||||||||||
else() | ||||||||||||||||||||
message(FATAL_ERROR "openPMD_CXX_STANDARD must be either 14 or 17; found ${openPMD_CXX_STANDARD}") | ||||||||||||||||||||
endif() | ||||||||||||||||||||
eschnett marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||
|
||||||||||||||||||||
set(CMAKE_CONFIGURATION_TYPES "Release;Debug;MinSizeRel;RelWithDebInfo") | ||||||||||||||||||||
if(NOT CMAKE_BUILD_TYPE) | ||||||||||||||||||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING | ||||||||||||||||||||
|
@@ -396,9 +408,10 @@ add_library(openPMD::openPMD ALIAS openPMD) | |||||||||||||||||||
|
||||||||||||||||||||
# properties | ||||||||||||||||||||
target_compile_features(openPMD | ||||||||||||||||||||
PUBLIC cxx_std_14 | ||||||||||||||||||||
PUBLIC ${openPMD_CXX_STD} | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
) | ||||||||||||||||||||
set_target_properties(openPMD PROPERTIES | ||||||||||||||||||||
CXX_STANDARD ${openPMD_CXX_STANDARD} | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't set those properties since
Suggested change
|
||||||||||||||||||||
CXX_EXTENSIONS OFF | ||||||||||||||||||||
CXX_STANDARD_REQUIRED ON | ||||||||||||||||||||
POSITION_INDEPENDENT_CODE ON | ||||||||||||||||||||
|
@@ -475,10 +488,10 @@ if(openPMD_HAVE_ADIOS1) | |||||||||||||||||||
add_library(openPMD.ADIOS1.Serial SHARED ${IO_ADIOS1_SEQUENTIAL_SOURCE}) | ||||||||||||||||||||
add_library(openPMD.ADIOS1.Parallel SHARED ${IO_ADIOS1_SOURCE}) | ||||||||||||||||||||
target_compile_features(openPMD.ADIOS1.Serial | ||||||||||||||||||||
PUBLIC cxx_std_14 | ||||||||||||||||||||
PUBLIC ${openPMD_CXX_STD} | ||||||||||||||||||||
eschnett marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||
) | ||||||||||||||||||||
target_compile_features(openPMD.ADIOS1.Parallel | ||||||||||||||||||||
PUBLIC cxx_std_14 | ||||||||||||||||||||
PUBLIC ${openPMD_CXX_STD} | ||||||||||||||||||||
eschnett marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||
) | ||||||||||||||||||||
target_compile_options(openPMD.ADIOS1.Serial PUBLIC ${_msvc_options}) | ||||||||||||||||||||
target_compile_options(openPMD.ADIOS1.Parallel PUBLIC ${_msvc_options}) | ||||||||||||||||||||
|
@@ -498,6 +511,7 @@ if(openPMD_HAVE_ADIOS1) | |||||||||||||||||||
endif() | ||||||||||||||||||||
|
||||||||||||||||||||
set_target_properties(openPMD.ADIOS1.Serial PROPERTIES | ||||||||||||||||||||
CXX_STANDARD ${openPMD_CXX_STANDARD} | ||||||||||||||||||||
eschnett marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||
CXX_EXTENSIONS OFF | ||||||||||||||||||||
CXX_STANDARD_REQUIRED ON | ||||||||||||||||||||
POSITION_INDEPENDENT_CODE ON | ||||||||||||||||||||
|
@@ -525,6 +539,7 @@ if(openPMD_HAVE_ADIOS1) | |||||||||||||||||||
|
||||||||||||||||||||
if(openPMD_HAVE_MPI) | ||||||||||||||||||||
set_target_properties(openPMD.ADIOS1.Parallel PROPERTIES | ||||||||||||||||||||
CXX_STANDARD ${openPMD_CXX_STANDARD} | ||||||||||||||||||||
eschnett marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||
CXX_EXTENSIONS OFF | ||||||||||||||||||||
CXX_STANDARD_REQUIRED ON | ||||||||||||||||||||
POSITION_INDEPENDENT_CODE ON | ||||||||||||||||||||
|
@@ -685,6 +700,13 @@ set(openPMD_TEST_NAMES | |||||||||||||||||||
SerialIO | ||||||||||||||||||||
ParallelIO | ||||||||||||||||||||
) | ||||||||||||||||||||
if(openPMD_CXX_STANDARD STREQUAL 17) | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
list(APPEND openPMD_TEST_NAMES | ||||||||||||||||||||
RegionsBox | ||||||||||||||||||||
RegionsPoint | ||||||||||||||||||||
RegionsRegion | ||||||||||||||||||||
) | ||||||||||||||||||||
endif() | ||||||||||||||||||||
# command line tools | ||||||||||||||||||||
set(openPMD_CLI_TOOL_NAMES | ||||||||||||||||||||
ls | ||||||||||||||||||||
|
@@ -711,6 +733,11 @@ set(openPMD_EXAMPLE_NAMES | |||||||||||||||||||
10_streaming_read | ||||||||||||||||||||
12_span_write | ||||||||||||||||||||
) | ||||||||||||||||||||
if(openPMD_CXX_STANDARD STREQUAL 17) | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
list(APPEND openPMD_EXAMPLE_NAMES | ||||||||||||||||||||
13_regions | ||||||||||||||||||||
) | ||||||||||||||||||||
endif() | ||||||||||||||||||||
set(openPMD_PYTHON_EXAMPLE_NAMES | ||||||||||||||||||||
2_read_serial | ||||||||||||||||||||
2a_read_thetaMode_serial | ||||||||||||||||||||
|
@@ -737,9 +764,10 @@ if(openPMD_BUILD_TESTING) | |||||||||||||||||||
test/CatchRunner.cpp) # Always MPI_Init with Serial Fallback | ||||||||||||||||||||
add_library(CatchMain ${_openpmd_lib_type} | ||||||||||||||||||||
test/CatchMain.cpp) # Serial only | ||||||||||||||||||||
target_compile_features(CatchRunner PUBLIC cxx_std_14) | ||||||||||||||||||||
target_compile_features(CatchMain PUBLIC cxx_std_14) | ||||||||||||||||||||
target_compile_features(CatchRunner PUBLIC ${openPMD_CXX_STD}) | ||||||||||||||||||||
target_compile_features(CatchMain PUBLIC ${openPMD_CXX_STD}) | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
set_target_properties(CatchRunner CatchMain PROPERTIES | ||||||||||||||||||||
CXX_STANDARD ${openPMD_CXX_STANDARD} | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
CXX_EXTENSIONS OFF | ||||||||||||||||||||
CXX_STANDARD_REQUIRED ON | ||||||||||||||||||||
POSITION_INDEPENDENT_CODE ON | ||||||||||||||||||||
|
@@ -766,6 +794,12 @@ if(openPMD_BUILD_TESTING) | |||||||||||||||||||
else() | ||||||||||||||||||||
target_link_libraries(${testname}Tests PRIVATE CatchMain) | ||||||||||||||||||||
endif() | ||||||||||||||||||||
target_compile_features(${testname}Tests PUBLIC ${openPMD_CXX_STD}) | ||||||||||||||||||||
set_target_properties(${testname}Tests PROPERTIES | ||||||||||||||||||||
CXX_STANDARD ${openPMD_CXX_STANDARD} | ||||||||||||||||||||
CXX_EXTENSIONS OFF | ||||||||||||||||||||
CXX_STANDARD_REQUIRED ON | ||||||||||||||||||||
) | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
endforeach() | ||||||||||||||||||||
endif() | ||||||||||||||||||||
|
||||||||||||||||||||
|
@@ -782,10 +816,22 @@ if(openPMD_BUILD_EXAMPLES) | |||||||||||||||||||
if(openPMD_HAVE_MPI) | ||||||||||||||||||||
add_executable(${examplename} examples/${examplename}.cpp) | ||||||||||||||||||||
target_link_libraries(${examplename} PRIVATE openPMD) | ||||||||||||||||||||
target_compile_features(${examplename} PUBLIC ${openPMD_CXX_STD}) | ||||||||||||||||||||
set_target_properties(${examplename} PROPERTIES | ||||||||||||||||||||
CXX_STANDARD ${openPMD_CXX_STANDARD} | ||||||||||||||||||||
CXX_EXTENSIONS OFF | ||||||||||||||||||||
CXX_STANDARD_REQUIRED ON | ||||||||||||||||||||
) | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
endif() | ||||||||||||||||||||
else() | ||||||||||||||||||||
add_executable(${examplename} examples/${examplename}.cpp) | ||||||||||||||||||||
target_link_libraries(${examplename} PRIVATE openPMD) | ||||||||||||||||||||
target_compile_features(${examplename} PUBLIC ${openPMD_CXX_STD}) | ||||||||||||||||||||
set_target_properties(${examplename} PROPERTIES | ||||||||||||||||||||
CXX_STANDARD ${openPMD_CXX_STANDARD} | ||||||||||||||||||||
CXX_EXTENSIONS OFF | ||||||||||||||||||||
CXX_STANDARD_REQUIRED ON | ||||||||||||||||||||
) | ||||||||||||||||||||
eschnett marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||
endif() | ||||||||||||||||||||
endforeach() | ||||||||||||||||||||
endif() | ||||||||||||||||||||
|
@@ -1309,6 +1355,7 @@ else() | |||||||||||||||||||
message(" Installation: OFF") | ||||||||||||||||||||
endif() | ||||||||||||||||||||
message("") | ||||||||||||||||||||
message(" C++ standard: ${openPMD_CXX_STD}") | ||||||||||||||||||||
eschnett marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||
message(" Build Type: ${CMAKE_BUILD_TYPE}") | ||||||||||||||||||||
if(openPMD_BUILD_SHARED_LIBS) | ||||||||||||||||||||
message(" Library: shared") | ||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternative suggestion:
And below we check:
This way we:
CMAKE_CXX_STANDARD
options