Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects

Resolve "VariableRF, FFA, Offset and MultipoleT: unify units internally"

Merged ext-calvo_p requested to merge 787-variablerf-ffa-and-offset-unify-units-internally into master
  • Closes #787 (closed)
  • Update license headers and fix coding style
Edited by ext-calvo_p

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • ext-calvo_p changed milestone to %2024.1

    changed milestone to %2024.1

  • ext-calvo_p added 2 commits

    added 2 commits

    Compare with previous version

  • ext-calvo_p added 1 commit

    added 1 commit

    Compare with previous version

  • ext-calvo_p added 1 commit

    added 1 commit

    • 40b9a2a6 - fix coding style and clean up

    Compare with previous version

  • ext-calvo_p changed the description

    changed the description

  • ext-calvo_p marked this merge request as ready

    marked this merge request as ready

  • Author Developer

    @ext-rogers_c: could you have a look to this MR? Specially to the first two commits.

    I have ensured that all unit tests are successful and VFFA-1 regression test passes, but I may have made a mistake in the internal unit change.

  • Okay - I am unlikely to get to it today but I will try early next week.

  • ext-calvo_p added 1 commit

    added 1 commit

    Compare with previous version

  • ext-calvo_p added 1 commit

    added 1 commit

    Compare with previous version

    • Resolved by ext-calvo_p

      Browsing the code I notice that there are no changes in PyOpal, did you run the PyOpal tests at tests/opal_src/PyOpal/

      ==

      Unfortunately I get a fail at compile time, probably unrelated to the issue. It looks like a problem from Vektor, defined in ippl/src/AppTypes/Vektor.h, although diff tells me there are no differences between my IPPL AppTypes and the version in this source tree.

      [ 20%] Building CXX object src/CMakeFiles/libOPALObj.dir/AbstractObjects/BeamSequence.cpp.o
      In file included from /usr/include/c++/11/cassert:44,
                       from /home/cr67/Software/install/include/boost/numeric/ublas/detail/config.hpp:16,
                       from /home/cr67/Software/install/include/boost/numeric/ublas/exception.hpp:19,
                       from /home/cr67/Software/install/include/boost/numeric/ublas/storage.hpp:26,
                       from /home/cr67/Software/install/include/boost/numeric/ublas/vector.hpp:21,
                       from /home/cr67/Software/install/include/boost/numeric/ublas/matrix.hpp:18,
                       from /home/cr67/Software/OPAL/opal_src_3/src/Algorithms/BoostMatrix.h:21,
                       from /home/cr67/Software/OPAL/opal_src_3/src/Classic/Algorithms/CoordinateSystemTrafo.h:4,
                       from /home/cr67/Software/OPAL/opal_src_3/src/Classic/AbsBeamline/ElementBase.h:67,
                       from /home/cr67/Software/OPAL/opal_src_3/src/AbstractObjects/Element.h:34,
                       from /home/cr67/Software/OPAL/opal_src_3/src/AbstractObjects/BeamSequence.h:21,
                       from /home/cr67/Software/OPAL/opal_src_3/src/AbstractObjects/BeamSequence.cpp:19:
      /home/cr67/Software/OPAL/opal_src_3/src/Algorithms/BoostMatrix.h: In instantiation of ‘T prod_boost_vector(const boost::numeric::ublas::matrix<double>&, const T&) [with T = Vektor<double, 3>]’:
      /home/cr67/Software/OPAL/opal_src_3/src/Classic/Algorithms/CoordinateSystemTrafo.h:78:29:   required from here
      /home/cr67/Software/OPAL/opal_src_3/src/Algorithms/BoostMatrix.h:28:19: error: ‘const class Vektor<double, 3>’ has no member named ‘size’; did you mean ‘Size’?
         28 |     assert(vector.size() == 3);
            |            ~~~~~~~^~~~
      make[2]: *** [src/CMakeFiles/libOPALObj.dir/build.make:160: src/CMakeFiles/libOPALObj.dir/AbstractObjects/BeamSequence.cpp.o] Error 1
      make[1]: *** [CMakeFiles/Makefile2:2182: src/CMakeFiles/libOPALObj.dir/all] Error 2
      make: *** [Makefile:136: all] Error 2
  • snuverink_j approved this merge request

    approved this merge request

  • adelmann approved this merge request

    approved this merge request

    • Resolved by ext-calvo_p

      I don't see how anything can build at all, the compile error is correctly flagging a non-existent function that is called by BoostMatrix, namely Vektor::size. Anyway, I agree it is not related to this issue and it can be worked around by commenting the relevant assert statement.

      PyOpal tests are not run by default because it is still an experimental feature. I don't know how to make it all work because it depends on testing infrastructure that I do not have any sight of (like the nightly tests and things). It should be possible make some sort of C++ unit test that auto-runs the PyOpal tests, and even sees the relevant CMake compile flag, but I have not implemented that.

      Upon spending a morning digging, it looks like a terrible evil has befallen the PyOpal tests. Some horrible confusion of Ippl and MPI that I do not find straight forwards to untangle. Sigh.

      Anyway, in general the elements in src/PyOpal/PyElements wrap the OpalElement, so this should be correctly implemented by the changes here, I hope. However, there are direct calls to element::apply in order to directly access the field values (for user validation), and implemented as get_field_value on the python side, where unit conversions are necessary to maintain the correct user-side units.

  • I raised the build error as #789 (closed)

  • ext-calvo_p added 2 commits

    added 2 commits

    Compare with previous version

  • ext-calvo_p added 1 commit

    added 1 commit

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading