src issueshttps://gitlab.psi.ch/OPAL/src/-/issues2019-07-24T09:19:14+02:00https://gitlab.psi.ch/OPAL/src/-/issues/331bugfix: iterators must be incremented at end of for-loop in Cyclotron::apply()2019-07-24T09:19:14+02:00gsellbugfix: iterators must be incremented at end of for-loop in Cyclotron::apply()While looping over the RF field in
```
bool Cyclotron::apply(
const Vector_t &R,
const Vector_t &P,
const double &t,
Vector_t &E,
Vector_t &B)
```
the iterators `rffci` and `rfvci` are incremented at the beginning of ...While looping over the RF field in
```
bool Cyclotron::apply(
const Vector_t &R,
const Vector_t &P,
const double &t,
Vector_t &E,
Vector_t &B)
```
the iterators `rffci` and `rfvci` are incremented at the beginning of the for loop instead of at the end.
See also #326.gsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/330remove deprecated StatisticalError tracker2019-07-19T11:21:45+02:00krausremove deprecated StatisticalError trackerThe StatisticalError tracker implemented similar functionality as the sampler. However it isn't based on the optimizer and hence would require more effort to maintain.The StatisticalError tracker implemented similar functionality as the sampler. However it isn't based on the optimizer and hence would require more effort to maintain.krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/328Add git hash to stdout2019-07-03T20:24:59+02:00krausAdd git hash to stdoutCurrently we dump the git hash to all SDDS files but not to the stdout. For supporting users with problems the hash provides a hint about the source code version used to generate the output.Currently we dump the git hash to all SDDS files but not to the stdout. For supporting users with problems the hash provides a hint about the source code version used to generate the output.krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/327General field map reader2022-01-26T19:47:13+01:00ext-neveu_nGeneral field map reader### Summary
Requesting capability to provide a field map with real and imaginary parts.
i.e. see field map here for LCLS TW structure (~3m long):
https://www.slac.stanford.edu/~lizh/link/lcls/sband-1d-field-map/lcls1-sband-1d-field-m...### Summary
Requesting capability to provide a field map with real and imaginary parts.
i.e. see field map here for LCLS TW structure (~3m long):
https://www.slac.stanford.edu/~lizh/link/lcls/sband-1d-field-map/lcls1-sband-1d-field-map-complex-field.datkrauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/326cleanup in Cyclotron.cpp2019-07-09T16:52:40+02:00gsellcleanup in Cyclotron.cppsee also approved merged request for issue #315see also approved merged request for issue #315gsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/325fix unmarked override of member functions2019-07-02T17:36:33+02:00gsellfix unmarked override of member functionsgsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/324Multi-Bunch: Dump azimuth and spos dependent on bunch2019-07-15T10:09:17+02:00frey_mMulti-Bunch: Dump azimuth and spos dependent on bunchCurrently the azimuth of the first bunch is also used for dumping to the multi-bunch stat file of the others. However, this is not correct.Currently the azimuth of the first bunch is also used for dumping to the multi-bunch stat file of the others. However, this is not correct.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/322Sampler: Default name of output JSON file has two extensions2019-07-04T10:24:51+02:00frey_mSampler: Default name of output JSON file has two extensionsIn the constructor of the class `Sampler` we need to replace
```
std::string fname = "samples_" + std::to_string(comms_.island_id) + ".json";
std::string resultFile = args->getArg<std::string>("outfile", fname, false);
```
with
```
std::...In the constructor of the class `Sampler` we need to replace
```
std::string fname = "samples_" + std::to_string(comms_.island_id) + ".json";
std::string resultFile = args->getArg<std::string>("outfile", fname, false);
```
with
```
std::string resultFile = args->getArg<std::string>("outfile", "output", false);
```
Otherwise the default output JSON file is wrong.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/321Optimizer crash if SDDSVariable return value is NaN.2019-06-28T08:50:14+02:00frey_mOptimizer crash if SDDSVariable return value is NaN.I recently observed that the optimizer crashes with
```
Error{0}>
Error{0}> *** Error:
Error{0}> Internal OPAL error:
Error{0}> input stream error
Error{0}> input stream error
Rank 0 [Wed Jun 26 20:01:25 2019] [c0-0c0s2n0] ...I recently observed that the optimizer crashes with
```
Error{0}>
Error{0}> *** Error:
Error{0}> Internal OPAL error:
Error{0}> input stream error
Error{0}> input stream error
Rank 0 [Wed Jun 26 20:01:25 2019] [c0-0c0s2n0] application called MPI_Abort(MPI_COMM_WORLD, -100) - process 0
SIGABRT
```
if the return value of `SDDSVariable` is `ǸaN`. With a check `std::isnan` and `std::isinf` this can be fixed. It's probably best it's added to the `SDDSParser` which then throws an execption that is caught by `SDDSVariable`.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/320Accept approval of merge requests by their committers.2021-06-10T17:55:55+02:00snuverink_jjochem.snuverink@psi.chAccept approval of merge requests by their committers.After adding commits to an MR one can't approve anymore. I think this is not ideal, since sometimes it is much more convenient when an approver makes a small change instead of adding a comment. Note that the author of the MR should still...After adding commits to an MR one can't approve anymore. I think this is not ideal, since sometimes it is much more convenient when an approver makes a small change instead of adding a comment. Note that the author of the MR should still not be able to approve.
This setting can be modified in gitlab, see https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html#prevent-approval-of-merge-requests-by-their-committersgsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/318Optimizer: Generalizing objectives with sddsVariableAt2019-06-26T16:56:20+02:00frey_mOptimizer: Generalizing objectives with sddsVariableAt### Summary
Currently, the optimizer allows to evaluate an objective in the stat-file with ```sddsVariableAt``` according to ```spos```
only. I'd like to use other quantities as well.### Summary
Currently, the optimizer allows to evaluate an objective in the stat-file with ```sddsVariableAt``` according to ```spos```
only. I'd like to use other quantities as well.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/315cleanup/fixes in Bend.cpp, Cyclotron.cpp and BeamStrippingPhysics.cpp2019-07-11T10:48:57+02:00gsellcleanup/fixes in Bend.cpp, Cyclotron.cpp and BeamStrippingPhysics.cppgsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/314in BoundaryGeometry: replace recursive algorithm to set orientation of triang...2019-07-03T15:59:34+02:00gsellin BoundaryGeometry: replace recursive algorithm to set orientation of triangle with iterativeFor the time being an recursive algorithm is used to make the normal vector of each triangle inward pointing. This is inefficient for large meshes and - more important - can cause crashes due to memory consumption.For the time being an recursive algorithm is used to make the normal vector of each triangle inward pointing. This is inefficient for large meshes and - more important - can cause crashes due to memory consumption.gsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/313PluginElements: particles not recorded when element crosses (or close to) origin2019-07-14T16:56:42+02:00snuverink_jjochem.snuverink@psi.chPluginElements: particles not recorded when element crosses (or close to) origin### Summary
Noticed by @nesteruk\_k: Particles are not recorded in some Probes.
Likely the other PluginElements are affected too.
### Steps to reproduce
A Probe crossing the origin, e.g. one defined as:
```
P: Probe, XSTART=-1e10, YS...### Summary
Noticed by @nesteruk\_k: Particles are not recorded in some Probes.
Likely the other PluginElements are affected too.
### Steps to reproduce
A Probe crossing the origin, e.g. one defined as:
```
P: Probe, XSTART=-1e10, YSTART=0, XEND=1e10, YEND=0;
```
will not record any particles.
### What is the expected *correct* behavior?
Recorded particle and output files: P.hist, P.h5, P.peaks
### Possible fixes
A check is performed if the bunch is close to the probe (and only then individual particles are checked) as follows:
https://gitlab.psi.ch/OPAL/src/blob/master/src/Classic/AbsBeamline/Probe.cpp#L62
```c++
if( rbunch_max > rstart_m - 10.0 && rbunch_min < rend_m + 10.0 ) {
```
With `rstart_m` and `rend_m` defined as:
https://gitlab.psi.ch/OPAL/src/blob/master/src/Classic/AbsBeamline/PluginElement.cpp#L86
```cpp
rstart_m = std::hypot(xstart, ystart);
rend_m = std::hypot(xend, yend);
// start position is the one with lowest radius
if (rstart_m > rend_m) {
std::swap(xstart_m, xend_m);
std::swap(ystart_m, yend_m);
std::swap(rstart_m, rend_m);
}
```
Instead of `rstart_m` the closest point to the origin should be used in the check.snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/312Restart-2 regression test fails after AMR update2019-06-13T17:29:10+02:00snuverink_jjochem.snuverink@psi.chRestart-2 regression test fails after AMR updateAfter merging src!105, the Restart-2 regression test fails: http://amas.web.psi.ch/opal/regressionTests/master/results_2019-06-13.xmlAfter merging src!105, the Restart-2 regression test fails: http://amas.web.psi.ch/opal/regressionTests/master/results_2019-06-13.xmlfrey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/311Directory data isn't generated2019-07-04T10:24:51+02:00krausDirectory data isn't generatedWhen running an optimization then the directory 'data' isn't generated in the temporary simulation directories. Without this directory no files can be written to it. Here are cases where one wants e.g. the distribution file for further p...When running an optimization then the directory 'data' isn't generated in the temporary simulation directories. Without this directory no files can be written to it. Here are cases where one wants e.g. the distribution file for further processing.krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/310OPAL job failed due to attempt to free memory that is still in use by MPI2019-06-13T09:43:00+02:00bellotti_rOPAL job failed due to attempt to free memory that is still in use by MPII tried to take 10k samples and obtained the following error message:
```
Ippl{0}> CommMPI: Initialization complete.
Ippl{0}> CommMPI: Parent process waiting for children ...
Ippl{0}> CommMPI: Child 1 ready.
Ippl{0}> CommMPI: Child 2 re...I tried to take 10k samples and obtained the following error message:
```
Ippl{0}> CommMPI: Initialization complete.
Ippl{0}> CommMPI: Parent process waiting for children ...
Ippl{0}> CommMPI: Child 1 ready.
Ippl{0}> CommMPI: Child 2 ready.
Ippl{0}> CommMPI: Child 3 ready.
Ippl{0}> CommMPI: Child 4 ready.
Ippl{0}> CommMPI: Child 5 ready.
Ippl{0}> CommMPI: Child 6 ready.
Ippl{0}> CommMPI: Child 7 ready.
Ippl{0}> CommMPI: Initialization complete.
[merlin-c-002:10963] Attempt to free memory that is still in use by an ongoing MPI communication (buffer 0x7f6a000, size 6098944). MPI job will now abort.
-------------------------------------------------------
Primary job terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
-------------------------------------------------------
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:
Process name: [[63717,1],42]
Exit code: 1
--------------------------------------------------------------------------
```
I think this might be a bug. The following **configuration file** was used:
```
OPTION, INFO=TRUE;
REAL Nsamples = 10000;
// Design variables
p1: DVAR, VARIABLE="p1", LOWERBOUND=-30., UPPERBOUND=0;
// Sampling methods
sp1: SAMPLING, VARIABLE="p1", RANDOM=true, TYPE="UNIFORM", SEED=122, N = Nsamples;
tdc1: DVAR, VARIABLE="PHASE", LOWERBOUND=0.4856, UPPERBOUND=0.7284;
// ---- OPTIMIZER SECTION -------
dv0: DVAR, VARIABLE="IBF", LOWERBOUND=400, UPPERBOUND=500;
dv1: DVAR, VARIABLE="IM", LOWERBOUND=250, UPPERBOUND=440;
dv2: DVAR, VARIABLE="GPHASE", LOWERBOUND=-30.0, UPPERBOUND=0.0;
dv3: DVAR, VARIABLE="FWHM", LOWERBOUND=1.5e-12, UPPERBOUND=10.0e-12;
//Quad values
dv4: DVAR, VARIABLE="KQ1", LOWERBOUND=-8.0, UPPERBOUND=8.0;
dv5: DVAR, VARIABLE="KQ2", LOWERBOUND=-8.0, UPPERBOUND=8.0;
dv6: DVAR, VARIABLE="KQ3", LOWERBOUND=-8.0, UPPERBOUND=8.0;
dv7: DVAR, VARIABLE="KQ4", LOWERBOUND=-8.0, UPPERBOUND=8.0;
stdc1: SAMPLING, VARIABLE="PHASE", TYPE="UNIFORM", SEED=329, N = Nsamples;
sdv0: SAMPLING, VARIABLE="IBF", RANDOM=true, TYPE="UNIFORM", SEED=5979, N = Nsamples;
sdv1: SAMPLING, VARIABLE="IM", RANDOM=true, TYPE="UNIFORM", SEED=2840, N = Nsamples;
sdv2: SAMPLING, VARIABLE="GPHASE", RANDOM=true, TYPE="UNIFORM", SEED=68921, N = Nsamples;
sdv3: SAMPLING, VARIABLE="FWHM", RANDOM=true, TYPE="UNIFORM", SEED=580972, N = Nsamples;
sdv4: SAMPLING, VARIABLE="KQ1", RANDOM=true, TYPE="UNIFORM", SEED=1169, N = Nsamples;
sdv5: SAMPLING, VARIABLE="KQ2", RANDOM=true, TYPE="UNIFORM", SEED=435831, N = Nsamples;
sdv6: SAMPLING, VARIABLE="KQ3", RANDOM=true, TYPE="UNIFORM", SEED=183246, N = Nsamples;
sdv7: SAMPLING, VARIABLE="KQ4", RANDOM=true, TYPE="UNIFORM", SEED=12548, N = Nsamples;
SAMPLE,
RASTER = false,
DVARS = {p1, tdc1, dv0, dv1, dv2, dv3, dv4, dv5, dv6, dv7},
SAMPLINGS = {sp1, stdc1, sdv0, sdv1, sdv2, sdv3, sdv4, sdv5, sdv6, sdv7},
INPUT = "awa.tmpl",
OUTPUT = "awa",
OUTDIR = "output_5k",
TEMPLATEDIR = "tmpl",
FIELDMAPDIR = "fieldmaps",
NUM_MASTERS = 1,
NUM_COWORKERS = 1;
QUIT;
```
Just write me an email if somebody is interested and needs more information.https://gitlab.psi.ch/OPAL/src/-/issues/309review OPAL CMakeModule files2020-04-22T11:25:48+02:00gsellreview OPAL CMakeModule filesSearching for a library with
```
FIND_LIBRARY (GSL_LIBRARY gsl
HINTS $ENV{GSL_ROOT_DIR}/lib $ENV{GSL_LIBRARY_PATH} $ENV{GSL_LIBRARY_DIR} $ENV{GSL_PREFIX}/lib $ENV{GSL_DIR}/lib $ENV{GSL}/lib
PATHS ENV LIBRARY_PATH
)
```
can fail i...Searching for a library with
```
FIND_LIBRARY (GSL_LIBRARY gsl
HINTS $ENV{GSL_ROOT_DIR}/lib $ENV{GSL_LIBRARY_PATH} $ENV{GSL_LIBRARY_DIR} $ENV{GSL_PREFIX}/lib $ENV{GSL_DIR}/lib $ENV{GSL}/lib
PATHS ENV LIBRARY_PATH
)
```
can fail if the library is installed in `/lib` or `/lib64`. For some unknown reasons this works on Merlin-5 but fails on Merlin-6 if e.g. `libgsl` is installed.
What is the problem?
* On RHEL7 `/usr/lib64` is a symbolic link to `/lib64`.
* If e.g. `GSL_ROOT_DIR` is not set in the environment `/lib` and `/lib64` are used to search for the library.
* In RHEL7 most system libraries are installed in `/lib64`, which is the first hint if `GSL_ROOT_DIR` is not set.gsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/307PluginElements: use unit meter internally to avoid conversions2020-05-19T09:16:37+02:00snuverink_jjochem.snuverink@psi.chPluginElements: use unit meter internally to avoid conversionsFor consistency and #45 the plugin elements (septum, ccollimator, probe and stripper) should use unit `m` instead of `mm`. This will remove conversions and is much less error-prone.For consistency and #45 the plugin elements (septum, ccollimator, probe and stripper) should use unit `m` instead of `mm`. This will remove conversions and is much less error-prone.snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/306Many failed regression tests2019-05-16T07:58:24+02:00snuverink_jjochem.snuverink@psi.chMany failed regression testsToday there were many failed regression tests:
http://amas.web.psi.ch/opal/regressionTests/master/results_2019-05-10.xml
There were four merge requests (issue assigned to the authors of these):
1. https://gitlab.psi.ch/OPAL/src/merge_r...Today there were many failed regression tests:
http://amas.web.psi.ch/opal/regressionTests/master/results_2019-05-10.xml
There were four merge requests (issue assigned to the authors of these):
1. https://gitlab.psi.ch/OPAL/src/merge_requests/82
1. https://gitlab.psi.ch/OPAL/src/merge_requests/87
1. https://gitlab.psi.ch/OPAL/src/merge_requests/90
1. https://gitlab.psi.ch/OPAL/src/merge_requests/92
I had a quick look and I suspect this change in the PoissonSolver https://gitlab.psi.ch/OPAL/src/blob/master/src/Solvers/FFTPoissonSolver.cpp:
```diff
@@ -388,7 +388,7 @@ void FFTPoissonSolver::computePotentialDKS(Field_t &rho) {
if (Ippl::myNode() == 0) {
IpplTimings::startTimer(GreensFunctionTimer_m);
- integratedGreensFunction();
+ integratedGreensFunctionDKS();
IpplTimings::stopTimer(GreensFunctionTimer_m);
//transform the greens function
int dimsize[3] = {2*nr_m[0], 2*nr_m[1], 2*nr_m[2]};
```frey_mfrey_m