Package: xboinc
XBOINCPython package for submitting track simulations in particle accelerators with BOINC systemINSTRUCTIONS FOR WINDOWS:How to install boinc client/manager on WindowsUse the installer at:https://boinc.berkeley.edu/download.phpCompile boinc api and examples from source on WindowsWe use MSys2, in particularMINGW64Follow the instruction athttps://www.msys2.orgto install MSYS2 and GCC:pacman -S mingw-w64-x86_64-gcc
pacman -Suy
pacman -Suy  # you need indeed twice!Install git and python packages:pacman -S git
pacman -Sy mingw-w64-x86_64-python-numpy
pacman -Sy mingw-w64-x86_64-python-scipy
pacman -Sy mingw-w64-x86_64-python-pandas
pacman -Sy mingw-w64-x86_64-python-pip
pacman -Sy mingw-w64-x86_64-python-wheel
pacman -Sy vimCompile BOINCpacman -S autotools
cd
git clone https://github.com/BOINC/boinc
cd boinc
export BOINC_DIR=$PWD
 
./_autosetup
 
./configure --disable-server --disable-client --disable-manager --disable-gui
# This one takes very long
 
make
# This also takes quite longGenerate xboinc source and input files on windowscd 
mkdir xsuite_packages
cd xsuite_packages
git clone https://github.com/xsuite/xobjects.git
git clone https://github.com/xsuite/xpart.git
git clone https://github.com/xsuite/xtrack.git
git clone https://github.com/xsuite/xfields.git
git clone https://github.com/xsuite/xboinc.git

pip install --no-deps --no-build-isolation -e xtrack
pip install --no-deps --no-build-isolation -e xobjects
pip install --no-deps --no-build-isolation -e xpart
pip install --no-deps --no-build-isolation -e xfields
pip install --no-deps --no-build-isolation -e xboincCompile and generate inputcdxboinc/examples/000_build_executable
python000_build_executable.py
bash001msys2_compile_executable.shcd../002_lhc
python001_build_input.pycd../003_boincecho$BOINC_DIR# Check if points into the BOINC source directorypython000_build_executable.py
makeRun/test the executablecp ../002_lhc/xboinc_input.bin .
chmod +x xboinc_executable
./xboinc_executableRunning the test application with boinc serverWe still work in MSYS2 (MINGW64)In order to have it working we needed to have the file structure in C:\PrgramData\Boinccd /c/ProgramData/BOINC # This in WINDOWS is hidden
cp ~/xsuite_packages/xboinc/examples/003_boinc/client_state_save.xml .thennano account_test.xmlwrite<account>
    <master_url>http://test.test</master_url>
    <project_name>test_project</project_name>
</account>thennano cc_config.xmlwrite<cc_config>
    <options>
        <skip_cpu_benchmarks/>
        <unsigned_apps_ok/>
    </options>
</cc_config>Then make folder structuremkdir projects/test.test
cp ~/xsuite_packages/xboinc/examples/002_lhc/xboinc_input.bin projects/test.test/input.bin
cp ~/xsuite_packages/xboinc/examples/003_boinc/xboinc_executable.exe projects/test.test/xboinc_executableIn one terminal:cp client_state_save.xml client_state.xml; ./../../Program\ Files/BOINC/boinc.exeIn another:/c/Program\ Files/BOINC/boincmgr.exeIn case of problems stop boing client in the status bar:You can suspend using the activity menu:You can see the checkpoints in:You can restart from the same menu.When the job is finished, the result are saved in "projects/test.test/output.bin"INSTRUCTIONS FOR UBUNTU:How to install boinc client/manager on Ubuntuhttps://boinc.berkeley.edu/wiki/Installing_BOINC_on_UbuntuBasically only:sudo apt-get install aptitude
sudo aptitude install boinc-client boinc-managerCompile boinc api and examples from source on UbuntuOn a fresh ubuntu installation I neede to:sudo apt install make
sudo apt install m4
sudo apt install pkg-config
sudo apt install autoconf
sudo apt install libtool
sudo apt install g++cd
git clone https://github.com/BOINC/boinc
cd boinc
export BOINC_DIR=$PWD
./_autosetupFromhttps://boinc.berkeley.edu/trac/wiki/BuildSystem"If you're developing or porting a BOINC application, you need only the API: "./configure --disable-server --disable-client --disable-manager --disable-gui
# This one takes very longand thenmake
# This also takes quite longInstalling xsuite packagescd
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
source miniconda3/bin/activate
pip install numpy scipy matplotlib pandas ipython pytest
mkdir xsuite_packages
cd xsuite_packages

git clone https://github.com/xsuite/xobjects
git clone https://github.com/xsuite/xdeps
git clone https://github.com/xsuite/xpart
git clone https://github.com/xsuite/xtrack
git clone https://github.com/xsuite/xfields
git clone https://github.com/xsuite/xboinc

pip install -e xobjects
pip install -e xdeps
pip install -e xpart
pip install -e xtrack
pip install -e xfields
pip install -e xboincCompile and generate inputcdxboinc/examples/000_build_executable
python000_build_executable.py
bash001msys2_compile_executable.shcd../002_lhc
python001_build_input.pycd../003_boincecho$BOINC_DIR# Check if points into the BOINC source directorypython000_build_executable.py
makeRun/test the executablecp ../002_lhc/xboinc_input.bin .
chmod +x xboinc_executable
./xboinc_executableRunning the test application with boinc servercd
mkdir xboinc_test
cp ~/xsuite_packages/xboinc/examples/003_boinc/client_state_save.xml .thenvim account_test.xmlwrite<account>
    <master_url>http://test.test</master_url>
    <project_name>test_project</project_name>
</account>thenvim cc_config.xmlwrite<cc_config>
    <options>
        <skip_cpu_benchmarks/>
        <unsigned_apps_ok/>
    </options>
</cc_config>Add the same GUI RPC passwords invim gui_rpc_auth.cfgand invim /etc/boinc-client/gui_rpc_auth.cfgThen make folder structuremkdir projects/test.test
cp ~/xsuite_packages/xboinc/examples/002_lhc/xboinc_input.bin projects/test.test/input.bin
cp ~/xsuite_packages/xboinc/examples/003_boinc/xboinc_executable.exe projects/test.test/xboinc_executableIn one terminal:cp client_state_save.xml client_state.xml; boinc --gui_rpc_port 31417In another:boincmgr --gui_rpc_port 31417!! Before running BOINC client or manager, kill the previous BOINC sessionsudo /etc/init.d/boinc-client stop