cli version not finding my_elements lib
Posted: Mon 16 May 2022 08:29
Hi,
I struggle with another minor issue with using own elements. I compile my_elements.so and put it in the same folder as the project and structure file. When I run it in the graphical version this works fine. When I try to run in command line version, I get an error that it cannot find the library:
A workaround I found is to put the full path to the executable (see below). The same does not work if I put the full path to the project file
This is on CentOS Linux, using latest version 2.18.0.7.
I struggle with another minor issue with using own elements. I compile my_elements.so and put it in the same folder as the project and structure file. When I run it in the graphical version this works fine. When I try to run in command line version, I get an error that it cannot find the library:
Code: Select all
% ls
calc lattice.dat my_elements.so project.ini toutatis.key tracelx64 TraceWin tracewin.key TraceWin_noX11
% ./TraceWin_noX11 project.ini hide_esc
Data Reading...
Reference particle transports in Elements: 1
[my_elements.so]
my_elements.so: cannot open shared object file: No such file or directory
( Has to be located either in TraceWin executable path
or in structure file (*.dat) path
or in project file (*.ini) path )
From->[ELEMENTS] : My element envelope:Element :1
From->[Calc] : Ref particle transport
% ./tracelx64 project.ini hide_esc
Data Reading...
Reference particle transports in Elements: 1
Error : [my_elements.so]
my_elements.so: cannot open shared object file: No such file or directory
( Has to be located either in TraceWin executable path
or in structure file (*.dat) path
or in project file (*.ini) path )
From->[ELEMENTS] : My element envelope:Element :1
From->[Calc] : Ref particle transport
Code: Select all
% `pwd`/TraceWin_noX11 project.ini hide_esc
Data Reading...
Reference particle transports in Elements: 1
/<dirpath>/lattice.dat
Reference particle transports in Elements: 2
Reference particle transports in Elements: 3
Reference particle transports in Elements: 4
Reference particle transports in Elements: 5
Reference particle transports in Elements: 6
Reference particle transports in Elements: 7
Reference particle transports in Elements: 8
Reference particle transports in Elements: 9
Reference particle transports in Elements: 10
Reference particle transports in Elements: 11
Reference particle transports in Elements: 12
Reference particle transports in Elements: 13
Reference particle transports in Elements: 14
Reference particle transports in Elements: 15
Reference particle transports in Elements: 16
Total Line : 16 Elements
Calculation of line envelope
/<dirpath>/lattice.dat
Calculation of line envelope : finished
Number of step : 94
Memory used : 5 kBytes
New Data file writting :
/<dirpath>/calc/lattice.dat
Multiparticle calculation with PARTRAN
Element :1 [0.00000 m] Ngood :20000
Element :2 [0.07549 m] Ngood :20000
Element :3 [0.24049 m] Ngood :20000
Element :4 [0.24049 m] Ngood :20000
Element :5 [0.24049 m] Ngood :20000
Element :6 [0.40549 m] Ngood :20000
Element :7 [0.43549 m] Ngood :20000
Element :8 [0.60049 m] Ngood :20000
Element :9 [0.60049 m] Ngood :20000
Element :10 [0.60049 m] Ngood :20000
Element :11 [0.76549 m] Ngood :20000
Element :12 [1.02549 m] Ngood :20000
Element :13 [1.19049 m] Ngood :20000
Element :14 [1.19049 m] Ngood :20000
Element :15 [1.19049 m] Ngood :20000
Element :16 [1.35549 m] Ngood :20000
Calculation finished
% ./TraceWin_noX11 `pwd`/project.ini hide_esc
Data Reading...
Reference particle transports in Elements: 1
[my_elements.so]
my_elements.so: cannot open shared object file: No such file or directory
( Has to be located either in TraceWin executable path
or in structure file (*.dat) path
or in project file (*.ini) path )
From->[ELEMENTS] : My element envelope:Element :1
From->[Calc] : Ref particle transport