src issueshttps://gitlab.psi.ch/OPAL/src/-/issues2019-11-18T13:52:44+01:00https://gitlab.psi.ch/OPAL/src/-/issues/388fixes for gcc 9.2 warning2019-11-18T13:52:44+01:00gsellfixes for gcc 9.2 warningin nsga2 gcc 9.2 complains about a sprintf() and an expression in an assert()in nsga2 gcc 9.2 complains about a sprintf() and an expression in an assert()gsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/387Computational Efficiency2020-04-22T13:17:49+02:00frey_mComputational EfficiencyI propose a new particle bunch handling that should increase the parallel efficiency by avoiding some MPI communication. In AMR I need to sort the particles according to level and grids in order to deposit the particles to the mesh. Alth...I propose a new particle bunch handling that should increase the parallel efficiency by avoiding some MPI communication. In AMR I need to sort the particles according to level and grids in order to deposit the particles to the mesh. Although this sounds expensive, it is only around 1 - 2 percent of the overall computational costs. What if we do a similar thing with particles marked for deletion (that is usually done with `PartBunchBase::Bin = -1`). We could put them to the end of the container. This way we could evaluate statistical measures of the bunch by iterating only over the valid particles. The marked particles can later be destroyed in e.g. `IpplParticleBase::update`.
This is based on a discussion due to https://gitlab.psi.ch/OPAL/src/issues/384.https://gitlab.psi.ch/OPAL/src/-/issues/386compiler warnings due to memcpy2019-11-15T14:52:29+01:00frey_mcompiler warnings due to memcpyWith gcc/8.3.0 and later we get compiler warnings due to `memcpy` in IPPL.
```bash
/users/freym/git/opal/src/ippl/src/Index/IndexInlines.h:359:1: required from here
/users/freym/git/opal/src/ippl/src/PETE/PETE.h:378:11: warning: 'voi...With gcc/8.3.0 and later we get compiler warnings due to `memcpy` in IPPL.
```bash
/users/freym/git/opal/src/ippl/src/Index/IndexInlines.h:359:1: required from here
/users/freym/git/opal/src/ippl/src/PETE/PETE.h:378:11: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of non-trivially copyable type 'struct PETE_TBTree<FnMax, Index::cursor, PETE_Scalar<double> >'; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
memcpy(this,&t,sizeof(*this));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/users/freym/git/opal/src/ippl/src/PETE/PETE.h:343:8: note: 'struct PETE_TBTree<FnMax, Index::cursor, PETE_Scalar<double> >' declared here
struct PETE_TBTree :
^~~~~~~~~~~
/users/freym/git/opal/src/ippl/src/PETE/PETE.h: In instantiation of 'PETE_TBTree<Value_t, Left_t, Right_t>::PETE_TBTree(const PETE_TBTree<Value_t, Left_t, Right_t>&) [with Value_t = FnMax; Left_t = PETE_Scalar<double>; Right_t = Index::cursor]':
/users/freym/git/opal/src/ippl/src/Index/IndexInlines.h:359:1: required from here
/users/freym/git/opal/src/ippl/src/PETE/PETE.h:378:11: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of non-trivially copyable type 'struct PETE_TBTree<FnMax, PETE_Scalar<double>, Index::cursor>'; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
memcpy(this,&t,sizeof(*this));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/users/freym/git/opal/src/ippl/src/PETE/PETE.h:343:8: note: 'struct PETE_TBTree<FnMax, PETE_Scalar<double>, Index::cursor>' declared here
struct PETE_TBTree :
^~~~~~~~~~~
/users/freym/git/opal/src/ippl/src/PETE/PETE.h: In instantiation of 'PETE_TBTree<Value_t, Left_t, Right_t>::PETE_TBTree(const PETE_TBTree<Value_t, Left_t, Right_t>&) [with Value_t = FnMin; Left_t = Index::cursor; Right_t = PETE_Scalar<double>]':
/users/freym/git/opal/src/ippl/src/Index/IndexInlines.h:360:1: required from here
/users/freym/git/opal/src/ippl/src/PETE/PETE.h:378:11: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of non-trivially copyable type 'struct PETE_TBTree<FnMin, Index::cursor, PETE_Scalar<double> >'; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
memcpy(this,&t,sizeof(*this));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/users/freym/git/opal/src/ippl/src/PETE/PETE.h:343:8: note: 'struct PETE_TBTree<FnMin, Index::cursor, PETE_Scalar<double> >' declared here
struct PETE_TBTree :
^~~~~~~~~~~
/users/freym/git/opal/src/ippl/src/PETE/PETE.h: In instantiation of 'PETE_TBTree<Value_t, Left_t, Right_t>::PETE_TBTree(const PETE_TBTree<Value_t, Left_t, Right_t>&) [with Value_t = FnMin; Left_t = PETE_Scalar<double>; Right_t = Index::cursor]':
/users/freym/git/opal/src/ippl/src/Index/IndexInlines.h:360:1: required from here
/users/freym/git/opal/src/ippl/src/PETE/PETE.h:378:11: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of non-trivially copyable type 'struct PETE_TBTree<FnMin, PETE_Scalar<double>, Index::cursor>'; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
memcpy(this,&t,sizeof(*this));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/users/freym/git/opal/src/ippl/src/PETE/PETE.h:343:8: note: 'struct PETE_TBTree<FnMin, PETE_Scalar<double>, Index::cursor>' declared here
struct PETE_TBTree :
^~~~~~~~~~~
/users/freym/git/opal/src/ippl/src/PETE/PETE.h: In instantiation of 'PETE_TBTree<Value_t, Left_t, Right_t>::PETE_TBTree(const PETE_TBTree<Value_t, Left_t, Right_t>&) [with Value_t = OpAdd; Left_t = Index::cursor; Right_t = PETE_Scalar<float>]':
/users/freym/git/opal/src/ippl/src/Index/IndexInlines.h:388:1: required from here
/users/freym/git/opal/src/ippl/src/PETE/PETE.h:378:11: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of non-trivially copyable type 'struct PETE_TBTree<OpAdd, Index::cursor, PETE_Scalar<float> >'; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
memcpy(this,&t,sizeof(*this));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/users/freym/git/opal/src/ippl/src/PETE/PETE.h:343:8: note: 'struct PETE_TBTree<OpAdd, Index::cursor, PETE_Scalar<float> >' declared here
struct PETE_TBTree :
^~~~~~~~~~~
/users/freym/git/opal/src/ippl/src/PETE/PETE.h: In instantiation of 'PETE_TBTree<Value_t, Left_t, Right_t>::PETE_TBTree(const PETE_TBTree<Value_t, Left_t, Right_t>&) [with Value_t = OpAdd; Left_t = PETE_Scalar<float>; Right_t = Index::cursor]':
/users/freym/git/opal/src/ippl/src/Index/IndexInlines.h:388:1: required from here
/users/freym/git/opal/src/ippl/src/PETE/PETE.h:378:11: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of non-trivially copyable type 'struct PETE_TBTree<OpAdd, PETE_Scalar<float>, Index::cursor>'; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
memcpy(this,&t,sizeof(*this));
```gsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/385Writer class update2020-07-06T13:16:07+02:00frey_mWriter class updateThe function call `calcBeamParameters` at [line 2630](https://gitlab.psi.ch/OPAL/src/blob/master/src/Algorithms/ParallelCyclotronTracker.cpp#L2630) is unnecessary since it is anyway called in `StatWriter::write` at
[line 123](https://git...The function call `calcBeamParameters` at [line 2630](https://gitlab.psi.ch/OPAL/src/blob/master/src/Algorithms/ParallelCyclotronTracker.cpp#L2630) is unnecessary since it is anyway called in `StatWriter::write` at
[line 123](https://gitlab.psi.ch/OPAL/src/blob/master/src/Structure/StatWriter.cpp#L123). Therefore, we can remove this call.
This is also a design issue since I'm actually not a fan of calling the beam parameter function in the write function. It is up to you.OPAL 2.4.0frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/384Increase simulation efficiency2019-12-12T10:26:01+01:00frey_mIncrease simulation efficiencyIn OPAL-cyclotron the function `ParallelCyclotronTracker::deleteParticle` has an `allreduce` function call that consumes quite a lot of runtime. I have a simulation of the PSI Ring cyclotron that runs for 17 h where 7 h are just calls of...In OPAL-cyclotron the function `ParallelCyclotronTracker::deleteParticle` has an `allreduce` function call that consumes quite a lot of runtime. I have a simulation of the PSI Ring cyclotron that runs for 17 h where 7 h are just calls of this MPI-function. I think we sould add a `DELETE_PARTICLE_FREQ` option to OPAL in order to reduce computational cost. The default behaviour should of course remain.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/378Loss files units2019-11-07T10:04:36+01:00ext-calvo_ppedro.calvo@ciemat.esLoss files unitsFor consistency (and #45, #307, #357), the loss files should use unit `m` instead of `mm`For consistency (and #45, #307, #357), the loss files should use unit `m` instead of `mm`ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/377Update regression tests after "Resolve "Update physical constants"2019-12-09T09:04:46+01:00snuverink_jjochem.snuverink@psi.chUpdate regression tests after "Resolve "Update physical constants"The following discussion from !188 should be addressed:
- [ ] @kraus started a [discussion](https://gitlab.psi.ch/OPAL/src/merge_requests/188#note_14015): (+1 comment)
> This merge probabely breaks some of the regression tests. We...The following discussion from !188 should be addressed:
- [ ] @kraus started a [discussion](https://gitlab.psi.ch/OPAL/src/merge_requests/188#note_14015): (+1 comment)
> This merge probabely breaks some of the regression tests. We'll have to see tomorrow.
@ext\-calvo\_p :
> You were right, some [tests failed](http://amas.web.psi.ch/opal/regressionTests/master/results_2019-10-19.xml). It seems a problem of the accuracy of the results compare with the reference after changing constants value.snuverink_jjochem.snuverink@psi.chkraussnuverink_jjochem.snuverink@psi.ch2019-12-13https://gitlab.psi.ch/OPAL/src/-/issues/373Doxyfile INPUT only containing `OPAL-Map` input files2019-10-18T10:39:46+02:00snuverink_jjochem.snuverink@psi.chDoxyfile INPUT only containing `OPAL-Map` input filesAs noticed by @kraus in https://gitlab.psi.ch/OPAL/src/commit/10a98c34b32047fad7252b93639d6ef33a60d227#note_13986, the doxygen input only contains `OPAL-MAP` input files.As noticed by @kraus in https://gitlab.psi.ch/OPAL/src/commit/10a98c34b32047fad7252b93639d6ef33a60d227#note_13986, the doxygen input only contains `OPAL-MAP` input files.snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/370OPAL-T: RF Phases relative to time of arrival2021-10-13T09:28:47+02:00krausOPAL-T: RF Phases relative to time of arrivalCurrently RF phases are considere either as relative to the on-crest phase (if `APVETO=FALSE`) or relative to `t=0` (`APVETO=TRUE`). For the case `APVETO=TRUE` it would be more convenient if the phases were relative to the time of arriva...Currently RF phases are considere either as relative to the on-crest phase (if `APVETO=FALSE`) or relative to `t=0` (`APVETO=TRUE`). For the case `APVETO=TRUE` it would be more convenient if the phases were relative to the time of arrival. To avoid breaking existing input files, we could add another argument to the `RFCAVITY` command to specify the phase to which the specified phase is relative.
`APVETO=TRUE` has to be used i.a. when simulating a TDS (#354).krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/369GasStripping regression test fails2019-10-11T16:29:31+02:00ext-calvo_ppedro.calvo@ciemat.esGasStripping regression test failsThe regression test (9.10.19) for GasStripping in OPAL-2.0 fails due to !177The regression test (9.10.19) for GasStripping in OPAL-2.0 fails due to !177ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/368Update physical constants2020-12-17T10:39:08+01:00ext-calvo_ppedro.calvo@ciemat.esUpdate physical constantsChecking the values of physical constants in `Physics.h`, it is observed that they must be updated with more precise values according to [2018 CODATA recommended values](https://physics.nist.gov/cuu/Constants/)
The following discussio...Checking the values of physical constants in `Physics.h`, it is observed that they must be updated with more precise values according to [2018 CODATA recommended values](https://physics.nist.gov/cuu/Constants/)
The following discussion from !183 should be addressed:
- [x] @snuverink_j started a [discussion](https://gitlab.psi.ch/OPAL/src/merge_requests/183#note_13783): (+1 comment)
> I think it would be nicer if m_h is added to `Physics.h` instead of a member.ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/367Info level for messages2019-10-18T23:43:02+02:00ext-calvo_ppedro.calvo@ciemat.esInfo level for messagesInfo shown in output file must have the same structure for all elements to ease of user (level, indentation...)Info shown in output file must have the same structure for all elements to ease of user (level, indentation...)ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/366Geometry losses are not recorded2019-10-08T14:45:41+02:00ext-calvo_ppedro.calvo@ciemat.esGeometry losses are not recordedParticles colliding with boundary geometry are deleted from the beam, but they are not recorded in any file .lossParticles colliding with boundary geometry are deleted from the beam, but they are not recorded in any file .losshttps://gitlab.psi.ch/OPAL/src/-/issues/363compilation error with OPAL_DKS2019-10-01T17:56:55+02:00snuverink_jjochem.snuverink@psi.chcompilation error with OPAL_DKSAs reported by @gsell the master branch does not compile with `-DOPAL_DKS`.
```c++
/afs/psi.ch/user/g/gsell/private/src/OPAL/src/src/Classic/Solvers/CollimatorPhysics.cpp: In member function 'void CollimatorPhysics::gatherStatistics()':...As reported by @gsell the master branch does not compile with `-DOPAL_DKS`.
```c++
/afs/psi.ch/user/g/gsell/private/src/OPAL/src/src/Classic/Solvers/CollimatorPhysics.cpp: In member function 'void CollimatorPhysics::gatherStatistics()':
/afs/psi.ch/user/g/gsell/private/src/OPAL/src/src/Classic/Solvers/CollimatorPhysics.cpp:720:9: error: 'locPartsInMat_m' was not declared in this scope
locPartsInMat_m = numparticles_m + dksParts_m.size();
^~~~~~~~~~~~~~~
/afs/psi.ch/user/g/gsell/private/src/OPAL/src/src/Classic/Solvers/CollimatorPhysics.cpp:720:9: note: suggested alternative: 'locPartsInMat'
locPartsInMat_m = numparticles_m + dksParts_m.size();
^~~~~~~~~~~~~~~
locPartsInMat
/afs/psi.ch/user/g/gsell/private/src/OPAL/src/src/Classic/Solvers/CollimatorPhysics.cpp: In member function 'void CollimatorPhysics::applyDKS(PartBunchBase<double, 3>*, const std::pair<Vektor<double, 3>, double>&, size_t)':
/afs/psi.ch/user/g/gsell/private/src/OPAL/src/src/Classic/Solvers/CollimatorPhysics.cpp:799:47: error: no matching function for call to 'CollimatorPhysics::addBackToBunchDKS(PartBunchBase<double, 3>*&, unsigned int&)'
addBackToBunchDKS(bunch, i);
^
In file included from /afs/psi.ch/user/g/gsell/private/src/OPAL/src/src/Classic/Solvers/CollimatorPhysics.cpp:9:0:
/afs/psi.ch/user/g/gsell/private/src/OPAL/src/src/Classic/Solvers/CollimatorPhysics.hh:134:10: note: candidate: void CollimatorPhysics::addBackToBunchDKS(PartBunchBase<double, 3>*)
void addBackToBunchDKS(PartBunchBase<double, 3> *bunch);
^~~~~~~~~~~~~~~~~
/afs/psi.ch/user/g/gsell/private/src/OPAL/src/src/Classic/Solvers/CollimatorPhysics.hh:134:10: note: candidate expects 1 argument, 2 provided
/afs/psi.ch/user/g/gsell/private/src/OPAL/src/src/Classic/Solvers/CollimatorPhysics.cpp: At global scope:
/afs/psi.ch/user/g/gsell/private/src/OPAL/src/src/Classic/Solvers/CollimatorPhysics.cpp:834:6: error: prototype for 'void CollimatorPhysics::addBackToBunchDKS(PartBunchBase<double, 3>*, unsigned int)' does not match any in class 'CollimatorPhysics'
void CollimatorPhysics::addBackToBunchDKS(PartBunchBase<double, 3> *bunch, unsigned i) {
^~~~~~~~~~~~~~~~~
In file included from /afs/psi.ch/user/g/gsell/private/src/OPAL/src/src/Classic/Solvers/CollimatorPhysics.cpp:9:0:
/afs/psi.ch/user/g/gsell/private/src/OPAL/src/src/Classic/Solvers/CollimatorPhysics.hh:134:10: error: candidate is: void CollimatorPhysics::addBackToBunchDKS(PartBunchBase<double, 3>*)
void addBackToBunchDKS(PartBunchBase<double, 3> *bunch);
^~~~~~~~~~~~~~~~~
make[2]: *** [src/CMakeFiles/libOPAL.dir/Classic/Solvers/CollimatorPhysics.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/CMakeFiles/libOPAL.dir/all] Error 2
make: *** [all] Error 2
$ module list
Currently Loaded Modulefiles:
1) cmake/3.10.3 4) boost/1.68.0 7) gsl/2.5 10) opal-toolchain/2.0
2) gcc/7.3.0 5) hdf5/1.10.4 8) trilinos/12.12.1 11) cuda/10.0.130
3) openmpi/3.1.3 6) H5hut/2.0.0rc5 9) OpenBLAS/0.2.20 12) dks/1.1.2
```https://gitlab.psi.ch/OPAL/src/-/issues/362Remove lPath_m variable and use spos_m instead for all flavours2019-10-18T23:43:03+02:00frey_mRemove lPath_m variable and use spos_m instead for all flavoursRemove `lPath_m` for OPAL-Cyc and use `spos_m` instead, as suggested in https://gitlab.psi.ch/OPAL/src/merge_requests/173#note_13240.Remove `lPath_m` for OPAL-Cyc and use `spos_m` instead, as suggested in https://gitlab.psi.ch/OPAL/src/merge_requests/173#note_13240.https://gitlab.psi.ch/OPAL/src/-/issues/361Apply commit also in master2019-09-28T15:09:42+02:00frey_mApply commit also in masterApply https://gitlab.psi.ch/OPAL/src/merge_requests/173/diffs?commit_id=8fca35f5ef24d868367aa3a48ca9a163548e0ee4 in the master too.Apply https://gitlab.psi.ch/OPAL/src/merge_requests/173/diffs?commit_id=8fca35f5ef24d868367aa3a48ca9a163548e0ee4 in the master too.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/358Cyclotron RestartTest-2 fails2019-09-13T09:52:35+02:00frey_mCyclotron RestartTest-2 failsThe regression test RestartTest-2 fails due to https://gitlab.psi.ch/OPAL/src/merge_requests/170The regression test RestartTest-2 fails due to https://gitlab.psi.ch/OPAL/src/merge_requests/170frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/349Check that element length is long relative to a time step2020-08-18T09:46:53+02:00krausCheck that element length is long relative to a time stepIntroduce a check to OPAL-T that every element is sampled several times, e.g. 10 times. This is important for example for #37 (elements that don't support fringe fields) and #137 (Degraders with thin foils). Throw an exception with the...Introduce a check to OPAL-T that every element is sampled several times, e.g. 10 times. This is important for example for #37 (elements that don't support fringe fields) and #137 (Degraders with thin foils). Throw an exception with the information that the time step should be reduced.krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/348Failed regression tests after ElementPositionWriter MR2019-07-31T20:00:25+02:00snuverink_jjochem.snuverink@psi.chFailed regression tests after ElementPositionWriter MRAfter merging src!159, many regression tests fail: http://amas.web.psi.ch/opal/regressionTests/master/results_2019-07-30.xml
(previous: http://amas.web.psi.ch/opal/regressionTests/master/results_2019-07-27.xml)After merging src!159, many regression tests fail: http://amas.web.psi.ch/opal/regressionTests/master/results_2019-07-30.xml
(previous: http://amas.web.psi.ch/opal/regressionTests/master/results_2019-07-27.xml)krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/347Enabled warning overloaded-virtual for GCC2020-04-22T13:16:35+02:00gsellEnabled warning overloaded-virtual for GCCgsellgsell