src issueshttps://gitlab.psi.ch/OPAL/src/-/issues2020-10-09T10:33:26+02:00https://gitlab.psi.ch/OPAL/src/-/issues/614Make sampler more robust2020-10-09T10:33:26+02:00bellotti_rMake sampler more robust**Current state**<br />
If one machine configuration crashes (e. g. segfault), the entire random sample dies.
**Why is it bad**<br />
I'm referring to a situation where the sampler reads from a TSV file instead of generating configurati...**Current state**<br />
If one machine configuration crashes (e. g. segfault), the entire random sample dies.
**Why is it bad**<br />
I'm referring to a situation where the sampler reads from a TSV file instead of generating configurations.<br />
- The more machines are run in parallel, the more configurations have to be restarted. This is a cumbersome manual process, and therefore error prone.
- All progress of simulations in progress is lost. (waste of resources)
- The unfinished machine settings have to be identified, copied to a new TSV file, and another RS has to be started, which is again a manual process.
Long story short, this bug imposes unnecessary work and introduces unnecessary error sources for OPAL users.https://gitlab.psi.ch/OPAL/src/-/issues/146Rewrite the ArbitraryDomain class.2021-06-09T18:40:56+02:00krausRewrite the ArbitraryDomain class.Currently the ArbitraryDomain class only works when it is partitioned in z-direction. Rewrite it such that the global linear indexing works also with PARFFTX=TRUE and/or PARFFTY=TRUE.Currently the ArbitraryDomain class only works when it is partitioned in z-direction. Rewrite it such that the global linear indexing works also with PARFFTX=TRUE and/or PARFFTY=TRUE.winklehner_dfrey_mwinklehner_dhttps://gitlab.psi.ch/OPAL/src/-/issues/625Fix exceptions in parallel2021-06-09T21:19:42+02:00ext-calvo_ppedro.calvo@ciemat.esFix exceptions in parallelThe following discussion from !458 should be addressed:
- [ ] @snuverink_j started a [discussion](https://gitlab.psi.ch/OPAL/src/-/merge_requests/458#note_28753): (+5 comments)
> If I understand correctly the file is only read by ...The following discussion from !458 should be addressed:
- [ ] @snuverink_j started a [discussion](https://gitlab.psi.ch/OPAL/src/-/merge_requests/458#note_28753): (+5 comments)
> If I understand correctly the file is only read by node 0, so this check can be done by node 0 only (as it was before).
>
> But to be honest, I don't understand why it was not working before in the parallel environment. Can you elaborate a bit?
@ext-calvo_p
> I thought in the same way, but when OPAL is run in the parallel environment and the distribution file doesn't exist, OpalException is not thrown.
>
> I think that checking if the file exists before opening it does not have to be done exclusively by node 0.
@snuverink_j
> I can reproduce it: the simulation hangs.
>
>But this seems something more fundamental to me, because I would also have expected that a throw by a single node would be enough to stop the simulation. @gsell: Should that not be the case?
@kraus
> In Main.cpp we catch the exception and then call MPI_Abort on MPI_COMM_WORLD. I thought that this should also stop the other nodes but this isn't the case. So we try to throw the exception on all nodes.https://gitlab.psi.ch/OPAL/src/-/issues/629Use separate classes for different distribution types2021-06-10T17:27:41+02:00krausUse separate classes for different distribution types![Distributions.svg](/uploads/bb44bdfd74954e672c75c1187c2de554/Distributions.svg)
- Use separate classes for each type for parsing and for the actual generation of a distribution.
- Move the `DISTRIBUTION` attribute from the `TRACKRUN` ...![Distributions.svg](/uploads/bb44bdfd74954e672c75c1187c2de554/Distributions.svg)
- Use separate classes for each type for parsing and for the actual generation of a distribution.
- Move the `DISTRIBUTION` attribute from the `TRACKRUN` command to `BEAM` command.krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/623Unify styles of separator lines2021-06-10T17:29:34+02:00krausUnify styles of separator linesCurrently `-`, `=` and `*` are used to draw separator lines in the output and also the length of these lines vary. Do the different styles have different meanings or could they be unified both in the character and length?Currently `-`, `=` and `*` are used to draw separator lines in the output and also the length of these lines vary. Do the different styles have different meanings or could they be unified both in the character and length?https://gitlab.psi.ch/OPAL/src/-/issues/619review and cleanup IPPL FieldLayout classes2021-06-10T17:34:40+02:00gsellreview and cleanup IPPL FieldLayout classesOnly layout constructors using NDIndex are used in OPAL. The layout constructors using 1 to 6 arguments of type index are not used and can be removedOnly layout constructors using NDIndex are used in OPAL. The layout constructors using 1 to 6 arguments of type index are not used and can be removedgsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/616Enable H5 files as input for FROMFILE distributions2021-06-10T17:35:43+02:00krausEnable H5 files as input for FROMFILE distributionsIf one wants to use the distribution from a "temporal" monitor or from the regular phase space dump then one has to export the phase space of the HDF5 file to Ascii. Instead we should allow to use the HDF5 directly.If one wants to use the distribution from a "temporal" monitor or from the regular phase space dump then one has to export the phase space of the HDF5 file to Ascii. Instead we should allow to use the HDF5 directly.https://gitlab.psi.ch/OPAL/src/-/issues/608Use library to parse the command line arguments2021-06-10T17:40:49+02:00krausUse library to parse the command line argumentsCurrently the command line arguments are parsed with manually written `if ... else if ... `. Additionally the arguments are parsed in different locations. Instead we should use a library such as Boost Program_options.Currently the command line arguments are parsed with manually written `if ... else if ... `. Additionally the arguments are parsed in different locations. Instead we should use a library such as Boost Program_options.https://gitlab.psi.ch/OPAL/src/-/issues/555Move Distribution attribute from the TrackRun command to the Beam command.2021-06-10T17:47:27+02:00krausMove Distribution attribute from the TrackRun command to the Beam command.It seems more logic to have them together since the distribution describes the beam of particles.It seems more logic to have them together since the distribution describes the beam of particles.https://gitlab.psi.ch/OPAL/src/-/issues/473Cleanup field map classes and remove slow field map2021-06-10T17:50:31+02:00krausCleanup field map classes and remove slow field mapFor many field map types there are two versions: a fast (marked with `_fast` in the file name) and a slow version. For a long time the fast version is default and I don't think that anyone is using the slower ones. We should get rid of t...For many field map types there are two versions: a fast (marked with `_fast` in the file name) and a slow version. For a long time the fast version is default and I don't think that anyone is using the slower ones. We should get rid of the slow versions, e.g. the files
```
src/Classic/Fields/Astra1DDynamic.h
src/Classic/Fields/Astra1DMagnetoStatic.h
src/Classic/Fields/Astra1DElectroStatic.h
src/Classic/Fields/FM1DDynamic.h
src/Classic/Fields/FM1DMagnetoStatic.h
src/Classic/Fields/FM1DElectroStatic.h
```krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/359CCollimator not properly implemented for horizontal cut2021-06-10T17:53:04+02:00frey_mCCollimator not properly implemented for horizontal cutAs far as I understand, the CCollimator checks the [vertical direction](https://gitlab.psi.ch/OPAL/src/blob/master/src/Classic/AbsBeamline/CCollimator.cpp#L60) in order to find out if the bunch is close to the collimator. However, this o...As far as I understand, the CCollimator checks the [vertical direction](https://gitlab.psi.ch/OPAL/src/blob/master/src/Classic/AbsBeamline/CCollimator.cpp#L60) in order to find out if the bunch is close to the collimator. However, this only works for vertical collimators (consisting of 2 CCollimator elements, i.e. upper and lower plate). In case of horizontal collimators this does not apply.frey_msnuverink_jjochem.snuverink@psi.chfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/354Add Analytic model of a transverse deflecting cavity (TCAV)2021-06-10T17:54:19+02:00adelmannAdd Analytic model of a transverse deflecting cavity (TCAV)adelmannkrausext-neveu_nadelmannhttps://gitlab.psi.ch/OPAL/src/-/issues/297Suggestion for improvements to the Optimiser2021-06-10T17:56:24+02:00snuverink_jjochem.snuverink@psi.chSuggestion for improvements to the OptimiserSome suggestions and observations to improve usability of the optimiser by Michael Abo-Bakr (as far as not already covered in other issues):
* [ ] For 1 or 2 optimisation parameters there is no hypervolume calculation.
* [ ] It would be...Some suggestions and observations to improve usability of the optimiser by Michael Abo-Bakr (as far as not already covered in other issues):
* [ ] For 1 or 2 optimisation parameters there is no hypervolume calculation.
* [ ] It would be very nice to get at the end a final best solution in the output (defined with some cost function)
* [ ] .json format is not always ideal for reading or writing new generation files (as starting condition)
* [ ] Not all individuals appear to be really new.
* [ ] Option to adaptively change optimisation parameters (mutation, crossover etc.)snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/287Reference Particle Class for all Trackers2021-06-10T17:56:59+02:00snuverink_jjochem.snuverink@psi.chReference Particle Class for all TrackersThe cyclotron tracker has no good reference particle treatment. In addition, it would be nice to adapt the reference particle treatment of the t-tracker into a separate class. This can be used for all trackers.The cyclotron tracker has no good reference particle treatment. In addition, it would be nice to adapt the reference particle treatment of the t-tracker into a separate class. This can be used for all trackers.snuverink_jjochem.snuverink@psi.chkraussnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/279Trimcoil: PHIMIN and PHIMAX as arrays2021-06-10T17:57:30+02:00frey_mTrimcoil: PHIMIN and PHIMAX as arraysIn order to have one instance of a trim coil instead of multiple instances it is better having the arguments PHIMIN and PHIMAX as arrays. Otherwise one needs to specify the same trim coil n-times for n-sectors.In order to have one instance of a trim coil instead of multiple instances it is better having the arguments PHIMIN and PHIMAX as arrays. Otherwise one needs to specify the same trim coil n-times for n-sectors.snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/270Flexible Energy Bins2021-06-10T17:57:44+02:00krausFlexible Energy BinsCurrently the user has to define how many energy bins are used. They are then used for `MINSTEPFORREBIN` steps whether this is necessary or not (or sufficient). Instead the number of bins should be controlled by the difference in gamma. ...Currently the user has to define how many energy bins are used. They are then used for `MINSTEPFORREBIN` steps whether this is necessary or not (or sufficient). Instead the number of bins should be controlled by the difference in gamma. If all particles have the same gamma then only one energy bin should be used. On contrary if the energy spread is big many bins should be used.krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/261Reintroduce methods to compute Schottky effect2021-06-10T17:58:09+02:00krausReintroduce methods to compute Schottky effectThis was once introduced by Zha into Opal but couldn't be maintained. It was therefore removed from the code.This was once introduced by Zha into Opal but couldn't be maintained. It was therefore removed from the code.https://gitlab.psi.ch/OPAL/src/-/issues/250Store stat files of Sampler (and Optimizer?) in a single file2021-06-10T17:58:47+02:00krausStore stat files of Sampler (and Optimizer?) in a single fileThe stat files should be stored into a single file such that all data from all runs can be evaluated in post processing. The data should be supplemented with the values of the design variables. File formats that come into considerations ...The stat files should be stored into a single file such that all data from all runs can be evaluated in post processing. The data should be supplemented with the values of the design variables. File formats that come into considerations are HDF5, SDDS, a NoSQL database, zip/tar gunzip etc.krausadelmanngsellkraushttps://gitlab.psi.ch/OPAL/src/-/issues/159STATDUMPFREQ in RING-DEFINITION2021-06-10T18:04:20+02:00Valeria RizzoglioSTATDUMPFREQ in RING-DEFINITIONIt seems that the option STATDUMPFREQ does not work as expected in OPAL-C - Ring Definition. The statistics dumped in the .stat file depends on the PSDUMPFREQ normally used for the h5.
*Example*
For a certain beamline, the expected RM...It seems that the option STATDUMPFREQ does not work as expected in OPAL-C - Ring Definition. The statistics dumped in the .stat file depends on the PSDUMPFREQ normally used for the h5.
*Example*
For a certain beamline, the expected RMSX is: ![ExpectedRMS](/uploads/f136b3679a6b4acde8dc792c29c48fa5/ExpectedRMS.png).
The plot is obtained from the .stat file (column 2 and 6) and with the following options set in the OPAL input file
```
OPTION, PSDUMPFREQ=10;
OPTION, ENABLEHDF5=FALSE;
OPTION, TELL=TRUE;
OPTION, PSDUMPFRAME=BUNCH_MEAN;
```
The STATDUMPFREQ is not specified, so the default value `STATDUMPFREQ = 10 ` should be used.
With the following options:
- reducing the PSDUMPFREQ
```
OPTION, PSDUMPFREQ=100000000;
OPTION, STATDUMPFREQ = 10;
OPTION, TELL=TRUE;
OPTION, PSDUMPFRAME=BUNCH_MEAN;
```
- disabling the .h5 files but with high PSDUMPFREQ
```
OPTION, PSDUMPFREQ=10;
OPTION, ENABLEHDF5=FALSE;
OPTION, TELL=TRUE;
OPTION, PSDUMPFRAME=BUNCH_MEAN;
```
the RMSX from the generated stat file is: ![STATDUMP](/uploads/72d86bbc755b14b5ad7fc3b86ae7adb0/STATDUMP.png)
The result does not change if the STATDUMPFREQ is specified in the input file or not.
Any suggestions?ext-rogers_cext-rogers_chttps://gitlab.psi.ch/OPAL/src/-/issues/351Extend Coding Style page with a set of recommended usages2021-06-10T18:06:51+02:00snuverink_jjochem.snuverink@psi.chExtend Coding Style page with a set of recommended usagesIt would be nice if the [Coding Style page](https://gitlab.psi.ch/OPAL/src/wikis/For%20Developers/CodingStyle) would be extended with some recommended snippets how to do basics like printing to output, throwing/catching exceptions etc.
...It would be nice if the [Coding Style page](https://gitlab.psi.ch/OPAL/src/wikis/For%20Developers/CodingStyle) would be extended with some recommended snippets how to do basics like printing to output, throwing/catching exceptions etc.
For example there are several ways to print output present in the code base (cout, printf, global gmsg, INFOMSG, ERRORMSG etc.).