src issueshttps://gitlab.psi.ch/OPAL/src/-/issues2022-05-03T09:22:53+02:00https://gitlab.psi.ch/OPAL/src/-/issues/715Missing attributes values for AMR solver2022-05-03T09:22:53+02:00ext-calvo_ppedro.calvo@ciemat.esMissing attributes values for AMR solverThe attributes `ITSOLVER` and `AMR_MG_REUSE` are not considering all the options described in the [Manual](http://amas.web.psi.ch/opal/Documentation/master/#tab_AMR_MG_Commands) for the AMR Poisson Solver.
The lists of accepted predefin...The attributes `ITSOLVER` and `AMR_MG_REUSE` are not considering all the options described in the [Manual](http://amas.web.psi.ch/opal/Documentation/master/#tab_AMR_MG_Commands) for the AMR Poisson Solver.
The lists of accepted predefined string values have to be extended.2022.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/713Check assignation of BEAM, FIELDSOLVER and DISTRIBUTION in RUN command2022-03-21T07:59:48+01:00ext-calvo_ppedro.calvo@ciemat.esCheck assignation of BEAM, FIELDSOLVER and DISTRIBUTION in RUN commandThe attributes `BEAM`, `FIELDSOLVER` and `DISTRIBUTION` in the `RUN` command take default values when they are not specifically defined.
Currently, in the case that `FIELDSOLVER` is not defined, a segmentation fault is raised. In the ca...The attributes `BEAM`, `FIELDSOLVER` and `DISTRIBUTION` in the `RUN` command take default values when they are not specifically defined.
Currently, in the case that `FIELDSOLVER` is not defined, a segmentation fault is raised. In the case of `BEAM` or `DISTRIBUTION`, an exception is thrown, since OPAL does not find the internal attributes of those commands when taking the default value.
Early exceptions should be thrown in TrackRun to guarantee the assignation of these attributes.2022.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/685Output file names for LossDataSink can't have prefixed dots if no extension i...2022-03-17T08:55:14+01:00krausOutput file names for LossDataSink can't have prefixed dots if no extension is providedInstead of correct paths an empty string is returned in `ElementBase::getOutputFN()`if the paths start with a prefixed dot such as e.g. `../` and the file name doesn't include an extension. The user shouldn't have to use a file name with...Instead of correct paths an empty string is returned in `ElementBase::getOutputFN()`if the paths start with a prefixed dot such as e.g. `../` and the file name doesn't include an extension. The user shouldn't have to use a file name with extension, the extension is provided by Opal anyway to support both ascii and HDF5 output.2022.1krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/707Segmentation fault with COMPUTEPERCENTILES2022-03-07T16:38:50+01:00ext-calvo_ppedro.calvo@ciemat.esSegmentation fault with COMPUTEPERCENTILES`COMPUTEPERCENTILES` gives a segmentation fault when all particles die during the simulation. It can happen when the whole beam collides with the geometry, by particle-matter interaction or by interaction with interceptive elements (stri...`COMPUTEPERCENTILES` gives a segmentation fault when all particles die during the simulation. It can happen when the whole beam collides with the geometry, by particle-matter interaction or by interaction with interceptive elements (stripper, collimator...).
A simple way to reproduce the bug is to run GasStripping regression test increasing the pressure level enough to achieve total particle loss (`PRESSURE=1.0e-1`) with `OPTION, COMPUTEPERCENTILES=TRUE;`2022.1krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/709Missing std header result in compilation bug2022-02-23T14:43:10+01:00ext-calvo_ppedro.calvo@ciemat.esMissing std header result in compilation bugCompilation has failed (see [link](http://amas.web.psi.ch/opal/master/output/2022-02-22_10-49.txt)) after MR OPAL/src!558. Missing include in `ValueRange.h` could be a possible cause of the failure, because `std::numeric_limits` needs h...Compilation has failed (see [link](http://amas.web.psi.ch/opal/master/output/2022-02-22_10-49.txt)) after MR OPAL/src!558. Missing include in `ValueRange.h` could be a possible cause of the failure, because `std::numeric_limits` needs header `<limits>`.2022.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/675TrackBack not working correctly2022-02-21T17:42:05+01:00krausTrackBack not working correctlyI am trying to run a simulation forward then take the output distribution and run it backwards to confirm that I am setting up the simulation correctly — it should just return to the same initial distribution.
When running the simulatio...I am trying to run a simulation forward then take the output distribution and run it backwards to confirm that I am setting up the simulation correctly — it should just return to the same initial distribution.
When running the simulation with trackback on, the dipoles bend the reference particle the correct direction, and bend the actual particle distribution in the opposite direction.
Here are Sirepo simulations for the forward and backward. I've confirmed that my conversion script to go from the final distribution in the .h5 file to the initial distribution in a .txt file format for the FROMFILE distribution source is correct.
[AWA_TBA_Drive_Beamline_Backtrack.zip](/uploads/37feb8cf2e1da03a0ccbc7a8dd2038f7/AWA_TBA_Drive_Beamline_Backtrack.zip)2022.1krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/668Different initial distribution with same input file2022-02-14T09:42:39+01:00albajacas_aarnau.albajacas@psi.chDifferent initial distribution with same input file### Summary
When running regression tests multiple times, some parameters of the initial distribution are different at each run, even though `SEED` is the default. Initial differences are small, but they diverge with time and can yield ...### Summary
When running regression tests multiple times, some parameters of the initial distribution are different at each run, even though `SEED` is the default. Initial differences are small, but they diverge with time and can yield larger-than-machine-precision errors in the final time-step, which makes it harder to reproduce results and run regression tests (e.g. see OPAL/src#658).
### Steps to reproduce
By running the regression test [`Distribution-Gauss-1.in`](https://gitlab.psi.ch/OPAL/regression-tests/-/blob/master/RegressionTests/Distribution-Gauss-1/Distribution-Gauss-1.in) several times one can see that the initial bunch is not the same at each run (see image below).
However, this only happens when I run the tests on 4 cores. When running the test on 1 or 2 cores the initial distribution is the same at every run. So I suspect that this might be due to differences in timing of communication between processors.
Comparison of the initial bunch between three runs on 4 cores:
![comparison](/uploads/dd69f637b7e16b6b39cdd4ff2e2aeb5e/comparison.png)2022.1krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/680Remove interactive mode, replace it with additional help option.2022-02-04T16:05:23+01:00krausRemove interactive mode, replace it with additional help option.The interactive mode is presumably not used by anyone. I propose therefore to remove it and add instead an option to print the help for commands on the command line.
Additionally I noticed that Opal crashes while printing the help messa...The interactive mode is presumably not used by anyone. I propose therefore to remove it and add instead an option to print the help for commands on the command line.
Additionally I noticed that Opal crashes while printing the help messages. The reason is that the type names `predefined string`, `upper case string` and `upper case string array` are longer than 16 characters. However the user doesn't have to know what these types represent, they are simply strings and string arrays respectively.2022.1krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/605BANDRF fieldmaps have no effect beginning with OPAL 2.22022-02-04T10:22:01+01:00winklehner_dBANDRF fieldmaps have no effect beginning with OPAL 2.2h5hut field maps (.h5part), loaded as part of the BANDRF cyclotron type that produce the desired effect in OPAL 2.0, don't seem to have any effect in OPAL 2.2 and up. Cyclotron units used to be mm and kV/mm (same as MV/m). Have these inp...h5hut field maps (.h5part), loaded as part of the BANDRF cyclotron type that produce the desired effect in OPAL 2.0, don't seem to have any effect in OPAL 2.2 and up. Cyclotron units used to be mm and kV/mm (same as MV/m). Have these input units been changed somehow?
My current example is that of an electrostatic extraction septum that correctly pushes the final turn out by ~2 cm in OPAL 2.0, but does nothing in OPAL 2.2 and up.https://gitlab.psi.ch/OPAL/src/-/issues/706Bug with Temporal Monitor when running in parallel2022-01-31T16:15:22+01:00albajacas_aarnau.albajacas@psi.chBug with Temporal Monitor when running in parallel### Summary
@muralikrishnan pointed out that he was having this error:
When a temporal monitor is used, and you run on multiple cores, you get the following error:
```
Error{1}> ...### Summary
@muralikrishnan pointed out that he was having this error:
When a temporal monitor is used, and you run on multiple cores, you get the following error:
```
Error{1}>
Error{1}> *** Error:
Error{1}> Internal OPAL error:
Error{1}> basic_string::_M_construct null not valid
Error{1}> basic_string::_M_construct null not valid
```
This happens for example running [test_fft.in](/uploads/da1a334c67bed7c2c6fe692cea331714/test_fft.in), only when run on multiple cores. When running on a single core it works fine.
The problem seems to come from the line `auto stats = lossDs_m->computeStatistics(1);` (https://gitlab.psi.ch/OPAL/src/-/blob/master/src/Classic/AbsBeamline/Monitor.cpp#L132), which was added in !557
I don't exactly know why this line was added or why it gives an error here. Maybe @kraus can comment.2022.1https://gitlab.psi.ch/OPAL/src/-/issues/698Longitudinal positions in temporal monitor wrong2022-01-31T16:12:52+01:00krausLongitudinal positions in temporal monitor wrongWhen one compares the mean longitudinal positions of the bunch relative to the reference particle in temporal monitor and the phase space file then one observes that the values dont agree very well. In the h5 file the values are continuo...When one compares the mean longitudinal positions of the bunch relative to the reference particle in temporal monitor and the phase space file then one observes that the values dont agree very well. In the h5 file the values are continuous whereas in the monitor file the values are randomly (?) shifted, [see here](/uploads/58fd2be9e7eb79e6659e43c94134ca9c/compare_mean_values_of_monitors_and_stat.pdf).2022.1krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/702Back-track simulation not stopping2022-01-20T09:14:21+01:00albajacas_aarnau.albajacas@psi.chBack-track simulation not stopping### Summary
Back-tracking simulations worked fine for me with OPAL 2.4, but with OPAL 2021.1 they are not stopping anymore and go to infinity!
For example this [input file](/uploads/757ebbea744b87dc1809329ce2e898d3/back_track_drift.in) ...### Summary
Back-tracking simulations worked fine for me with OPAL 2.4, but with OPAL 2021.1 they are not stopping anymore and go to infinity!
For example this [input file](/uploads/757ebbea744b87dc1809329ce2e898d3/back_track_drift.in) used to work fine, and stop at `s=0.0`, but now it just goes forever [slurm-120179.out](/uploads/64939725a0d7f33e1637d05c9afa56a0/slurm-120179.out).
```
ParallelTTracker {0}> 19:59:38 Step 999 at 5.887 [m], t= 19.637 [ns], E=44.457 [MeV]
ParallelTTracker {0}> 20:00:09 Step 1999 at 4.987 [m], t= 16.637 [ns], E=44.457 [MeV]
ParallelTTracker {0}> 20:00:41 Step 2999 at 4.088 [m], t= 13.637 [ns], E=44.458 [MeV]
ParallelTTracker {0}> 20:01:13 Step 3999 at 3.189 [m], t= 10.637 [ns], E=44.458 [MeV]
ParallelTTracker {0}> 20:01:46 Step 4999 at 2.289 [m], t= 7.637 [ns], E=44.458 [MeV]
ParallelTTracker {0}> 20:02:18 Step 5999 at 1.390 [m], t= 4.637 [ns], E=44.459 [MeV]
ParallelTTracker {0}> 20:02:50 Step 6999 at 490.765 [mm], t= 1.637 [ns], E=44.459 [MeV]
ParallelTTracker {0}> 20:03:23 Step 7999 at -93.005 [m], t= -1.363 [ns], E=44.460 [MeV]
ParallelTTracker {0}> 20:03:55 Step 8999 at -951.669 [m], t= -4.363 [ns], E=44.460 [MeV]
ParallelTTracker {0}> 20:04:27 Step 9999 at -2709.652 [m], t= -7.363 [ns], E=44.460 [MeV]
ParallelTTracker {0}> 20:05:00 Step 10999 at -5366.954 [m], t= -10.363 [ns], E=44.460 [MeV]
ParallelTTracker {0}> 20:05:32 Step 11999 at -8923.576 [m], t= -13.363 [ns], E=44.461 [MeV]
ParallelTTracker {0}> 20:06:04 Step 12999 at -13379.517 [m], t= -16.363 [ns], E=44.461 [MeV]
slurmstepd: error: *** JOB 120179 ON merlin-c-117 CANCELLED AT 2021-12-20T20:06:15 ***
```
I can't figure out why this is happening. When I have time I will check at which commit it broke, somewhere between 2.4 and 2021.1. Not sure if it is related to #675. Any ideas?2022.1https://gitlab.psi.ch/OPAL/src/-/issues/691Fix units in DumpEMFields header2022-01-17T09:03:08+01:00ext-calvo_ppedro.calvo@ciemat.esFix units in DumpEMFields headerThe header of the output files `DumpEMFields` shows units in `mm` when in fact `m` is used (since 62632e45daedb236457be5909bf7144849404c8a).
The units of the input variables must be specified in the Manual (see OPAL/documentation/manual...The header of the output files `DumpEMFields` shows units in `mm` when in fact `m` is used (since 62632e45daedb236457be5909bf7144849404c8a).
The units of the input variables must be specified in the Manual (see OPAL/documentation/manual#68).2022.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/703Fix particle definition2022-01-17T08:57:41+01:00ext-calvo_ppedro.calvo@ciemat.esFix particle definition- The `BEAM` command must verify that the particle definition (`PARTICLE` or `MASS` and `CHARGE`) has been explicitly set.
- Likewise, the proper assignment of `NPART` attribute must be checked (it must be positive).
- The `CARBON` charg...- The `BEAM` command must verify that the particle definition (`PARTICLE` or `MASS` and `CHARGE`) has been explicitly set.
- Likewise, the proper assignment of `NPART` attribute must be checked (it must be positive).
- The `CARBON` charge value is erroneous2022.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/700Compiler error: boost::bimap assignation fails2021-12-15T15:36:30+01:00ext-calvo_ppedro.calvo@ciemat.esCompiler error: boost::bimap assignation failsI'm getting compiler errors due to invalid arguments in bimap initialization:
```
OPAL/src/src/BasicActions/Option.cpp:49:1:
error: conversion ‘<brace-enclosed initializer list>’ to
‘const::bimaps::bimap<enum class, std::__cxx11...I'm getting compiler errors due to invalid arguments in bimap initialization:
```
OPAL/src/src/BasicActions/Option.cpp:49:1:
error: conversion ‘<brace-enclosed initializer list>’ to
‘const::bimaps::bimap<enum class, std::__cxx11::basic_string<char> >’ is ambiguous
```
The adequate `boost::bimap` allocation must be done without braces.2022.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/697Fix elementTypeToString map2021-12-12T23:23:05+01:00ext-calvo_ppedro.calvo@ciemat.esFix elementTypeToString mapThe map `elementTypeToString_s` introduce in the implementation of OPAL/src#694 contains some bugs that have broken [UndulatorTest](http://amas.web.psi.ch/opal/unitTests/master/results_2021-11-30_10-49.xml) and [VFFA-1 regression test](h...The map `elementTypeToString_s` introduce in the implementation of OPAL/src#694 contains some bugs that have broken [UndulatorTest](http://amas.web.psi.ch/opal/unitTests/master/results_2021-11-30_10-49.xml) and [VFFA-1 regression test](http://amas.web.psi.ch/opal/regressionTests/master/results_2021-11-30_10-49.xml):
- Element string names must be lowercase
- `Ring` element is missing2022.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/696Some regression tests fails2021-11-16T19:42:15+01:00ext-calvo_ppedro.calvo@ciemat.esSome regression tests failsAfter implementing OPAL/src!552, some regression tests [fails](http://amas.web.psi.ch/opal/regressionTests/master/results_2021-11-16_10-49.xml) due to a bad unit conversion perform in `OpalCavity.cpp` (line 110): the correct conversion i...After implementing OPAL/src!552, some regression tests [fails](http://amas.web.psi.ch/opal/regressionTests/master/results_2021-11-16_10-49.xml) due to a bad unit conversion perform in `OpalCavity.cpp` (line 110): the correct conversion is `MHz2Hz`2022.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/695Compilation broken2021-11-16T08:58:57+01:00ext-calvo_ppedro.calvo@ciemat.esCompilation brokenCompilation with AMR solver was broken (see [link](http://amas.web.psi.ch/opal/master/output/2021-11-15_10-49.txt)) due to a missing bracket in Line 361 of `AmrBoxLib.cpp` after merging OPAL/src!552Compilation with AMR solver was broken (see [link](http://amas.web.psi.ch/opal/master/output/2021-11-15_10-49.txt)) due to a missing bracket in Line 361 of `AmrBoxLib.cpp` after merging OPAL/src!5522022.1ext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/687No values assigned to dispersion2021-11-03T13:20:02+01:00krausNo values assigned to dispersionAll values for the dispersion in statistics file are zero everywhere. The reason is that no values are assigned.All values for the dispersion in statistics file are zero everywhere. The reason is that no values are assigned.2022.1krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/689Fix description of minimum values in monitor statistics2021-10-25T11:42:40+02:00krausFix description of minimum values in monitor statisticsThe description for the values min_x, min_y and min_s claim that the max beamsize in the respective component is stored. Instead it should read min beamsize.The description for the values min_x, min_y and min_s claim that the max beamsize in the respective component is stored. Instead it should read min beamsize.2022.1krauskraus