Skip to content

Commit 55f126e

Browse files
author
Frederic Perez
committed
cleanup a bunch of unused parameters
1 parent de648ee commit 55f126e

File tree

165 files changed

+703
-1194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+703
-1194
lines changed

doc/Sphinx/implementation.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -638,8 +638,7 @@ in the following pieces of code.
638638
params, diag_flag, partwalls( ipatch ),
639639
( *this )( ipatch ), smpi,
640640
RadiationTables,
641-
MultiphotonBreitWheelerTables,
642-
localDiags );
641+
MultiphotonBreitWheelerTables );
643642
644643
// ...
645644

makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ VERSION:=$(shell $(PYTHONEXE) scripts/compile_tools/get-version.py )
4747
COMPILER_INFO := $(shell $(SMILEICXX) -show | cut -d' ' -f1)
4848

4949
ifeq ($(findstring g++, $(COMPILER_INFO)), g++)
50-
CXXFLAGS += -Wno-reorder -Wno-unused-parameter
50+
CXXFLAGS += -Wno-reorder
5151
else ifeq ($(findstring clang++, $(COMPILER_INFO)), clang++)
5252
CXXFLAGS += -Wdeprecated-register
5353
endif
@@ -76,6 +76,8 @@ TABLES_SRCS := $(shell find tools/tables/* -name \*.cpp)
7676

7777
# Smilei version
7878
CXXFLAGS += -D__VERSION=\"$(VERSION)\"
79+
# Remove OpenMPI warnings
80+
CXXFLAGS += -DOMPI_SKIP_MPICXX
7981
# C++ version
8082
ifeq ($(findstring armclang++, $(COMPILER_INFO)), armclang++)
8183
CXXFLAGS += -std=c++11 -Wall

src/Checkpoint/Checkpoint.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <mpi.h>
1414

1515
#include "Params.h"
16-
#include "OpenPMDparams.h"
1716
#include "SmileiMPI.h"
1817
#include "Patch.h"
1918
#include "Region.h"
@@ -585,7 +584,7 @@ void Checkpoint::readPatchDistribution( SmileiMPI *smpi, SimWindow *simWin )
585584
}
586585

587586

588-
void Checkpoint::restartAll( VectorPatch &vecPatches, Region &region, SmileiMPI *smpi, SimWindow *simWin, Params &params, OpenPMDparams &openPMD )
587+
void Checkpoint::restartAll( VectorPatch &vecPatches, Region &region, SmileiMPI *smpi, Params &params )
589588
{
590589
MESSAGE( 1, "READING fields and particles for restart" );
591590

src/Checkpoint/Checkpoint.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Checkpoint
4646
//! restart everything to file per processor
4747
void readPatchDistribution( SmileiMPI *smpi, SimWindow *simWin );
4848
void readRegionDistribution( Region &region );
49-
void restartAll( VectorPatch &vecPatches, Region &region, SmileiMPI *smpi, SimWindow *simWin, Params &params, OpenPMDparams &openPMD );
49+
void restartAll( VectorPatch &vecPatches, Region &region, SmileiMPI *smpi, Params &params );
5050
void restartPatch( Patch *patch, Params &params, H5Read &g );
5151

5252
//! restart field per proc

src/Collisions/CollisionalIonization.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ void CollisionalIonization::calculate( double gamma_s, double gammae, double gam
271271

272272

273273
// Finish the ionization (moves new electrons in place)
274-
void CollisionalIonization::finish( Params &params, Patch *patch, std::vector<Diagnostic *> &localDiags, bool intra, std::vector<unsigned int> sg1, std::vector<unsigned int> sg2, int itime )
274+
void CollisionalIonization::finish( Params &params, Patch *patch, std::vector<Diagnostic *> &localDiags, bool, std::vector<unsigned int>, std::vector<unsigned int>, int )
275275
{
276276
patch->vecSpecies[ionization_electrons_]->importParticles( params, patch, new_electrons, localDiags );
277277
}

src/Collisions/CollisionalNuclearReaction.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void CollisionalNuclearReaction::apply( Random *random, BinaryProcessData &D )
148148
// Finish the reaction
149149
void CollisionalNuclearReaction::finish(
150150
Params &params, Patch *patch, std::vector<Diagnostic *> &localDiags,
151-
bool intra_collisions, vector<unsigned int> sg1, vector<unsigned int> sg2, int itime
151+
bool intra_collisions, vector<unsigned int> sg1, vector<unsigned int> sg2, int
152152
) {
153153
// Move new particles in place
154154
for( unsigned int i=0; i<product_particles_.size(); i++ ) {

src/Collisions/Collisions.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ void Collisions::apply( Random *random, BinaryProcessData &D )
133133
logLmean_ += logL;
134134
}
135135

136-
void Collisions::finish( Params &, Patch *, std::vector<Diagnostic *> &, bool intra, std::vector<unsigned int> sg1, std::vector<unsigned int> sg2, int itime )
136+
void Collisions::finish( Params &, Patch *, std::vector<Diagnostic *> &, bool, std::vector<unsigned int>, std::vector<unsigned int>, int )
137137
{
138138
if( npairs_tot_>0. ) {
139139
smean_ /= npairs_tot_;

src/Diagnostic/Diagnostic.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ public :
3232
virtual void closeFile() = 0;
3333

3434
//! Misc init.
35-
virtual void init( Params &params, SmileiMPI *smpi, VectorPatch &vecPatches ) {};
35+
virtual void init( Params &, SmileiMPI *, VectorPatch & ) {};
3636

3737
//! Prepares the diag and check whether it is time to run. Only by MPI master for global diags. Only by patch master for local diags.
3838
virtual bool prepare( int itime ) = 0;
3939

4040
//! Runs the diag for a given patch for global diags.
41-
virtual void run( Patch *patch, int itime, SimWindow *simWindow ) {};
41+
virtual void run( Patch *, int , SimWindow * ) {};
4242

4343
//! Runs the diag for all patches for local diags.
44-
virtual void run( SmileiMPI *smpi, VectorPatch &vecPatches, int itime, SimWindow *simWindow, Timers &timers ) {};
44+
virtual void run( SmileiMPI *, VectorPatch &, int , SimWindow *, Timers & ) {};
4545

4646
//! Writes out a global diag diag.
47-
virtual void write( int itime, SmileiMPI *smpi ) {};
47+
virtual void write( int, SmileiMPI * ) {};
4848

4949
//! Tells whether this diagnostic requires the pre-calculation of the particle J & Rho
50-
virtual bool needsRhoJs( int itime )
50+
virtual bool needsRhoJs( int )
5151
{
5252
return false;
5353
};
@@ -62,7 +62,7 @@ public :
6262
virtual int getMemFootPrint() = 0;
6363

6464
//! Get disk footprint of current diagnostic
65-
virtual uint64_t getDiskFootPrint( int istart, int istop, Patch *patch )
65+
virtual uint64_t getDiskFootPrint( int, int, Patch * )
6666
{
6767
return 0.;
6868
};

src/Diagnostic/DiagnosticFields.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ DiagnosticFields::DiagnosticFields( Params &params, SmileiMPI *smpi, VectorPatch
156156
if( time_average > 1 ) {
157157
for( unsigned int ifield=0; ifield<fields_names.size(); ifield++ )
158158
vecPatches( ipatch )->EMfields->allFields_avg[diag_n].push_back(
159-
vecPatches( ipatch )->EMfields->createField( fields_names[ifield],params )
159+
vecPatches( ipatch )->EMfields->createField( fields_names[ifield], params )
160160
);
161161
}
162162
}
@@ -208,7 +208,7 @@ DiagnosticFields::~DiagnosticFields()
208208
delete flush_timeSelection;
209209
}
210210

211-
void DiagnosticFields::openFile( Params &params, SmileiMPI *smpi )
211+
void DiagnosticFields::openFile( Params &, SmileiMPI *smpi )
212212
{
213213
if( file_ ) {
214214
return;
@@ -242,7 +242,7 @@ void DiagnosticFields::closeFile()
242242

243243

244244

245-
void DiagnosticFields::init( Params &params, SmileiMPI *smpi, VectorPatch &vecPatches )
245+
void DiagnosticFields::init( Params &params, SmileiMPI *smpi, VectorPatch & )
246246
{
247247
// create the file
248248
openFile( params, smpi );
@@ -260,7 +260,7 @@ bool DiagnosticFields::prepare( int itime )
260260
}
261261

262262

263-
void DiagnosticFields::run( SmileiMPI *smpi, VectorPatch &vecPatches, int itime, SimWindow *simWindow, Timers &timers )
263+
void DiagnosticFields::run( SmileiMPI *smpi, VectorPatch &vecPatches, int itime, SimWindow *simWindow, Timers & )
264264
{
265265
// If time-averaging, increment the average
266266
if( time_average>1 ) {
@@ -320,7 +320,7 @@ void DiagnosticFields::run( SmileiMPI *smpi, VectorPatch &vecPatches, int itime,
320320
#pragma omp master
321321
{
322322
// Write
323-
H5Write dset = writeField( iteration_group_, fields_names[ifield], itime );
323+
H5Write dset = writeField( iteration_group_, fields_names[ifield] );
324324
// Attributes for openPMD
325325
openPMD_->writeFieldAttributes( dset, subgrid_start_, subgrid_step_ );
326326
openPMD_->writeRecordAttributes( dset, field_type[ifield] );
@@ -351,7 +351,7 @@ bool DiagnosticFields::needsRhoJs( int itime )
351351
}
352352

353353
// SUPPOSED TO BE EXECUTED ONLY BY MASTER MPI
354-
uint64_t DiagnosticFields::getDiskFootPrint( int istart, int istop, Patch *patch )
354+
uint64_t DiagnosticFields::getDiskFootPrint( int istart, int istop, Patch * )
355355
{
356356
uint64_t footprint = 0;
357357
uint64_t nfields = fields_indexes.size();

src/Diagnostic/DiagnosticFields.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public :
2323

2424
virtual void run( SmileiMPI *smpi, VectorPatch &vecPatches, int itime, SimWindow *simWindow, Timers &timers ) override;
2525

26-
virtual H5Write writeField( H5Write*, std::string, int ) = 0;
26+
virtual H5Write writeField( H5Write*, std::string ) = 0;
2727

2828
virtual bool needsRhoJs( int itime ) override;
2929

src/Diagnostic/DiagnosticFields1D.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void DiagnosticFields1D::getField( Patch *patch, unsigned int ifield )
113113

114114

115115
// Write current buffer to file
116-
H5Write DiagnosticFields1D::writeField( H5Write * loc, std::string name, int itime )
116+
H5Write DiagnosticFields1D::writeField( H5Write * loc, std::string name )
117117
{
118118
return loc->array( name, data[0], filespace, memspace );
119119
}

src/Diagnostic/DiagnosticFields1D.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DiagnosticFields1D : public DiagnosticFields
1919
//! Copy patch field to current "data" buffer
2020
void getField( Patch *patch, unsigned int ) override;
2121

22-
H5Write writeField( H5Write*, std::string, int ) override;
22+
H5Write writeField( H5Write*, std::string ) override;
2323
private:
2424
unsigned int MPI_start_in_file, total_patch_size;
2525
};

src/Diagnostic/DiagnosticFields2D.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ bool patch_sorting( PatchIXY patch1_ixy, PatchIXY patch2_ixy ) {
7272
}
7373
}
7474

75-
void DiagnosticFields2D::setFileSplitting( SmileiMPI *smpi, VectorPatch &vecPatches )
75+
void DiagnosticFields2D::setFileSplitting( SmileiMPI *, VectorPatch &vecPatches )
7676
{
7777
H5Sselect_none( filespace->sid_ );
7878

@@ -182,7 +182,7 @@ void DiagnosticFields2D::getField( Patch *patch, unsigned int ifield )
182182

183183

184184
// Write current buffer to file
185-
H5Write DiagnosticFields2D::writeField( H5Write * loc, std::string name, int itime )
185+
H5Write DiagnosticFields2D::writeField( H5Write * loc, std::string name )
186186
{
187187
return loc->array( name, data[0], filespace, memspace );
188188
}

src/Diagnostic/DiagnosticFields2D.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DiagnosticFields2D : public DiagnosticFields
1919
//! Copy patch field to current "data" buffer
2020
void getField( Patch *patch, unsigned int ) override;
2121

22-
H5Write writeField( H5Write*, std::string, int ) override;
22+
H5Write writeField( H5Write*, std::string ) override;
2323

2424
private:
2525

src/Diagnostic/DiagnosticFields3D.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ bool patch_sorting( PatchIXYZ patch1_ixyz, PatchIXYZ patch2_ixyz ) {
7878
}
7979
}
8080

81-
void DiagnosticFields3D::setFileSplitting( SmileiMPI *smpi, VectorPatch &vecPatches )
81+
void DiagnosticFields3D::setFileSplitting( SmileiMPI *, VectorPatch &vecPatches )
8282
{
8383
H5Sselect_none( filespace->sid_ );
8484

@@ -216,7 +216,7 @@ void DiagnosticFields3D::getField( Patch *patch, unsigned int ifield )
216216

217217

218218
// Write current buffer to file
219-
H5Write DiagnosticFields3D::writeField( H5Write * loc, string name, int itime )
219+
H5Write DiagnosticFields3D::writeField( H5Write * loc, string name )
220220
{
221221
return loc->array( name, data[0], filespace, memspace );
222222
}

src/Diagnostic/DiagnosticFields3D.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DiagnosticFields3D : public DiagnosticFields
1919
//! Copy patch field to current "data" buffer
2020
void getField( Patch *patch, unsigned int ) override;
2121

22-
H5Write writeField( H5Write*, std::string, int ) override;
22+
H5Write writeField( H5Write*, std::string ) override;
2323

2424
private:
2525

src/Diagnostic/DiagnosticFieldsAM.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ bool patch_sorting_AM( PatchIXY patch1_ixy, PatchIXY patch2_ixy ) {
9696
}
9797
}
9898

99-
void DiagnosticFieldsAM::setFileSplitting( SmileiMPI *smpi, VectorPatch &vecPatches )
99+
void DiagnosticFieldsAM::setFileSplitting( SmileiMPI *, VectorPatch &vecPatches )
100100
{
101101
H5Sselect_none( filespace->sid_ );
102102

@@ -223,18 +223,18 @@ void DiagnosticFieldsAM::getField( Patch *patch, unsigned int ifield, F& out_dat
223223
}
224224

225225
// Write current buffer to file
226-
H5Write DiagnosticFieldsAM::writeField( H5Write * loc, string name, int itime )
226+
H5Write DiagnosticFieldsAM::writeField( H5Write * loc, string name )
227227
{
228228
if( is_complex_ ) {
229-
return writeField< std::vector< std::complex<double> > >( loc, name, itime, idata );
229+
return writeField< std::vector< std::complex<double> > >( loc, name, idata );
230230
} else {
231-
return writeField< std::vector< double > >( loc, name, itime, data );
231+
return writeField< std::vector< double > >( loc, name, data );
232232
}
233233
}
234234

235235
// Write current buffer to file
236236
template<typename F>
237-
H5Write DiagnosticFieldsAM::writeField( H5Write *loc, string name, int itime, F& linearized_data )
237+
H5Write DiagnosticFieldsAM::writeField( H5Write *loc, string name, F& linearized_data )
238238
{
239239
// Rewrite the file with the previously defined partition
240240
return loc->array( name, linearized_data[0], H5T_NATIVE_DOUBLE, filespace, memspace );

src/Diagnostic/DiagnosticFieldsAM.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class DiagnosticFieldsAM : public DiagnosticFields
2020
void getField( Patch *patch, unsigned int ) override;
2121
template<typename T, typename F> void getField( Patch *patch, unsigned int, F& out_data );
2222

23-
H5Write writeField( H5Write*, std::string, int ) override;
24-
template<typename F> H5Write writeField( H5Write*, std::string, int itime, F& linearized_data );
23+
H5Write writeField( H5Write*, std::string ) override;
24+
template<typename F> H5Write writeField( H5Write*, std::string, F& linearized_data );
2525

2626
private:
2727
std::vector<unsigned int> buffer_skip_x, buffer_skip_y;

src/Diagnostic/DiagnosticParticleBinningBase.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ DiagnosticParticleBinningBase::~DiagnosticParticleBinningBase()
146146

147147

148148
// Called only by patch master of process master
149-
void DiagnosticParticleBinningBase::openFile( Params &params, SmileiMPI *smpi )
149+
void DiagnosticParticleBinningBase::openFile( Params &, SmileiMPI *smpi )
150150
{
151151
if( !smpi->isMaster() || file_ ) {
152152
return;
@@ -288,7 +288,7 @@ void DiagnosticParticleBinningBase::calculate_auto_limits( Patch *patch, SimWind
288288
}
289289

290290
// run one particle binning diagnostic
291-
void DiagnosticParticleBinningBase::run( Patch *patch, int itime, SimWindow *simWindow )
291+
void DiagnosticParticleBinningBase::run( Patch *patch, int, SimWindow *simWindow )
292292
{
293293

294294

@@ -389,7 +389,7 @@ void DiagnosticParticleBinningBase::clear()
389389

390390

391391
// SUPPOSED TO BE EXECUTED ONLY BY MASTER MPI
392-
uint64_t DiagnosticParticleBinningBase::getDiskFootPrint( int istart, int istop, Patch *patch )
392+
uint64_t DiagnosticParticleBinningBase::getDiskFootPrint( int istart, int istop, Patch * )
393393
{
394394
uint64_t footprint = 0;
395395

src/Diagnostic/DiagnosticPerformances.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void DiagnosticPerformances::closeFile()
123123

124124

125125

126-
void DiagnosticPerformances::init( Params &params, SmileiMPI *smpi, VectorPatch &vecPatches )
126+
void DiagnosticPerformances::init( Params &params, SmileiMPI *smpi, VectorPatch & )
127127
{
128128
// create the file
129129
openFile( params, smpi );
@@ -140,7 +140,7 @@ bool DiagnosticPerformances::prepare( int itime )
140140
} // END prepare
141141

142142

143-
void DiagnosticPerformances::run( SmileiMPI *smpi, VectorPatch &vecPatches, int itime, SimWindow *simWindow, Timers &timers )
143+
void DiagnosticPerformances::run( SmileiMPI *, VectorPatch &vecPatches, int itime, SimWindow *, Timers &timers )
144144
{
145145

146146
#pragma omp master
@@ -306,7 +306,7 @@ void DiagnosticPerformances::run( SmileiMPI *smpi, VectorPatch &vecPatches, int
306306

307307

308308
// SUPPOSED TO BE EXECUTED ONLY BY MASTER MPI
309-
uint64_t DiagnosticPerformances::getDiskFootPrint( int istart, int istop, Patch *patch )
309+
uint64_t DiagnosticPerformances::getDiskFootPrint( int istart, int istop, Patch * )
310310
{
311311
uint64_t footprint = 0;
312312

src/Diagnostic/DiagnosticProbes.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ DiagnosticProbes::~DiagnosticProbes()
400400
}
401401

402402

403-
void DiagnosticProbes::openFile( Params &params, SmileiMPI *smpi )
403+
void DiagnosticProbes::openFile( Params &, SmileiMPI *smpi )
404404
{
405405
file_ = new H5Write( filename, &smpi->world() );
406406

@@ -447,7 +447,7 @@ bool DiagnosticProbes::prepare( int itime )
447447
}
448448

449449

450-
void DiagnosticProbes::init( Params &params, SmileiMPI *smpi, VectorPatch &vecPatches )
450+
void DiagnosticProbes::init( Params &params, SmileiMPI *smpi, VectorPatch & )
451451
{
452452
// create the file
453453
openFile( params, smpi );
@@ -620,7 +620,7 @@ void DiagnosticProbes::createPoints( SmileiMPI *smpi, VectorPatch &vecPatches, d
620620

621621

622622

623-
void DiagnosticProbes::run( SmileiMPI *smpi, VectorPatch &vecPatches, int itime, SimWindow *simWindow, Timers &timers )
623+
void DiagnosticProbes::run( SmileiMPI *smpi, VectorPatch &vecPatches, int itime, SimWindow *simWindow, Timers & )
624624
{
625625
ostringstream name_t;
626626

@@ -862,7 +862,7 @@ bool DiagnosticProbes::needsRhoJs( int itime )
862862
}
863863

864864
// SUPPOSED TO BE EXECUTED ONLY BY MASTER MPI
865-
uint64_t DiagnosticProbes::getDiskFootPrint( int istart, int istop, Patch *patch )
865+
uint64_t DiagnosticProbes::getDiskFootPrint( int istart, int istop, Patch * )
866866
{
867867
uint64_t footprint = 0;
868868

src/Diagnostic/DiagnosticRadiationSpectrum.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ void DiagnosticRadiationSpectrum::openFile( Params& params, SmileiMPI* smpi )
117117
}
118118

119119
// run one particle binning diagnostic
120-
void DiagnosticRadiationSpectrum::run( Patch* patch, int itime, SimWindow* simWindow )
120+
void DiagnosticRadiationSpectrum::run( Patch* patch, int, SimWindow* simWindow )
121121
{
122122

123123
// Calculate the total number of particles in this patch and resize buffers

0 commit comments

Comments
 (0)