src issueshttps://gitlab.psi.ch/OPAL/src/-/issues2020-02-19T17:04:41+01:00https://gitlab.psi.ch/OPAL/src/-/issues/468Format of _ElementPositions.sdds files wrong2020-02-19T17:04:41+01:00krausFormat of _ElementPositions.sdds files wrong### Summary
The format of the data values in `_ElementPositions.sdds` is wrong. The numbers are written with `std::ios_base::hex` instead of `std::ios_base::dec`.
### Steps to reproduce
Run any input file for OPAL-T and check the dat...### Summary
The format of the data values in `_ElementPositions.sdds` is wrong. The numbers are written with `std::ios_base::hex` instead of `std::ios_base::dec`.
### Steps to reproduce
Run any input file for OPAL-T and check the data in the SDDS file.
### What is the current *bug* behavior?
The data look like this:
```
&data
mode=ascii,
no_row_counts=1
&end
1
OPAL 2.1.0 git rev. #a23b3950ffa3756d157d4e41dc04569663c2eb13
opal-t
0x1.f97b4a2339c0ep+4 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 ""
0x1.037cd7b767d82p+5 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 ""
0x1.037cd7b767d82p+5 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x0p+0 0x1p+0 "D69"
```
### What is the expected *correct* behavior?
The data should start with lines similar like this:
```
&data
mode=ascii,
no_row_counts=1
&end
1
OPAL 2.1.0 git rev. #a23b3950ffa3756d157d4e41dc04569663c2eb13
opal-t
31.5926000000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 ""
32.4359583214 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 ""
32.4359583214 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 "D69"
```
OPAL 2.4.0krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/465Segmentation fault in FromFile due to RASTER=TRUE2020-02-22T22:21:22+01:00frey_mSegmentation fault in FromFile due to RASTER=TRUE### Summary
Bug report through OPAL mailing list:
```bash
Dear all,
I’m trying to use the FROMFILE option for scanning parameters in the sampler.
The files work fine for uniform distributions, but when I introduce FROMFILE,
I get the...### Summary
Bug report through OPAL mailing list:
```bash
Dear all,
I’m trying to use the FROMFILE option for scanning parameters in the sampler.
The files work fine for uniform distributions, but when I introduce FROMFILE,
I get the message, that
Error{1}> *** User error detected by function "FromFile()"
Error{1}> Couldn't find the dvar 'VQ1B' in the file './samplefile_corV3.dat'
Error{1}> Couldn't find the dvar 'VQ1B' in the file './samplefile_corV3.dat'
That happens, when I write ‘VQ1B’ – which is not in the manual.
Using the manual and writing VQ1B I get a segmentation fault.
[dinux9:59198] *** Process received signal ***
[dinux9:59198] Signal: Segmentation fault (11)
[dinux9:59198] Signal code: Address not mapped (1)
[dinux9:59198] Failing at address: (nil)
[dinux9:59198] [ 0] /lib64/libpthread.so.0(+0x10c10)[0x7fe6e78c4c10]
[dinux9:59198] [ 1] opal(_ZN8FromFile8allocateERKN5boost10shared_ptrI12CmdArgumentsEERKN4Comm8Bundle_tE+0x1190)[0x898ab0]
[dinux9:59198] [ 2] opal(_ZN9SampleCmd7executeEv+0x2d41)[0x8a16d1]
[dinux9:59198] [ 3] opal(_ZNK10OpalParser7executeEP6ObjectRKSs+0x35)[0x7b0e25]
[dinux9:59198] [ 4] opal(_ZNK10OpalParser11parseActionER9Statement+0x120)[0x7b4bc0]
[dinux9:59198] [ 5] opal(_ZNK10OpalParser5parseER9Statement+0x1cf)[0x7b541f]
[dinux9:59198] [ 6] opal(_ZNK10OpalParser3runEv+0x2c)[0x7b0aec]
[dinux9:59198] [ 7] opal(_ZNK10OpalParser3runEP11TokenStream+0x70)[0x7b5d40]
[dinux9:59198] [ 8] opal(main+0xf75)[0x6ff155]
[dinux9:59198] [ 9] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7fe6e5c2c725]
[dinux9:59198] [10] opal(_start+0x29)[0x70b039]
[dinux9:59198] *** End of error message ***
```
[2019_diag_EMF_corV3_sampler.in](/uploads/4c52ba86ecd3afbcca5ebefa8c52e095/2019_diag_EMF_corV3_sampler.in)
[samplefile_corV3.dat](/uploads/1d030ccb2d1c172171793f325963d805/samplefile_corV3.dat)
### What is the current *bug* behavior?
Segmentation fault.
### What is the expected *correct* behavior?
No segmentation fault.
### Possible fixes
The reason is the `RASTER=TRUE` option which increases the number of required samples in the `FROMFILE` file.
See in [line 335](https://gitlab.psi.ch/OPAL/src/blob/master/src/Sample/SampleCmd.cpp#L335) in `SampleCmd.cpp`. Hence `nSamples > globalSize_m` (`globalSize_m` is the number of lines in the provided FROMFILE file).
It can be fixed by
```C++
nSamples = std::min(nSamples, globalSize_m);
```frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/474cleanup ippl CMakeLists2020-02-24T13:36:50+01:00ext-calvo_ppedro.calvo@ciemat.escleanup ippl CMakeLists`ippl/src/Particle/CMakeLists.txt` call to `ParticleLayoutFromGrid.h`, but this file doesn't exist
`ippl/src/Utility/CMakeLists.txt` call to `RefBlock.h` but it doesn't exist`ippl/src/Particle/CMakeLists.txt` call to `ParticleLayoutFromGrid.h`, but this file doesn't exist
`ippl/src/Utility/CMakeLists.txt` call to `RefBlock.h` but it doesn't existext-calvo_ppedro.calvo@ciemat.esext-calvo_ppedro.calvo@ciemat.eshttps://gitlab.psi.ch/OPAL/src/-/issues/476missing include of <algorithm> and usage of std::minmax()2020-02-25T17:26:17+01:00gsellmissing include of <algorithm> and usage of std::minmax()In `bet/profile.cpp` the header `<algorithm>` must be included. Don't now why it compiles on macOS without ...
`std::minmax()` has been removed from C++17! This should be replaced.In `bet/profile.cpp` the header `<algorithm>` must be included. Don't now why it compiles on macOS without ...
`std::minmax()` has been removed from C++17! This should be replaced.OPAL 2.4.0gsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/477Missing include in Algorithms/bet/math/savgol.cpp2020-02-26T09:37:55+01:00snuverink_jjochem.snuverink@psi.chMissing include in Algorithms/bet/math/savgol.cppWith gcc 7.3.0 from psi modules on linux I get the compiler error:
```
src/Algorithms/bet/math/savgol.cpp:406:5: error: ‘memcpy’ was not declared in this scope
memcpy(&cIn[1], c, sizeof(double)*n);
^~~~~~
/home/scratch/OPAL/OP...With gcc 7.3.0 from psi modules on linux I get the compiler error:
```
src/Algorithms/bet/math/savgol.cpp:406:5: error: ‘memcpy’ was not declared in this scope
memcpy(&cIn[1], c, sizeof(double)*n);
^~~~~~
/home/scratch/OPAL/OPAL-fork/OPAL-src/src/Algorithms/bet/math/savgol.cpp:406:5: note: suggested alternative: ‘wmemcpy’
memcpy(&cIn[1], c, sizeof(double)*n);
^~~~~~
wmemcpy
```
This is due to a missing include `<cstring>`.OPAL 2.4.0snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/469asciih5block not working with recent H5Hut library?2020-03-02T13:48:39+01:00snuverink_jjochem.snuverink@psi.chasciih5block not working with recent H5Hut library?### Summary
The asciih5block script returns error messages and an empty (header only) file
### Steps to reproduce
```
module use unstable; module load gcc/7.3.0 mpich/3.3 hdf5/1.10.4 H5hut/2.0.0rc5
```
I believe this will happen with...### Summary
The asciih5block script returns error messages and an empty (header only) file
### Steps to reproduce
```
module use unstable; module load gcc/7.3.0 mpich/3.3 hdf5/1.10.4 H5hut/2.0.0rc5
```
I believe this will happen with any input file, an example is given here.
Example input file: [NewChimney_R000_D000E.txt](/uploads/88ca38d65d6d433b084ac7ec2765c716/NewChimney_R000_D000E.txt)
Modify ascii2h5block_asgic.cpp for the right dimensions: [ascii2h5block_asgic.cpp](/uploads/dcbcdc4b7018f73169bc7a507ee2b496/ascii2h5block_asgic.cpp)
```bash
$ export LDLIBS=-lH5hut
$ make ascii2h5block_asgic
$ ./ascii2h5block_asgic NewChimney_R000_D000E.txt out
--------------------------------------------------------
Using NewChimney_R000_D000E.txt to create test_CYC.h5part
Lines in finE: 67370
Hardcoded limits: x(-90/-10) cm
Hardcoded limits: y(-30/30) cm
Hardcoded limits: z(-1/1) cm
Hardcoded spacing: 0.5 cm
Hardcoded nlines: 67367
File nlines: 67365
Grid dimensions: Px = 23 , Py = 29 , Pz = 101
E_max = (29.0302, -5.6267, -23.2274) V/cm at index 20641.
Converting from V/cm and cm to kV/mm and mm before saving h5part
[proc 0] E: H5Block3dSetView: Iteration is invalid! Have you set the time step?
[proc 0] E: H5Block3dWriteVector3dFieldFloat64: No view has been defined!
[proc 0] E: H5Block3dWriteVector3dFieldFloat64: No view has been defined!
Done, bye ...
```
### What is the current *bug* behavior?
Header only H5-file
### What is the expected *correct* behavior?
H5-file with correct field
### Possible fixes
The `H5SetStep` should be set before the View:
```c++
H5SetStep(file, 0);
h5_err_t h5err = H5Block3dSetView(file,
0, gridPx - 1,
0, gridPy - 1,
0, gridPz - 1);
```
[This modified ascii2h5block_asgic.cpp](/uploads/3e55c0263d5930c84b6b5d933467277f/ascii2h5block_asgic.cpp) runs successfully.OPAL 2.4.0snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/479IPPL tests and Boost timer2020-03-04T19:38:57+01:00frey_mIPPL tests and Boost timer### Summary
Yesterday, I had to compile OPAL together with a student. He requires the IPPL tests since he will work on P3M.
However, missing `${Boost_LIBRARY_DIRS}` in the `link_directories` command of the CMakeLists.txt of IPPL test ca...### Summary
Yesterday, I had to compile OPAL together with a student. He requires the IPPL tests since he will work on P3M.
However, missing `${Boost_LIBRARY_DIRS}` in the `link_directories` command of the CMakeLists.txt of IPPL test caused the error of not finding `boost_timer`.
**2 Questions:**
* Is `boost_timer` really required in the `target_link_libraries` command (e.g. [here](https://gitlab.psi.ch/OPAL/src/blob/master/ippl/test/particle/CMakeLists.txt#L37))?
* @snuverink\_j You cleaned up these tests in one of the MRs of https://gitlab.psi.ch/OPAL/src/issues/291. You didn't get this error when compiling, right?
### Steps to reproduce
Configure OPAL with: `-DENABLE_IPPLTESTS=1`
### What is the current *bug* behavior?
Cannot find the `boost_timer` library since `-L ${BOOST_LIBRARY_DIR}` is missing when compiling.
### What is the expected *correct* behavior?
It compiles properly.
### Possible fixes
@wyssling_t and I fixed it in his fork. The corresponding commit: https://gitlab.psi.ch/wyssling_t/src/commit/e7f9345447dda6757774e9b837c1757a2492eaf1https://gitlab.psi.ch/OPAL/src/-/issues/484clang compiler error for VerticalFFAMagnet (-Wabsolute-value)2020-03-17T10:48:05+01:00snuverink_jjochem.snuverink@psi.chclang compiler error for VerticalFFAMagnet (-Wabsolute-value)### Summary
Compiler error for VerticalFFAMagnet
### Steps to reproduce
```
Host OS System: Darwin-14.5.0
The C++ compiler identification is: AppleClang
The C++ compiler version is: 7.0.2.7000181
```
### Relevant logs and/or screensh...### Summary
Compiler error for VerticalFFAMagnet
### Steps to reproduce
```
Host OS System: Darwin-14.5.0
The C++ compiler identification is: AppleClang
The C++ compiler version is: 7.0.2.7000181
```
### Relevant logs and/or screenshots
```
src/Classic/AbsBeamline/VerticalFFAMagnet.cpp:82:9: error:
using integer absolute value function 'abs' when argument is of floating point type
[-Werror,-Wabsolute-value]
if (abs(R[0]) > halfWidth_m ||
^
/Users/jsnuverink/Documents/OPAL/fork/src/src/Classic/AbsBeamline/VerticalFFAMagnet.cpp:82:9: note:
use function 'std::abs' instead
if (abs(R[0]) > halfWidth_m ||
^~~
std::abs
```
### Possible fixes
Use `std::` namespaceOPAL 2.4.0snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/483Compiler warnings from boost headers stops compilation2020-03-17T16:36:38+01:00snuverink_jjochem.snuverink@psi.chCompiler warnings from boost headers stops compilation### Summary
Warnings from boost headers result in compilation error.
### Steps to reproduce
System specifications:
```
Host OS System: Darwin-14.5.0
The C++ compiler identification is: AppleClang
The C++ compiler version is: 7.0.2.70...### Summary
Warnings from boost headers result in compilation error.
### Steps to reproduce
System specifications:
```
Host OS System: Darwin-14.5.0
The C++ compiler identification is: AppleClang
The C++ compiler version is: 7.0.2.7000181
Boost version: 1.66.0
```
### What is the current *bug* behavior?
Compiler warnings from boost files result in compilation error.
### What is the expected *correct* behavior?
Boost or dependent libraries should not trigger compiler errors.
### Relevant logs and/or screenshots
```
In file included from /Users/jsnuverink/Documents/OPAL/fork/src/src/Distribution/Distribution.cpp:10:
In file included from /Users/jsnuverink/Documents/OPAL/fork/src/src/Distribution/SigmaGenerator.h:37:
In file included from /opt/local/include/boost/numeric/ublas/matrix_sparse.hpp:16:
In file included from /opt/local/include/boost/numeric/ublas/vector_sparse.hpp:16:
/opt/local/include/boost/numeric/ublas/storage_sparse.hpp:401:35: error: unused parameter
'hint' [-Werror,-Wunused-parameter]
iterator insert (iterator hint, const value_type &p) {
^
```
### Possible fixes
Include the boost headers as system headers so that gcc and clang don't issue warnings (with `-isystem`)
In CMake this can be done with:
```cmake
include_directories (SYSTEM ${Boost_INCLUDE_DIRS})
```
As a side note it seems `include_directories` is deprecated and it is advised to use `target_include_directories` instead.OPAL 2.4.0snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/488clang compiler error: unmatched template parameter `const CenteringEnum*`2020-03-18T10:54:28+01:00snuverink_jjochem.snuverink@psi.chclang compiler error: unmatched template parameter `const CenteringEnum*`### Summary
Clang compiler errors for ippl unit test BCond.
### Steps to reproduce
```
-- The C compiler identification is Clang 9.0.1
-- The CXX compiler identification is Clang 9.0.1
-- Check for working C compiler: /opt/local/bin/m...### Summary
Clang compiler errors for ippl unit test BCond.
### Steps to reproduce
```
-- The C compiler identification is Clang 9.0.1
-- The CXX compiler identification is Clang 9.0.1
-- Check for working C compiler: /opt/local/bin/mpicc-mpich-clang90
```
### Relevant logs and/or screenshots
```
[ 97%] Building CXX object tests/CMakeFiles/opal_unit_tests.dir/ippl_src/Field/BCond.cpp.o
In file included from /Users/jsnuverink/Documents/OPAL/fork/src/tests/ippl_src/Field/BCond.cpp:7:
In file included from /Users/jsnuverink/Documents/OPAL/fork/src/ippl/src/FieldLayout/CenteredFieldLayout.h:127:
/Users/jsnuverink/Documents/OPAL/fork/src/ippl/src/FieldLayout/CenteredFieldLayout.hpp:313:3: error: no matching
function for call to 'centeredInitialize'
centeredInitialize(*this, mesh, p, vnodes);
^~~~~~~~~~~~~~~~~~
/Users/jsnuverink/Documents/OPAL/fork/src/tests/ippl_src/Field/BCond.cpp:411:38: note: in instantiation of member
function 'CenteredFieldLayout<2, UniformCartesian<2, double>, CartesianCentering<&CCCEnums<2, 2,
0>::vectorFace, 2, 2> >::CenteredFieldLayout' requested here
CenteredFieldLayout<Dim,M,vFace> layoutVFace(mesh);
^
/Users/jsnuverink/Documents/OPAL/fork/src/ippl/src/FieldLayout/CenteredFieldLayout.hpp:93:1: note: candidate
template ignored: substitution failure : deduced non-type template argument does not have the same type as
the corresponding template parameter ('CenteringEnum *' vs 'const CenteringEnum *')
centeredInitialize(CenteredFieldLayout<Dim,Mesh,
^
...
```
### Possible fixes
The template parameter CenteringEnum* always has a const qualifier, for example,
https://gitlab.psi.ch/OPAL/src/blob/master/ippl/src/Meshes/CartesianCentering.h#L35:
```c++
template<const CenteringEnum* CE, unsigned Dim, unsigned NComponents=1U>
class CartesianCentering
{
```
However the const qualifier seems too restrictive and I propose to remove it.OPAL 2.4.0snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/485clang compiler errors for MPI_AllReduce (-Wtype-safety)2020-03-18T14:13:52+01:00snuverink_jjochem.snuverink@psi.chclang compiler errors for MPI_AllReduce (-Wtype-safety)### Summary
Clang compiler errors with MPI_AllReduce (-Wtype-safety)
### Steps to reproduce
```
-- The C compiler identification is Clang 9.0.1
-- The CXX compiler identification is Clang 9.0.1
-- Check for working C compiler: /opt/lo...### Summary
Clang compiler errors with MPI_AllReduce (-Wtype-safety)
### Steps to reproduce
```
-- The C compiler identification is Clang 9.0.1
-- The CXX compiler identification is Clang 9.0.1
-- Check for working C compiler: /opt/local/bin/mpicc-mpich-clang90
```
### Relevant logs and/or screenshots
1.
```
src/Algorithms/ParallelSliceTracker.cpp:291:41: error: argument type
'bool *' doesn't match specified 'MPI' type tag that requires 'int *' [-Werror,-Wtype-safety]
MPI_Allreduce(MPI_IN_PLACE, &globalEOL_m, 1, MPI_INT, MPI_LAND, Ippl::getComm());
^~~~~~~~~~~~ ~~~~~~~
```
2.
```
src/Algorithms/bet/EnvelopeBunch.cpp:1458:33: error: argument type
'size_t *' (aka 'unsigned long *') doesn't match specified 'MPI' type tag that requires 'long *'
[-Werror,-Wtype-safety]
MPI_Allreduce(MPI_IN_PLACE, &count, 1, MPI_LONG, MPI_SUM, Ippl::getComm());
^~~~~~ ~~~~~~~~
```
3. some more similar to 2.
### Possible fixes
1.
https://gitlab.psi.ch/OPAL/src/blob/4868efe8cf31c3646c49387a293852acf215c2bb/src/Algorithms/ParallelSliceTracker.cpp#L291
```c++
MPI_Allreduce(MPI_IN_PLACE, &globalEOL_m, 1, MPI_INT, MPI_LAND, Ippl::getComm());
```
`globalEOL_m` is a boolean and this doesn't combine properly with `MPI_INT`.
Instead, the commented out line above:
```
reduce(&globalEOL_m, &globalEOL_m + 1, &globalEOL_m, OpBitwiseAndAssign());
```
compiles fine.
@kraus: there is a similar line in `ParallelTTracker.cpp`. Is that line correct in this case as well?
2.
https://gitlab.psi.ch/OPAL/src/blob/4868efe8cf31c3646c49387a293852acf215c2bb/src/Algorithms/bet/EnvelopeBunch.cpp#L1458
```c++
MPI_Allreduce(MPI_IN_PLACE, &count, 1, MPI_LONG, MPI_SUM, Ippl::getComm());
```
should rather be:
```c++
MPI_Allreduce(MPI_IN_PLACE, &count, 1, MPI_UNSIGNED_LONG, MPI_SUM, Ippl::getComm());
```OPAL 2.4.0snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/489clang compiler warnings in unit tests2020-03-18T21:09:58+01:00snuverink_jjochem.snuverink@psi.chclang compiler warnings in unit testsThere are some clang (9.0.1) compiler warnings (-Wunused, -Wuninitialized) in the unit tests.There are some clang (9.0.1) compiler warnings (-Wunused, -Wuninitialized) in the unit tests.OPAL 2.4.0snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/487Clang compiler warning for IntTSC (-Wsign-compare)2020-03-20T11:54:33+01:00snuverink_jjochem.snuverink@psi.chClang compiler warning for IntTSC (-Wsign-compare)### Summary
Clang compiler warning for IntTSC (-Wsign-compare).
### Steps to reproduce
```
-- The C compiler identification is Clang 9.0.1
-- The CXX compiler identification is Clang 9.0.1
-- Check for working C compiler: /opt/local/b...### Summary
Clang compiler warning for IntTSC (-Wsign-compare).
### Steps to reproduce
```
-- The C compiler identification is Clang 9.0.1
-- The CXX compiler identification is Clang 9.0.1
-- Check for working C compiler: /opt/local/bin/mpicc-mpich-clang90
```
### Relevant logs and/or screenshots
```
ippl/src/Particle/IntTSC.h:284:8: error: comparison of integers of
different signs: 'unsigned int' and 'int' [-Werror,-Wsign-compare]
if (p==-1) return .125*(1.-4.*dpos(i)+4.*dpos(i)*dpos(i));
~^ ~~
```
and many similar ones
### Possible fixes
The warning comes from
https://gitlab.psi.ch/OPAL/src/blob/master/ippl/src/Particle/IntTSC.h#L283
```c
auto W = [dpos](unsigned p, unsigned i) {
if (p==-1) return .125*(1.-4.*dpos(i)+4.*dpos(i)*dpos(i));
else if (p==0) return .25*(3.-4.*dpos(i)*dpos(i));
else if (p==+1) return .125*(1.+4.*dpos(i)+4.*dpos(i)*dpos(i)); };
```
`p` should be a signed integer instead of unsiged.OPAL 2.4.0snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/493Template directory not found when path contains spaces2020-03-31T17:10:45+02:00bellotti_rTemplate directory not found when path contains spacesFor OPAL sampler runs, the template file is not found when the path contains spaces. This could be easily solved by adding quotes `"` around the template directory path.For OPAL sampler runs, the template file is not found when the path contains spaces. This could be easily solved by adding quotes `"` around the template directory path.OPAL 2.4.0krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/244Linear transfer maps in SigmaGenerator.h2020-04-07T17:11:06+02:00cortes_cLinear transfer maps in SigmaGenerator.hThe linear transfer maps used in SigmaGenerator.h delivered from the MapGenerator.h class does not agree with the theoretical expectation. Please fix.The linear transfer maps used in SigmaGenerator.h delivered from the MapGenerator.h class does not agree with the theoretical expectation. Please fix.OPAL 2.4.0frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/511Link error if OpenMP is enabled2020-04-16T15:42:52+02:00gsellLink error if OpenMP is enabled### Summary
The linker reports undefined symbols if OpenMP is enabled.
### Steps to reproduce
```
cmake -DENABLE_OPENMP=TRUE ...
```
### What is the current *bug* behavior?
```
libOPAL.a(EnvelopeBunch.cpp.o): En la función `Envelo...### Summary
The linker reports undefined symbols if OpenMP is enabled.
### Steps to reproduce
```
cmake -DENABLE_OPENMP=TRUE ...
```
### What is the current *bug* behavior?
```
libOPAL.a(EnvelopeBunch.cpp.o): En la función `EnvelopeBunch::calcI() [clone ._omp_fn.0]':
EnvelopeBunch.cpp:(.text+0x82): referencia a `omp_get_num_threads' sin definir
EnvelopeBunch.cpp:(.text+0x89): referencia a `omp_get_thread_num' sin definir
libOPAL.a(EnvelopeBunch.cpp.o): En la función `EnvelopeBunch::calcI()':
EnvelopeBunch.cpp:(.text+0x9451): referencia a `GOMP_parallel' sin definir
../ippl/src/libippl.a(CommMPI.cpp.o): En la función `CommMPI::CommMPI(int&, char**&, int, bool, ompi_communicator_t*)':
CommMPI.cpp:(.text+0xf40): referencia a `omp_get_max_threads' sin definir
collect2: error: ld devolvió el estado de salida 1
make[2]: *** [src/CMakeFiles/opal.dir/build.make:117: src/opal] Error 1
make[1]: *** [CMakeFiles/Makefile2:738: src/CMakeFiles/opal.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
```
### Possible fixes
Set `-fopenmp` as a linker option.OPAL 2.4.0gsellgsellhttps://gitlab.psi.ch/OPAL/src/-/issues/510compiler errors in ippl/test with clang92020-04-17T09:43:25+02:00snuverink_jjochem.snuverink@psi.chcompiler errors in ippl/test with clang9### Summary
Reported by @adelmann.
Compiler errors with clang with `ENABLE_IPPLTESTS=ON`
### Steps to reproduce
```
-- The C compiler identification is Clang 9.0.1
-- The CXX compiler identification is Clang 9.0.1
-- Check for worki...### Summary
Reported by @adelmann.
Compiler errors with clang with `ENABLE_IPPLTESTS=ON`
### Steps to reproduce
```
-- The C compiler identification is Clang 9.0.1
-- The CXX compiler identification is Clang 9.0.1
-- Check for working C compiler: /opt/local/bin/mpicc-mpich-clang90
```
### Relevant logs and/or screenshots
```
clang: error: optimization flag '-fno-tree-vrp'
```
```
ippl/test/particle/p3m3d.cpp:170:72: error: implicit instantiation of
undefined template 'ApplyField<double>'
HPB.for_each(RadiusCondition<double, Dim>(interaction_radius), ApplyField<double>(-1,interaction_radius));
```
```
ippl/test/particle/ChargedParticleFactory.hpp:564:73: error: unused
parameter 'extend_l' [-Werror,-Wunused-parameter]
void createParticleDistributionEquiPart(Particles & P, Vektor<double,3> extend_l, Vektor<double,3> extend_r...
```
### Possible fixes
* remove the `-fno-tree-vrp` flag
* comment out function parameters
* reorder code to avoid undefined template errorOPAL 2.4.0snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://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/196Dumping phase space in global frame (Cyclotron-Tracker)2020-04-22T11:27:56+02:00frey_mDumping phase space in global frame (Cyclotron-Tracker)When dumping the phase space in global frame one obtains bad results if a core does not have particles, e.g.
```
OPAL{0}> * Integration step 0 (no phase space dump for <= 2 particles)
OPAL{0}> * T = 0 ns, Live Particles: 80640000
OPAL{0...When dumping the phase space in global frame one obtains bad results if a core does not have particles, e.g.
```
OPAL{0}> * Integration step 0 (no phase space dump for <= 2 particles)
OPAL{0}> * T = 0 ns, Live Particles: 80640000
OPAL{0}> * E = 71.6 MeV, beta * gamma = 0
OPAL{0}> * Bunch position: R = 0 mm, Theta = 0 Deg, Z = 0 mm
OPAL{0}> * Local Azimuth = -90 Deg, Local Elevation = -nan Deg
```
The reason is the usage of
```
meanR = itsBunch_m->R[0];
meanP = itsBunch_m->P[0];
```
in ```bunchDumpPhaseSpaceData()``` and ```bunchDumpStatData()```.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/526Runtime error on macOS: reduction MPI_SUM is not defined on MPI_INTEGER2020-04-29T09:51:03+02:00gsellRuntime error on macOS: reduction MPI_SUM is not defined on MPI_INTEGER### Summary
Runtime error on macOS: reduction MPI_SUM is not defined on MPI_INTEGER
### Steps to reproduce
Run spiral inflector simulation
### What is the current *bug* behavior?
run-time error
### Relevant logs and/or screenshots
...### Summary
Runtime error on macOS: reduction MPI_SUM is not defined on MPI_INTEGER
### Steps to reproduce
Run spiral inflector simulation
### What is the current *bug* behavior?
run-time error
### Relevant logs and/or screenshots
```
OPAL> * --------------------------------- Start tracking ------------------------------------ *
[Nimloth:21640] *** An error occurred in MPI_Scan: the reduction operation MPI_SUM is not defined on the MPI_INTEGER datatype
[Nimloth:21640] *** reported by process [922615809,0]
[Nimloth:21640] *** on communicator MPI_COMM_WORLD
[Nimloth:21640] *** MPI_ERR_OP: invalid reduce operation
[Nimloth:21640] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
[Nimloth:21640] *** and potentially your MPI job)
```
### Possible fixes
`MPI_INTEGER` is a type for Fortran, use `MPI_INT` instead.OPAL 2.4.0gsellgsell