Recent Changes · Search:

Dispense


µSR

Chapters:

  1. Introduction
  2. The muon
  3. Muon production
  4. Spin polarization
  5. Detect the µ spin
  6. Implantation
  7. Paramagnetic species
  8. A special case: a muon with few nuclei
  9. Magnetic materials
  10. Relaxation functions
  11. Superconductors
  12. Mujpy
  13. Mulab
  14. Musite?
  15. More details

Tips

PmWiki

pmwiki.org

edit SideBar

Musrfit

< PyMinuit, how to install and use it | Index | Notes on musrfit usage >


Installing on

  • xps uBUNTU 24.04 preliminary
# git already installed
apt-get install cmake libboost-dev libboost-filesystem-dev libboost-system-dev libgsl-dev libxpm-dev libxext-dev libfftw3-dev libxml2-dev qt6-base-dev libxft-dev qt6-svg-dev libhdf4-dev libhdf5-dev
# better make nexus
cd ~/git
# create a directory for the NeXus source code
mkdir nexus
cd nexus
# get the source code from the master repository
git clone https://github.com/nexusformat/code.git
# next we will build NeXus out-of-source
mkdir build
cd build
# additional packages needed & not mentioned in instructions
# make root from source
git clone http://github.com/root-project/root.git  # git pull to update
mkdir build
cd build 
cmake ../ -Dgminimal=1 -Dasimage=1 -Dmathmore=1 -Dxml=1 # actually done only cmake -Dmathmore=ON -DCMAKE_INSTALL_PREFIX=/usr/local ..
cmake --build . --target install --j16
sudo make install
cd ../../musrfit
mkdir build 

sudo apt-get install pkg-config
# need root from source (/snap misses MathMore)
# cmake command
cmake ../-Dnexus=1 -Dmathmore=ON 
# according to instructions it should be 
sudo cmake --install ./
cmake ../ -Dnexus=1
make
sudo make install
export ROOTSYS=/usr/local
export MUSRFITPATH=/usr/local/bin/
  1. sudo apt purge cmake, download binary from sudo cp -r man /usr/share/ and export to /tmp
  2. move to /tmp/cmake... directory and sudo cp -r bin /usr/, sudo cp -r share /usr/, sudo cp -r doc /usr/share/, sudo cp -r man /usr/share/

cd ~/git
git clone https://gitlab.psi.ch/nemu/musrfit.git
mkdir build
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=$ROOTSYS
cmake --build ./ --clean-first -- -j4
sudo make install
sudo /sbin/ldconfig
-----------
In order not to repeat trivial mistakes! Repeated in 2017 with Ubuntu 14.04 and Root 6

From 14.04

check dependencies in https://root.cern.ch/build-prerequisites#ubuntu by running

dpkg -l | grep xxx # with xxx each of the dependency packages listed for ubuntu
sudo apt-get install xxx# for those that give a blank reply line

14.04 has only a 2.8 cmake, too old (if not needed in latest LTS, skip to get the root source), otherwise
install most recent Cmake: as root in /usr/local type

git clone https://github.com/Kitware/CMake.git
./configure
make
make install
update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force # to force upgrading from ubuntu default
cmake --version# to check

get the root source: as root in /usr/local (presently in /usr/local/gitroot)

git clone http://root.cern.ch/git/root.git

follow https://root.cern.ch/building-root#quick-start

mkdir /usr/local/root
cmake /usr/local/root

now edit /usr/local/root/CMakeCache.txt and set minuit2:BOOL=ON, qt:BOOL=ON xml:BOOL=ON (VERY IMPORTANT, they are OFF by default)

cmake --build .
root # to try it out (.q to quit!)
cmake --build . --target install

Install musrfit: as root, from /usr/local

git clone https://bitbucket.org/muonspin/musrfit.git# creates a musrfit directory in /usr/local

check dependencies (see above under cmake)
check that you have autogen, otherwise

apt-get install autogen

then cd /usr/local/musrfit/
sh autogen.sh
./configure

check that /usr/local/lib is in echo $LD_LIBRARY_PATH, otherwise\\

export LD_LIBRARY_PATH=/usr/local/lib

make
make istall
/sbin/ldconfig

as normal user set environment variables, adding to the bottom of ~/.bashrc
export MUSRFITPATH=/usr/local/bin
and finally copying a file musrfit_startup.xml to /usr/local/bin/

old 10.04 instructions

  apt-get install libboost-dev gsl-bin libgsl0-dev fftw3 fftw3-dev libxml2 libxml2-dev libqt3-mt libqt3-mt-dev qt4-dev-tools

download latest root tarball and install in /usr/local/root Present installation is non standard, done from a sudo -i command line (as root) Should have been done with

 sudo ./configure --enable-minuit2 --enable-mathmore --enable-xml --prefix=/usr/local
 sudo make
 sudo make install

If I try that now it tells me

 ROOTSYS not set, set it to a destination directory
 make: *** [install] Error 1

even if echo $ROOTSYS (as well as sudo echo $ROOTSYS replies /usr/local/root Should be OK though, since invoking root from a user terminal works (and new TBrowser(); too, .q to quit)

now download [[http://savannah.psi.ch/viewcvs/trunk/analysis/musrfit.tar.gz?root=nemu%2Flem&view=tar| musrfit.tar.gz] and unpack it

 sudo sh autogen.sh
 sudo ./configure --enable-BMWlibs --with-rootsys=/usr/local/root

I did not try nexus, which is installed by synaptic, because it complains that it does not find hdf4 and I do not wish to loose time on that now. (Nexus is alien converted)

 sudo make
 sudo make install 

< PyMinuit, how to install and use it | Index | Notes on musrfit usage >

Edit - History - Print - PDF - Recent Changes - Search
Page last modified on October 29, 2024, at 10:54 AM