SixTrack / sixtracklib

Library for single charged particle simulations in accelerators
GNU Lesser General Public License v2.1
12 stars 16 forks source link

make testdata: pysixtrack.be_beambeam missing #93

Closed aoeftiger closed 5 years ago

aoeftiger commented 5 years ago

During renaming of the packages, make testdata lost track of pysixtrack.be_beambeam:

$ make testdata
[  3%] Built target sixtrack_test_common_output_c99
[  3%] Built target sixtrack_cuda_cxx_track
[  9%] Built target sixtrack_common_buffer
[ 25%] Built target sixtrack_common_control_cxx
[ 29%] Built target sixtrack_common_context
[ 32%] Built target sixtrack_common_internal_cxx
[ 32%] Built target sixtrack_common_internal
[ 35%] Built target sixtrack_common_be_beamfields
[ 35%] Built target sixtrack_common_be_monitor
[ 38%] Built target sixtrack_common_be_limit
[ 38%] Built target sixtrack_common_be_dipedge
[ 41%] Built target sixtrack_common_output
[ 45%] Built target sixtrack_common_particles_c99
[ 51%] Built target sixtrack_common_track_cxx
[ 54%] Built target sixtrack_opencl_c99
[ 58%] Built target sixtrack_opencl
[ 64%] Built target sixtrack_cuda_device
[ 67%] Built target sixtrack_cuda_host
[ 67%] Built target sixtrack_cuda_c99_control
[ 77%] Built target sixtrack_cuda_cxx_control
[ 77%] Built target sixtrack
[ 77%] Built target sixtrack_test_testdata
[ 80%] Built target sixtrack_test_common_c99
[ 87%] Built target sixtrack_test_common_belems_c99
[ 90%] Built target sixtrack_test_common_particle_cxx
[ 90%] Built target sixtrack_test_common_particle_c99
[ 90%] Built target sixtrack_test_common_track_cxx
[ 93%] Built target sixtrack_test_common_track_c99
[ 93%] Built target sixtrack_test
[ 93%] Built target generate_track_be_drift_data
[ 96%] Built target generate_track_be_driftexact_data
[100%] Built target generate_buffer_generic_obj
[100%] Generate testdata ... 
Traceback (most recent call last):
  File "/home/oeftiger/gsi/git/sixtracklib/tests/testdata/generators/generate_track_bbsimple_data.py", line 3, in <module>
    import test_data_generation
  File "/home/oeftiger/gsi/git/sixtracklib/tests/testdata/generators/test_data_generation.py", line 11, in <module>
    import pysixtrack
  File "/home/oeftiger/anaconda3/lib/python3.7/site-packages/pysixtrack/__init__.py", line 3, in <module>
    from .track import *
  File "/home/oeftiger/anaconda3/lib/python3.7/site-packages/pysixtrack/track.py", line 7, in <module>
    from .be_beambeam.gaussian_fields import get_Ex_Ey_Gx_Gy_gauss
ModuleNotFoundError: No module named 'pysixtrack.be_beambeam'
make[3]: *** [tests/testdata/generators/CMakeFiles/testdata.dir/build.make:65: tests/testdata/generators/{SIXTRACKLIB_TESTDATA_DIR}/testdata.generated] Error 1
make[2]: *** [CMakeFiles/Makefile2:3538: tests/testdata/generators/CMakeFiles/testdata.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:3545: tests/testdata/generators/CMakeFiles/testdata.dir/rule] Error 2
make: *** [Makefile:1150: testdata] Error 2
giadarol commented 5 years ago

This will be solved when pull request #94 is merged. In the meantime you can just skip make testdata

aoeftiger commented 5 years ago

true, sorry -- just found out. When I include PR #94 in its current status, I still get stuck with

Traceback (most recent call last):
  File "/home/oeftiger/gsi/git/sixtracklib/tests/testdata/generators/generate_track_bbsimple_data.py", line 6, in <module>
    test_data_generation.generate_testdata(pyst_example='bbsimple')
  File "/home/oeftiger/gsi/git/sixtracklib/tests/testdata/generators/test_data_generation.py", line 37, in generate_testdata
    st_line, rest, iconv = six.expand_struct(convert=pysixtrack.element_types)
AttributeError: module 'pysixtrack' has no attribute 'element_types'

--> will wait for this to be fixed.

Thanks :)

giadarol commented 5 years ago

I think your pysixtrack is old, at the moment the version compatible with sixtracklib lives in giadarol/pysixtrack/master

A consistent set at the moment is:

giadarol/pysixtrack/master sixtrack/sixtracklib/master rdemaria/cobjects/master rdemaria/sixtracktools/master

We will clean up all this in the coming 2 or 3 weeks

aoeftiger commented 5 years ago

I took pysixtrack from giadarol/pysixtrack (this is conform with PR #94 right?). This error message above refers to sixtracklib as is on sixtracklib/sixtrack asking pysixtrack for an attribute it doesn't have in giadarol/pysixtrack any more.

I'll just wait until both versions are up to date and compliant with each other on github.com/sixtracklib/.

giadarol commented 5 years ago

The central repository sixtrack/pysixtrack is now up to date