Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mccoys committed Dec 6, 2023
2 parents a13e6d2 + 02a7520 commit 15b43ae
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 49 deletions.
75 changes: 73 additions & 2 deletions doc/Sphinx/Overview/material.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,49 @@ As of November 2021, 90 papers have been published covering a broad range of top
There is now a utility to add new entries to this list.
Use the python script doc/doi2publications.py to generate entries from a DOI number, and paste them here
.. [Guo2023]
A. Guo, Q. Lu, S. Lu, S. Wang and R. Wang,
`Properties of Electron-scale Magnetic Reconnection at a Quasi-perpendicular Shock`,
`The Astrophysical Journal 955, 1 (2023) <https://doi.org/10.3847/1538-4357/acec48>`_
.. [Si2023]
M. Si, Y. Huang, M. Ruan, B. Shen, Z. Xu, T. Yu, X. Wang and Y. Chen,
`Relativistic-guided stable mode of few-cycle 20 micron level infrared radiation`,
`Optics Express 31, 24, 40202-40209 (2023) <https://doi.org/10.1364/OE.503814>`_
.. [Vallieres2023]
S. Vallières, J. Powell, T. Connell, M. Evans, M. Lytova, F. Fillion-Gourdeau, S. Fourmaux, S. Payeur, P. Lassonde, S. MacLean, and F. Légaré,
`High Dose-Rate MeV Electron Beam from a Tightly-Focused Femtosecond IR Laser in Ambient Air`,
`Laser and Photonics Review 23000782300078 (2023) <https://doi.org/10.1002/lpor.202300078>`_
.. [Starodubtseva2023]
E. Starodubtseva, I. Tsymbalov, D. Gorlova, K. Ivanov, and A. Savel'ev,
`Low energy electron injection for direct laser acceleration`,
`Phys. Plasmas 30, 083105 (2023) <https://doi.org/10.1063/5.0155196>`_
.. [Maffini2023]
A. Maffini, F. Mirani, M. Galbiati, K. Ambrogioni, F. Gatti, M. S. G. De Magistris, D. Vavassori, D. Orecchia, D. Dellasega, V. Russo, M. Zavelani-Rossi and M. Passoni,
`Towards compact laser-driven accelerators: exploring the potential of advanced double-layer targets`,
`EPJ Techniques and Instrumentation 10, 15 (2023) <https://doi.org/10.1140/epjti/s40485-023-00102-8>`_
.. [Guskov2023]
S. Yu. Gus'kov, Ph. Korneev, and M. Murakami,
`Laser-driven electrodynamic implosion of fast ions in a thin shell`,
`Matter Radiat. Extremes 8, 056602 (2023) <https://doi.org/10.1063/5.0156113>`_
.. [RezaeiPandari2023]
M. Rezaei-Pandari, M. Mirzaie, C. I. Hojbota, T. G. Pak, S. B. Kim, G. W. Lee, R. Massudi, A. R. Niknam, S. K. Lee, K.-Y. Kim, and C. H. Nam,
`Laser Wakefield Electron Acceleration with Polarization-Dependent Ionization Injection`,
`Physical Review Applied 20, 034026 (2023) <http://dx.doi.org/10.1103/PhysRevApplied.20.034026>`_
.. [Jonnerby2023]
J. Jonnerby, A. von Boetticher, J. Holloway, L. Corner, A. Picksley, A. J. Ross, R. J. Shalloo , C. Thornton, N. Bourgeois, R. Walczak, and S. M. Hooker,
Expand Down Expand Up @@ -173,6 +216,25 @@ As of November 2021, 90 papers have been published covering a broad range of top
`Electron acceleration by laser plasma wedge interaction`,
`Phys. Rev. Research 5, 013115 (2023) <http://dx.doi.org/10.1103/PhysRevResearch.5.013115>`_
.. [Bukharskii2022]
N. Bukharskii, Iu. Kochetkov and Ph. Korneev,
`Terahertz annular antenna driven with a short intense laser pulse`,
`Applied Physics Letters 120, 014102 (2022) <https://doi.org/10.1063/5.0076700>`_
.. [Jirka2022]
M. Jirka, P. Sasorov and S. V. Bulanov,
`New and old physics in the interaction of a radiating electron with the extreme electromagnetic field`,
`Physical Review D 105, 113004 (2022) <https://doi.org/10.1103/PhysRevD.105.113004>`_
.. [Geng2022]
X. Geng, L. Ji and B. Shen,
`Quasimonochromatic Bright Gamma-ray Generation from Synchronized Compton Scattering via Azimuthal Spatial-Temporal Coupling`,
`Physical Review Applied 17, 024055 (2022) <https://doi.org/10.1063/5.0084870>`_
.. [Yan2022]
X. Yan, Y. Wu, X. Geng, H. Zhang, B. Shen and L. Ji,
Expand Down Expand Up @@ -306,8 +368,6 @@ As of November 2021, 90 papers have been published covering a broad range of top
`Stimulated-Raman-scattering amplification of attosecond XUV pulses with pulse-train pumps and application to local in-depth plasma-density measurement`,
`Phys. Rev. E 106, 045208 (2022) <http://dx.doi.org/10.1103/PhysRevE.106.045208>`_
.. [Krafft2022b]
C. Krafft and P. Savoini,
Expand Down Expand Up @@ -369,7 +429,18 @@ As of November 2021, 90 papers have been published covering a broad range of top
`In International Conference on High Performance Computing in Asia-Pacific Region Workshops (HPCAsia 2022 Workshop).
Association for Computing Machinery, New York, NY, USA, 40–48. (2022) <http://doi.org/10.1145/3503470.3503475>`_
.. [Tiwary2021]
S. Tiwary and N. Kumar,
`Particle jets in colliding two ultraintense laser pulses of varying frequencies`,
`Physical Review Research 3, 043190 (2021) <https://doi.org/10.1103/PhysRevResearch.3.043190>`_
.. [Spiers2021]
B. T. Spiers, R. Aboushelbaya, Q. Feng, M. W. Mayr, I. Ouatu, R. W. Paddock, R. Timmis, R. H.-W. Wang and P. A. Norreys,
`Methods for extremely sparse-angle proton tomography`,
`Physical Review E 104, 045201 (2021) <https://doi.org/10.1103/PhysRevE.104.045201>`_
.. [Tomassini2021]
Paolo Tomassini, Francesco Massimo, Luca Labate and Leonida A. Gizzi,
Expand Down
4 changes: 4 additions & 0 deletions doc/Sphinx/Overview/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ Changes made in the repository (not released)
* Changed coordinate reference for 2D probe in 3D or AM geometry
(zero is the box origin projected orthogonally on the probe plane).

* Bug fixes:

* ``dump_minutes`` often failed to write some checkpoint files.

----

Projects
Expand Down
5 changes: 3 additions & 2 deletions happi/_Diagnostics/Probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ def _init(self, requestedProbe=None, field=None, timesteps=None, subset=None, av
self._dataForTime = {}
for file in self._h5probe:
for key, val in file.items():
try : self._dataForTime[int(key)] = val
except Exception as e: break
if val:
try : self._dataForTime[int(key)] = val
except Exception as e: break
self._alltimesteps = self._np.double(sorted(self._dataForTime.keys()))
if self._alltimesteps.size == 0:
raise Exception("No timesteps found")
Expand Down
48 changes: 17 additions & 31 deletions src/Checkpoint/Checkpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "LaserEnvelope.h"
#include "BinaryProcesses.h"
#include "CollisionalNuclearReaction.h"
#include <unistd.h>

using namespace std;

Expand All @@ -49,11 +50,9 @@ Checkpoint::Checkpoint( Params &params, SmileiMPI *smpi ) :
dump_minutes( 0.0 ),
exit_after_dump( true ),
time_reference( MPI_Wtime() ),
time_dump_step( 0 ),
keep_n_dumps( 2 ),
keep_n_dumps_max( 10000 ),
dump_deflate( 0 ),
dump_request( smpi->getSize() ),
file_grouping( 0 )
{

Expand All @@ -66,7 +65,7 @@ Checkpoint::Checkpoint( Params &params, SmileiMPI *smpi ) :

PyTools::extract( "dump_minutes", dump_minutes, "Checkpoints" );
if( dump_minutes > 0 ) {
MESSAGE( 1, "Code will stop after " << dump_minutes << " minutes" );
MESSAGE( 1, "Code will dump after " << dump_minutes << " minutes" );
}

PyTools::extract( "keep_n_dumps", keep_n_dumps, "Checkpoints" );
Expand Down Expand Up @@ -186,40 +185,27 @@ Checkpoint::~Checkpoint() {}

void Checkpoint::dump( VectorPatch &vecPatches, Region &region, unsigned int itime, SmileiMPI *smpi, SimWindow *simWindow, Params &params )
{

// check for excedeed time
if( dump_minutes != 0.0 ) {
int tagUB = smpi->getTagUB();
bool dump_now = false;

// Find out whether we should make a checkpoint due to dump_minutes
if( dump_minutes != 0. ) {
// master checks whenever we passed the time limit
if( smpi->isMaster() && time_dump_step==0 ) {
double elapsed_time = ( MPI_Wtime() - time_reference )/60.;
if( elapsed_time > dump_minutes ) {
time_dump_step = itime+1; // we will dump at next timestep (in case non-master already passed)
MESSAGE( "Reached time limit : " << elapsed_time << " minutes. Dump timestep : " << time_dump_step );
// master does a non-blocking send
for( unsigned int dest=0; dest < ( unsigned int ) smpi->getSize(); dest++ ) {
MPI_Isend( &time_dump_step, 1, MPI_UNSIGNED, dest, tagUB, smpi->world(), &dump_request[dest] );
}
}
} else { // non master nodes receive the time_dump_step (non-blocking)
int todump=0;
MPI_Iprobe( 0, tagUB, MPI_COMM_WORLD, &todump, &dump_status_prob );
if( todump ) {
MPI_Recv( &time_dump_step, 1, MPI_UNSIGNED, 0, tagUB, smpi->world(), &dump_status_recv );
}
if( smpi->isMaster() && MPI_Wtime() - time_reference > dump_minutes * 60. ) {
dump_now = true;
}
smpi->barrier();
// Broadcast the result
MPI_Bcast( &dump_now, 1, MPI_CXX_BOOL, 0, smpi->world() );
}

if( signal_received!=0 ||
( dump_step != 0 && ( ( itime-this_run_start_step ) % dump_step == 0 ) ) ||
( time_dump_step!=0 && itime==time_dump_step ) ) {

// Dump if at requested timestep
dump_now = dump_now || ( dump_step != 0 && ( ( itime-this_run_start_step ) % dump_step == 0 ) );

if( signal_received != 0 || dump_now ) {
dumpAll( vecPatches, region, itime, smpi, simWindow, params );
if( exit_after_dump || ( ( signal_received!=0 ) && ( signal_received != SIGUSR2 ) ) ) {
exit_asap=true;
exit_asap = true;
}
signal_received=0;
time_dump_step=0;
signal_received = 0;
time_reference = MPI_Wtime();
}
}
Expand Down
15 changes: 1 addition & 14 deletions src/Checkpoint/Checkpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ class Checkpoint
//! incremental number of times we've done a dump
unsigned int dump_number;

//! incremental number of times we've done a dump_minutes
unsigned int dump_minutes_times;

//! this static variable is defined (in the .cpp) as false but becomes true when
//! the signal SIGUSR1 is captured by the signal_callback_handler fnction
static int signal_received;
Expand Down Expand Up @@ -113,19 +110,13 @@ class Checkpoint
void dumpMovingWindow( H5Write &f, SimWindow *simWindow );
void restartMovingWindow( H5Read &f, SimWindow *simWindow );

//! function that returns elapsed time from creator (uses private var time_reference)
//double time_seconds();

//! to dump and stop a simulation you might just check if a file named stop has been created this variable
//! is true if since last time a file named stop appeared
bool stop_file_seen_since_last_check;

//! time of the constructor
//! Last dump time
double time_reference;

//! step at which perform a dump in case time_dump returns true
unsigned int time_dump_step;

//! keep the last keep_n_dumps dump files
unsigned int keep_n_dumps;
const unsigned int keep_n_dumps_max;
Expand All @@ -136,10 +127,6 @@ class Checkpoint
//! int deflate dump value
int dump_deflate;

std::vector<MPI_Request> dump_request;
MPI_Status dump_status_prob;
MPI_Status dump_status_recv;

//! group checkpoint files in subdirs of file_grouping files
unsigned int file_grouping;

Expand Down

0 comments on commit 15b43ae

Please sign in to comment.