Using 102 Cuda 11.2 (GPU) with gcc11

I am attempting to test the GPU acceleration provided by xtrack, and so I wish to use SWAN with some simple notebooks to model the SPS.

Running on swan006, using the 102 software stack with gcc11, the code works perfectly. The code also works on NXCALS Testbed.

However, running the code on any other software stack causes an error with accessing dataframes:

from cpymad.madx import Madx
madx = Madx()
# Directory for
OPTICSDIR = 'path/to/acc-models-sps'"{OPTICSDIR}/sps.seq")"{OPTICSDIR}/strengths/ft_q26_extr.str")"{OPTICSDIR}/beams/beam_fixedtarget_extraction.madx")
# Calculate twiss parameters without thinning
twiss_thick = madx.twiss().dframe(index='name')
     11     madx.use(sequence='sps')
     12     # Calculate twiss parameters without thinning
---> 14     twiss_thick = madx.twiss().dframe(index='name')

TypeError: dframe() got an unexpected keyword argument 'index'

I believe this error is a result of using gcc8 instead of gcc11, as when I only change that option using software stack 102, the issue presents its self. However, the gcc11 compiler is not available on any GPU-enabled software stack

Is there any way that gcc11 could be made available for GPU stacks, such as 102 Cuda?


As per the error you reported:

TypeError: dframe() got an unexpected keyword argument 'index'

it looks like it might not be related to the compiler version, but rather to a change in the API of cpymad?

I have just tried to run import cpymad with LCG 102 (no cuda) and the module can’t be found. With LCG 102 CUDA, cpymad is found and has version 1.6.3. Can you confirm that you were able to execute the code snippet above with LCG 102?