Skip to content
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

WIP: Add Dump strategy to allow user configurable IO dumps #80

Open
wants to merge 109 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
5280700
Format tweaks.
Dec 30, 2018
49a2f0f
Fix what appears to be a memory error that dates back to the v407 ver…
Jan 7, 2019
7f1f5a4
Merge branch 'devel' of /home/wdn/repos/git/vpic into devel_wdn
Jan 11, 2019
d122704
Add configurable and documented build scripts for building VPIC on LA…
Jan 31, 2019
c8d0849
Additional updates to documentation.
Jan 31, 2019
aeabefd
Update compiler option documentation to make more accurate.
Jan 31, 2019
c376811
Reorder options a bit.
Jan 31, 2019
c96f8c5
For the lanl-ats1 script, make sure that the Cray programming environ…
Jan 31, 2019
d0adae8
Merge branch 'devel' of ../vpic_losalamos_devel into devel
Feb 2, 2019
c8aa82a
Merge branch 'devel' of ../vpic_losalamos_devel into devel
Feb 11, 2019
bb2baea
Fix issues and errors in use of float literals introduced in a previo…
Feb 11, 2019
8ab387d
Add CMake support for configuring a VPIC build with the legacy partic…
Feb 11, 2019
8515047
Separate lanl-ats1 script into two separate scripts, one for Haswell …
Feb 19, 2019
3782d9a
Reorder build configuration options to something that seems more sens…
Feb 20, 2019
f6d1c90
Merge branch 'devel' into devel
rfbird Feb 28, 2019
7e396dc
Add more documentation about various available CMake configuration va…
Feb 28, 2019
15181b8
Merge branch 'devel' of github.com:dnystrom1/vpic into devel
Feb 28, 2019
f13d916
Merge branch 'devel' of ../vpic_losalamos_devel into devel
Mar 4, 2019
af93571
Merge branch 'devel' of /home/wdn/repos/git/vpic into devel_wdn
Mar 4, 2019
46be479
Merge branch 'devel_wdn' of /home/wdn/repos/git/vpic into devel_wdn
Mar 4, 2019
61ad472
Switch all C files to C++ files unless it is explicit that they need …
Mar 11, 2019
3a03a88
Format tweaks.
Jul 10, 2019
58a6873
Initial beginning of ARM Neon intrinsics support.
Jul 10, 2019
304922e
Add CMake support for ARM NEON intrinsics.
Jul 15, 2019
c68b58a
Add NEON support for v4float binary operators.
Jul 15, 2019
ab4dd10
Add float32x4_t type to the v4_neon union.
Jul 15, 2019
66ad58a
Add ARM NEON intrinsics support for fma and fms.
Jul 15, 2019
f891774
Remove some tabs. Format tweaks. Add NEON intrinsics support for cont…
Jul 15, 2019
2ddef89
Add NEON intrinsics support for load_4x4_tr and store_4x4_tr.
Jul 15, 2019
2a2fedd
Add NEON intrinsics support for v4float assignment operators.
Jul 15, 2019
29c7a56
Add NEON intrinsics support for rsqrt and rcp functions.
Jul 15, 2019
a482375
Add NEON intrinsics support for transpose function.
Jul 15, 2019
7353705
Fix a typo.
Jul 15, 2019
4a80b01
Add support for benchmarking center_p and uncenter_p.
Jul 16, 2019
0c16a20
Change number of iterations for uncenter/center loop.
Jul 16, 2019
ec22f2c
Add NEON intrinsic support for v4float logical operators to v4_neon.h.
Jul 17, 2019
6be57c2
Try an implementation of load/store transpose operations using vld4q_…
Jul 17, 2019
e7fd3e0
Comment out new implementations for load_4x4_tr and store_4x4_tr sinc…
Jul 18, 2019
d9b7adb
More work on v4_neon support.
Jul 22, 2019
b62ab7a
Add another NEON implementation of transpose.
Jul 22, 2019
70191a6
Add new NEON implementations for load and store transpose functions.
Jul 23, 2019
2762aec
Try another idea for implementing the transpose function.
Jul 23, 2019
d82f07d
Add support for using load_4x8_tr and load_4x16_tr for the ARM NEON c…
Jul 25, 2019
b2f9017
Add test cases to V4 unit tests.
Jul 25, 2019
15b8da3
Fix a declaration error.
Jul 25, 2019
60703bd
Test different memory alignment for V4 NEON implementation.
Jul 25, 2019
cbdc2cc
Format tweak.
Jul 28, 2019
577b42e
Do not use special test version of V4 NEON implementations of center_…
Jul 29, 2019
7c6c53d
Revert rcp and rsqrt functions back to their portable versions to try…
Jul 29, 2019
bd000c4
Format tweaks and cleanup before merging into other branches.
Aug 5, 2019
d938848
Fix issue with undefined symbol.
Aug 5, 2019
78aa8a4
Try a fix to a unit test failure for the Altivec case.
Aug 5, 2019
562ec80
Modify TEST_CASE_load_4x2_tr to see if I can get it to pass on IBM wi…
Aug 5, 2019
990e9d9
Merge branch 'devel' of /home/wdn/repos/git/vpic into devel
Aug 5, 2019
58be63f
Merge branch 'devel' of /home/wdn/repos/git/vpic into devel_wdn
Aug 5, 2019
cbcc958
Remove a test hack.
Aug 6, 2019
0a2044e
Merge branch 'devel_wdn' of /home/wdn/repos/git/vpic into devel_wdn
Aug 6, 2019
10c2adb
Remove some experimental NEON intrinsic code.
Aug 6, 2019
23144b8
Remove more code that was used for testing ARM NEON intrinsics version.
Aug 6, 2019
679b6bb
Remove some dead code.
Aug 6, 2019
41b7d3e
Do not disable dynamic resizing since it is not disabled in github.
Aug 6, 2019
8599273
added global partition data to grid
rfbird Aug 13, 2019
08a2d2d
first pass adding a compiling port of viou for HDF5 vpic IO
rfbird Aug 13, 2019
d1ba88c
fixed small bug in global topoly setting and add field_interval value…
rfbird Aug 13, 2019
1836475
updated field interval to be the correct value
rfbird Aug 13, 2019
9c6fdeb
Merge branch 'devel' of https://github.com/lanl/vpic into hdf5
rfbird Aug 13, 2019
7a10247
clean up hdf5 build system. require paralle, and includes and guard e…
rfbird Oct 10, 2019
6fc3fdf
merge master and update build system to pass defines at the right time
rfbird Oct 10, 2019
5f8211b
allow user to change dumping flags in the deck
rfbird Oct 10, 2019
15d8b89
default init hdf5 dumping structs
rfbird Oct 14, 2019
7297106
temporarily disable second hydro dumping species as it breaks the cur…
rfbird Oct 15, 2019
8143ab3
modify sprinf of size_t to be the correct zu
rfbird Oct 15, 2019
eaa4c3c
remove scidac 407 ifdefs
rfbird Oct 15, 2019
6ad27e8
fix global static and re-enable multiple species dumping
rfbird Oct 15, 2019
f818491
first pass adding support for converting p->i to a global i
rfbird Oct 16, 2019
73e0716
add loop ovr particles and ability to write custom global pi to file
rfbird Oct 16, 2019
843babb
tidied up global particle id convert, close to correct now
rfbird Oct 22, 2019
351a785
first pass where build system does something useful
rfbird Oct 29, 2019
9dc9c40
First pass where data dumps cbx
rfbird Oct 30, 2019
0662a19
data verified using python
rfbird Nov 4, 2019
6b84163
quick tidy up and add j and e
rfbird Nov 4, 2019
572ee50
add particle dumping via openpmd (close but not passing openpmd file …
rfbird Nov 5, 2019
f197e3e
start refactoring dump into seperate class to better support user sel…
rfbird Nov 6, 2019
686c143
first compile and linking build of dump strategy
rfbird Nov 6, 2019
4615985
fixed include for unique pointer and add comment on inheritance
rfbird Nov 6, 2019
acd77ce
hdf5 backend seems to be working, including example of how to enable
rfbird Nov 12, 2019
a906666
get pmd backend working too
rfbird Nov 12, 2019
8fe8ace
Adding explicitly deleted constructors to better follow rule of 3. Ad…
rfbird Nov 12, 2019
79faebb
remove needless call to copy constructor in unit tests
rfbird Nov 13, 2019
37af427
change pmd series object to be a stack object
rfbird Nov 14, 2019
2087297
fix bug where vpic_simulation class variables were not inited. If a d…
rfbird Jan 15, 2020
6a75334
change dump_Strategy constructor interface to not take num_steps, as …
rfbird Jan 15, 2020
831b774
port H5_ALL bug found by Patrick, and replace with linearspace
rfbird Jan 15, 2020
2e108b9
added particle and field dump code for openpmd
rfbird Jan 21, 2020
5abef64
add note on compile time option
rfbird Jan 21, 2020
0edac57
Merge branch 'dump_strategy' of https://github.com/lanl/vpic into dum…
rfbird Jan 21, 2020
6e16fa0
merge local code and fix up compilation of new openpmd code
rfbird Jan 21, 2020
3a2e2cc
particles and fields both pass pmd validator, with no errors. Some wa…
rfbird Jan 21, 2020
f8b45c8
first pass adding hydro dump for openpmd
rfbird Jan 21, 2020
0ff0395
fix vector semantic where reserve was used instead of resize and incr…
rfbird Jan 30, 2020
c6d01c6
add code to expose user definable max openpmd particle write chunk size
rfbird Feb 2, 2020
fd1559a
add missing define for max io chunk, and hoist global id output optio…
rfbird Feb 2, 2020
2cc7b1d
first effort to expose user configrable file extension for openmpd
rfbird Feb 2, 2020
a648e47
renable hdf5 debug timing prints
rfbird Feb 4, 2020
46ae346
default vpic_simulation ptrs to nullptr
rfbird Oct 27, 2020
ade0a0f
disable restore test until we add logic to perform restore of dump strat
rfbird Nov 10, 2020
34bdedd
apply Bin's changed
rfbird Nov 23, 2020
657500e
apply clang format to dump_strategy.h
rfbird Nov 23, 2020
c3a63fc
revert change where hdf5 backend stopped tracking num_steps
rfbird Dec 1, 2020
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
163 changes: 103 additions & 60 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,20 @@ option(USE_LEGACY_SORT "Enable Legacy Sort Implementation" OFF)

option(VPIC_PRINT_MORE_DIGITS "Print more digits in VPIC timer info" OFF)

option(ENABLE_OPENSSL "Enable OpenSSL support for checksums" OFF)

option(DISABLE_DYNAMIC_RESIZING "Prevent particle arrays from dynamically resizing during a run" OFF)

option(USE_HDF5 "Enable HDF5 for use during IO. VPIC does not help you install HDF5" OFF)

option(USE_OPENPMD "Enable OpenPMD for use during IO. VPIC does not help you install OpenPM" OFF)

option(OUTPUT_CONVERT_GLOBAL_ID "Convert particle cell id to be global, such that it tells you a unique global location instead of a local offset" ON)

# option to set minimum number of particles
set(SET_MIN_NUM_PARTICLES AUTO CACHE STRING "Select minimum number of particles to use, if using dynamic particle array resizing")

# TODO: better name for this?
set(PMD_MAX_IO_CHUNK AUTO CACHE STRING "Select the maxiumum IO write size to use when writing -- applies to particles only, and is specified as number of particles. currently only honored by OpenPMD backend")


#------------------------------------------------------------------------------#
# Create include and link aggregates
Expand Down Expand Up @@ -125,31 +132,22 @@ if(NOT SET_MIN_NUM_PARTICLES STREQUAL "AUTO")
add_definitions(-DMIN_NP=${SET_MIN_NUM_PARTICLES})
endif()

#------------------------------------------------------------------------------#
# OpenSSL
#------------------------------------------------------------------------------#

if(ENABLE_OPENSSL)
find_package(OpenSSL REQUIRED)

include_directories(${OPENSSL_INCLUDE_DIR})
string(REPLACE ";" " " string_libraries "${OPENSSL_LIBRARIES}")
set(VPIC_CXX_LIBRARIES "${VPIC_CXX_LIBRARIES} ${string_libraries}")
endif(ENABLE_OPENSSL)
if(NOT PMD_MAX_IO_CHUNK STREQUAL "AUTO")
add_definitions(-DPMD_MAX_IO_CHUNK=${PMD_MAX_IO_CHUNK})
endif()

find_package(Threads REQUIRED)

#------------------------------------------------------------------------------#
# Act on build options set in project.cmake
#------------------------------------------------------------------------------#

#------------------------------------------------------------------------------#
# Add options for building with the legacy particle sort implementation.
#------------------------------------------------------------------------------#

if(USE_LEGACY_SORT)
add_definitions(-DVPIC_USE_LEGACY_SORT)
set(VPIC_CXX_FLAGS "${VPIC_CXX_FLAGS} -DVPIC_USE_LEGACY_SORT")
set(VPIC_CXX_FLAGS "${VPIC_CXX_FLAGS} -DVPIC_USE_LEGACY_SORT")
endif(USE_LEGACY_SORT)

#------------------------------------------------------------------------------#
Expand All @@ -164,7 +162,7 @@ endif()

if(USE_PTHREADS)
add_definitions(-DVPIC_USE_PTHREADS)
set(VPIC_CXX_FLAGS "${VPIC_CXX_FLAGS} -DVPIC_USE_PTHREADS")
set(VPIC_CXX_FLAGS "${VPIC_CXX_FLAGS} -DVPIC_USE_PTHREADS")
endif(USE_PTHREADS)

if(USE_OPENMP)
Expand Down Expand Up @@ -288,15 +286,23 @@ endif()
# Miscellaneous options.
#------------------------------------------------------------------------------#

if(ENABLE_OPENSSL)
add_definitions(-DENABLE_OPENSSL)
endif(ENABLE_OPENSSL)

if(VPIC_PRINT_MORE_DIGITS)
add_definitions(-DVPIC_PRINT_MORE_DIGITS)
set(VPIC_CXX_FLAGS "${VPIC_CXX_FLAGS} -DVPIC_PRINT_MORE_DIGITS")
endif(VPIC_PRINT_MORE_DIGITS)

if(USE_HDF5)
# Enable HDF5, and the relevant defines
find_package(HDF5 REQUIRED)
if (NOT HDF5_IS_PARALLEL)
message(FATAL_ERROR "HDF5 Parallel support is required: ${HDF5_IS_PARALLEL}")
endif()
add_definitions(-DVPIC_ENABLE_HDF5)
string(REPLACE ";" " " string_libraries "${HDF5_C_LIBRARIES}")
set(VPIC_CXX_LIBRARIES "${VPIC_CXX_LIBRARIES} ${string_libraries}")
include_directories(${HDF5_INCLUDE_DIRS})
endif(USE_HDF5)

#------------------------------------------------------------------------------#
# Handle vpic compile script last.
#------------------------------------------------------------------------------#
Expand All @@ -312,48 +318,12 @@ if(ENABLE_COVERAGE_BUILD)
set(VPIC_CXX_FLAGS "${VPIC_CXX_FLAGS} --coverage")
endif(ENABLE_COVERAGE_BUILD)

# process Makefile.run.in to get a simple Makefile.run for a run. Points to
# local built exe wrapper, and has example deck/platform.
configure_file(${CMAKE_SOURCE_DIR}/sample/Makefile.run.in
${CMAKE_BINARY_DIR}/bin/Makefile.run)

# Append all defines to VPIC_DEFINES, so it can be seen during input deck building
get_directory_property(ALL_DEFINES DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)
#string(REPLACE ";" " -D" EEK "${ALL_DEFINES}")
foreach(d ${ALL_DEFINES})
set(VPIC_DEFINES "${VPIC_DEFINES} -D${d}")
endforeach()

# install script
configure_file(${CMAKE_SOURCE_DIR}/bin/vpic.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vpic-install)
install(FILES ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vpic-install
DESTINATION bin
RENAME vpic
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)

install(FILES deck/main.cc deck/wrapper.cc DESTINATION share/vpic)
install(FILES deck/wrapper.h DESTINATION include/vpic)
install(DIRECTORY src/ DESTINATION include/vpic
FILES_MATCHING PATTERN "*.h")


# local script
configure_file(${CMAKE_SOURCE_DIR}/bin/vpic-local.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vpic)

file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vpic
DESTINATION ${CMAKE_BINARY_DIR}/bin
FILE_PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)

#------------------------------------------------------------------------------#
# Add library target
#------------------------------------------------------------------------------#
Expand All @@ -377,10 +347,49 @@ else()
set(VPIC_SRC)
install(TARGETS vpic LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
endif()

target_include_directories(vpic INTERFACE ${CMAKE_SOURCE_DIR}/src)
target_link_libraries(vpic ${VPIC_EXPOSE} ${MPI_CXX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES} ${CMAKE_DL_LIBS})
target_link_libraries(vpic ${VPIC_EXPOSE} ${MPI_CXX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} ${HDF5_C_LIBRARIES})
target_compile_options(vpic ${VPIC_EXPOSE} ${MPI_C_COMPILE_FLAGS})

# get absolute paths to linked libraries, and their transitive dependencies
function(openpmdreclibs tgtname outname)
get_target_property(PC_PRIVATE_LIBS_TGT ${tgtname} INTERFACE_LINK_LIBRARIES)
foreach(PC_LIB IN LISTS PC_PRIVATE_LIBS_TGT)
if(TARGET ${PC_LIB})
openpmdreclibs(${PC_LIB} ${outname})
else()
if(PC_LIB)
string(APPEND ${outname} " ${PC_LIB}")
endif()
endif()
endforeach()
set(${outname} ${${outname}} PARENT_SCOPE)
endfunction()

if(USE_OPENPMD)
# Enable openPMD, and the relevant defines
find_package(openPMD REQUIRED CONFIG COMPONENTS MPI)
target_link_libraries(vpic PRIVATE openPMD::openPMD)
target_compile_definitions(vpic PRIVATE "-DVPIC_ENABLE_OPENPMD")

add_definitions(-DVPIC_ENABLE_OPENPMD)

# legacy stuff for 2-phase compile
get_target_property(openPMD_LIBRARIES openPMD::openPMD LOCATION)
string(REPLACE ";" " " string_libraries "${openPMD_LIBRARIES}")
set(VPIC_CXX_LIBRARIES "${VPIC_CXX_LIBRARIES} ${string_libraries}")
get_target_property(openPMD_TYPE openPMD::openPMD TYPE)
if("${openPMD_TYPE}" STREQUAL "STATIC_LIBRARY")
openpmdreclibs(openPMD openPMD_TRANSITIVE_LIBS)
set(VPIC_CXX_LIBRARIES "${VPIC_CXX_LIBRARIES} ${openPMD_TRANSITIVE_LIBS}")
endif()
endif(USE_OPENPMD)

if(OUTPUT_CONVERT_GLOBAL_ID)
add_definitions(-DOUTPUT_CONVERT_GLOBAL_ID)
endif(OUTPUT_CONVERT_GLOBAL_ID)

macro(build_a_vpic name deck)
if(NOT EXISTS ${deck})
message(FATAL_ERROR "Could not find deck '${deck}'")
Expand Down Expand Up @@ -438,6 +447,40 @@ if(ENABLE_PERFORMANCE_TESTS)
include_directories(${CATCH_DIR})
add_subdirectory(test/performance)
endif(ENABLE_PERFORMANCE_TESTS)
#~---------------------------------------------------------------------------~-#
# vim: set tabstop=2 shiftwidth=2 expandtab :
#~---------------------------------------------------------------------------~-#

# process Makefile.run.in to get a simple Makefile.run for a run. Points to
# local built exe wrapper, and has example deck/platform.
configure_file(${CMAKE_SOURCE_DIR}/sample/Makefile.run.in
${CMAKE_BINARY_DIR}/bin/Makefile.run)

# Append all defines to VPIC_DEFINES, so it can be seen during input deck building
get_directory_property(ALL_DEFINES DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)
#string(REPLACE ";" " -D" EEK "${ALL_DEFINES}")
foreach(d ${ALL_DEFINES})
set(VPIC_DEFINES "${VPIC_DEFINES} -D${d}")
endforeach()

# install script
configure_file(${CMAKE_SOURCE_DIR}/bin/vpic.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vpic-install)
install(FILES ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vpic-install
DESTINATION bin
RENAME vpic
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)

# Configure local script to generate bin/vpic
configure_file(${CMAKE_SOURCE_DIR}/bin/vpic-local.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vpic)

file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vpic
DESTINATION ${CMAKE_BINARY_DIR}/bin
FILE_PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)

4 changes: 2 additions & 2 deletions bin/vpic-local.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

deck=`echo $1 | sed 's,\.cxx,,g;s,\.cc,,g;s,\.cpp,,g;s,.*\/,,g'`

echo "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} -I. -I${CMAKE_SOURCE_DIR}/src ${VPIC_CXX_FLAGS} -DINPUT_DECK=$1 ${CMAKE_SOURCE_DIR}/deck/main.cc ${CMAKE_SOURCE_DIR}/deck/wrapper.cc -o $deck.${CMAKE_SYSTEM_NAME} -Wl,-rpath,${CMAKE_BINARY_DIR} -L${CMAKE_BINARY_DIR} -lvpic ${VPIC_CXX_LIBRARIES} -lpthread -ldl"
echo "${CMAKE_CXX_COMPILER} ${VPIC_DEFINES} ${CMAKE_CXX_FLAGS} -I. -I${CMAKE_SOURCE_DIR}/src ${VPIC_CXX_FLAGS} -DINPUT_DECK=$1 ${CMAKE_SOURCE_DIR}/deck/main.cc ${CMAKE_SOURCE_DIR}/deck/wrapper.cc -o $deck.${CMAKE_SYSTEM_NAME} -Wl,-rpath,${CMAKE_BINARY_DIR} -L${CMAKE_BINARY_DIR} -lvpic ${VPIC_CXX_LIBRARIES} -lpthread -ldl"

${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} -I. -I${CMAKE_SOURCE_DIR}/src ${VPIC_CXX_FLAGS} -DINPUT_DECK=$1 ${CMAKE_SOURCE_DIR}/deck/main.cc ${CMAKE_SOURCE_DIR}/deck/wrapper.cc -o $deck.${CMAKE_SYSTEM_NAME} -Wl,-rpath,${CMAKE_BINARY_DIR} -L${CMAKE_BINARY_DIR} -lvpic ${VPIC_CXX_LIBRARIES} -lpthread -ldl
${CMAKE_CXX_COMPILER} ${VPIC_DEFINES} ${CMAKE_CXX_FLAGS} -I. -I${CMAKE_SOURCE_DIR}/src ${VPIC_CXX_FLAGS} -DINPUT_DECK=$1 ${CMAKE_SOURCE_DIR}/deck/main.cc ${CMAKE_SOURCE_DIR}/deck/wrapper.cc -o $deck.${CMAKE_SYSTEM_NAME} -Wl,-rpath,${CMAKE_BINARY_DIR} -L${CMAKE_BINARY_DIR} -lvpic ${VPIC_CXX_LIBRARIES} -lpthread -ldl
6 changes: 6 additions & 0 deletions deck/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ int main(int argc, char** argv)
}
simulation = new vpic_simulation();
simulation->initialize( argc, argv );

// do post init setup to consume deck values
// which includes setting dump starts steps, as we didn't know it sooner
// TODO: make this use sane functions
simulation->dump_strategy->num_step = simulation->num_step;

REGISTER_OBJECT( &simulation, checkpt_main, restore_main, NULL );
}

Expand Down
Loading