I installed WSL and installed Ubuntu 18.04 using the instructions here:
https://itsfoss.com/install-bash-on-windows/
The version of Ubuntu that is available in the Microsoft Store doesn't have a number of packages, so I had to do a little bit of extra work to get elegant to run.
I followed the instructions for installing Accelerator-Operations-Physics software here:
https://www.aps.anl.gov/Accelerator-Ope ... uide_Linux
0) I downloaded the RPM files that I wanted:
SDDSToolKit-4.2-1.ubuntu.18.04.x86_64.rpm
SDDSPython-4.0-1.ubuntu.18.04.x86_64.rpm
SDDSPython3-4.0-1.ubuntu.18.04.x86_64.rpm
elegant-2019.4.0-1.ubuntu.18.04.mpich.x86_64.rpm
1) I installed alien with the following commands:
- sudo add-apt-repository universe
- sudo apt-get install alien
- sudo apt install alien
2) In order to convert the RPM files, I had to move them to a new directory under ~ and run
- sudo chmod 755 <the new directory>
3) run the following command for each package
- sudo alien -i <RPM package name>
5) Edited ~/.bash_profile to have the following lines:
Code: Select all
# elegant and SDDS claim they need the following
export RPN_DEFNS=~/.defns.rpn
export HOST_ARCH=linux-x86_64
export EPICS_HOST_ARCH=linux-x86_64
# required to restore color to the terminal
source ~/.bashrc
Which I fix by installing the following package:elegant: error while loading shared libraries: libgsl.so.23: cannot open shared object file: No such file or directory
- sudo apt-get install libgsl-dev
Which I fix by installing the following package:elegant: error while loading shared libraries: liblapack.so.3: cannot open shared object file: No such file or directory
- sudo apt-get install libatlas3-base
That seems like it is working. At this point I try to run the example in examples/matching/betaMatching and get the following error:Running elegant at Tue Dec 24 13:55:46 2019
This is elegant 2019.4.0, Dec 10 2019, by M. Borland, J. Calvey, M. Carla', N. Carmignani, M. Ehrlichman, L. Emery, W. Guo, R. Lindberg, V. Sajaev, R. Soliday, Y.-P. Sun, C.-X. Wang, Y. Wang, Y. Wu, and A. Xiao.
usage: elegant {<inputfile>|-pipe=in} [-macro=<tag>=<value>,[...]] [-rpnDefns=<filename>] [-configuration=<filename>]
=====================================================================================
Thanks for using elegant. Please cite the following reference in your publications:
M. Borland, "elegant: A Flexible SDDS-Compliant Code for Accelerator Simulation,"
Advanced Photon Source LS-287, September 2000.
If you use a modified version, please indicate this in all publications.
=====================================================================================
Link date: Dec 10 2019 12:45:23, SVN revision: unknown
Which I fix by installing the following package:./one: 3: exec: tclsh: not found
- sudo apt-get install tclsh
Which I fix by installing the following package:sddsplot: error while loading shared libraries: libgd.so.3: cannot open shared object file: No such file or directory
- sudo apt-get install libgd3
If I install libxm4 using the same apt-get syntax I get a segmentation fault every time I call sddsplot. Any ideas?mpl_motif: error while loading shared libraries: libXm.so.4: cannot open shared object file: No such file or directory
I can run gdb with the following commands:
- gdb sddsplot
- (gdb) r -graphic=line,vary -column=s,beta? one.twi
When I use a debug program valgrind I run it with:Starting program: /usr/bin/sddsplot -graphic=line,vary -column=s,beta? one.twi
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Inferior 1 (process 1438) exited normally]
(gdb) Segmentation fault (core dumped)
- valgrind ./one
==1410== Memcheck, a memory error detector
==1410== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1410== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==1410== Command: ./one
==1410==
==1410== error calling PR_SET_PTRACER, vgdb might block
DESKTOP-77H8RRA:~/elegant/examples/matching/betaMatching$ Segmentation fault (core dumped)