Quick Installation Guide for Ubuntu 16.04 LTS, 18.04 LTS and 20.04 LTS#

Author:

Yasuhiro Inamura

Last upadte:

Jan. 13th, 2021

Utsusemi version:

4.0

Outline#

Utsusemi software is developed on the Linux OS and the basic functions of Utsusemi are written in C++ with the Manyo-Library framework to be optimized on the use in Python3 environment. The compile of C++ codes in Manyo-Library require several external shared libraries. In addition, GUI software in Utsusemi, including visualizations, also utilize many python packages, for example Qt for python (PySide2) and matplotlib. It’s not easy task, therefore, to install Utsusemi software with such many libraries.

To install Utsusemi quickly, we’ve made an install script of Utsusemi into Ubuntu Linux including C++ compiling and install other external libraries.

We choose Ubuntu Linux for quick installation of Utsusemi because Ubuntu is one of distributions used widely in the world and has enough binary packages required for Utsusemi installation.

In this document, we show the install sequence of Utsusemi using this script.

Available BL

Notifications

BL01(SIK)

BL02(DNA)

Not included QENSfit

BL14(AMR)

BL11(HPN)

Not included Teuse

BL15(SAS)

Not included Dview

Notes#

Utsusemi installation script is available on Ubuntu 16.04 LTS, 18.04 LTS and 20.04 LTS .

In this document, we don’t touch how to install Linux system into PC and how to execute shell commands in detail.

Linux PC must be connected to the internet because of installing packages required from Utsusemi.

Installation script and packages#

The installation script and packages can be downloaded from the Utsusemi portal site ( https://mlfinfo.jp/groups/comp/en/utsusemi.html ), which is compressed with tar and gzip, named like below,

File name exsample

Utsusemi4_4.0_210113_Ubuntu_1604_2004LTS.tar.gz

, where characters 4.0 means the release number which is increased with the large version up, 210104 means the latest update date and is independent of the release number.

Installation#

This section shows the Utsusemi installation step by step. In these steps, we describe on the assumption that downloaded package file (Utsusemi4_4.0_210113_Ubuntu_1604_2004LTS.tar.gz) is placed at home folder.

1. Confirmation to connect the internet#

Check Linux PC is connected with the internet, for example, by browsing with web browser.

2. Expanding the downloaded file#

$ tar xzvf Utsusemi4_4.0_210113_Ubuntu_1604_2004LTS.tar.gz

…(Logs)

As results, new directory appears on working directory, with name of Utsusemi4_4.0_210113_Ubuntu_1604_2004LTS .

Check it like below.

$ ls -F
Utsusemi4_4.0_210113_Ubuntu_1604_2004LTS/ Utsusemi4_4.0_210113_Ubuntu_1604_2004LTS.tar.gz

The directory Utsusemi4_4.0_210113_Ubuntu_1604_2004LTS includes files and folders like below.

$ ls –F Utsusemi4_4.0_210113_Ubuntu_1604_2004LTS/

Install.py src/

3. Execute installation script#

Change directory to uncompressed folder.

$ cd Utsusemi4_4.0_210113_Ubuntu_1604_2004LTS

Execute the install script, named Install.py, with python3 .

$ python3 Install.py

And then the script shows the main menu below.

$ python3 Install.py

=================================================================
     Welcome to Utsusemi software installer (ver.C0.3.8)
=================================================================

----------------------------------------------------------
 Install Directories
    MLF software root (Manyo, Utsusemi): /opt/mlfsoft
    User's home directory : /home/yinamura
    RAW data Directory : /data
----------------------------------------------------------


-----------------------------------------------------------------
       Utsusemi Install Main Menu for Debian or Ubuntu
-----------------------------------------------------------------

  0... Install ALL modules for an instrument

           note: this will DELETE all of modules installed before.

  ----------------------------------------------------
  1... Required Ubuntu Packages
  2... Utsusemi software (Manyo-lib and common code)
  3... Utsusemi software for each BL

  7... Change Install Directories

  9... Uninstall

others.. exit
-----------------------------------------------------------------
>> Which ?

Here, choose the menu number you want to do.

At beginning of menu description, the directory path to be installed is shown ( default is /opt/mlfsoft ) and can be changed by select menu number 7. If you want to install Utsusemi into users home directory, choose the menu number 7 ( shown in section below).

Table 1 : menu number and works

number

works

All installation steps automatically which is same as doing menu number 1, 2 and 3 for all beam lines.

Installation of Ubuntu packages required by Utsusemi installation automatically. The internet connection is needed to do this menu number.

Compile and installation of C++ codes for Manyo Lib and Utsusemi functions. This takes a time to compile c++ codes.

Installation of some specialized codes in each beam line environment. This menu requires a choice of beam line to be installed.

Change of directory path to install into. ( Refer to section 2-6 )

Remove installed Manyo and Utsusemi codes.

As example, we show case of menu number 0 to install whole Utsusemi environment.

At first, you input 0,

>> Which ? 0 [return]

and then, you are required to input the number of threads which means multi-threading works of Manyo Lib. Normaly you input the number of CPUs in your PC.

Please input the number of threads, which is required to use
Manyo-lib with multi-threads.

>> How many threads? [>=1, default=1]

After these answers, the script starts to install packages and compile codes. Because this task needs a administrator privilege, you are required to input your password like below.

[sudo] password for hoge:

On installation, the script shows logs on terminal.

If any error does not happen, this step finished in several minutes. At last, the script shows messages below,

-----------------------------------------------
  Install of
       - manyo-core
       - manyo-utsusemi
       - python-utsusemi
       - python-utsusemi-SIK
       - python-utsusemi-AMR
       - python-utsusemi-HPN
       - python-utsusemi-SAS
       - manyo-SAS
       - manyo-TKtools
       - python-utsusemi-TKtools
                               were completed.
-----------------------------------------------


-------------------------------------------------------
  Utsusemi Base Environment Setting has been completed.
-------------------------------------------------------

----------------------------------------------------------
  Utsusemi Environment Setting for SIK has been completed.
----------------------------------------------------------

----------------------------------------------------------
  Utsusemi Environment Setting for AMR has been completed.
----------------------------------------------------------

----------------------------------------------------------
  Utsusemi Environment Setting for HPN has been completed.
----------------------------------------------------------

----------------------------------------------------------
  Utsusemi Environment Setting for SAS has been completed.
----------------------------------------------------------

----------------------------------------------------------
  Utsusemi Environment Setting for TKtools has been completed.
----------------------------------------------------------

Utsusemi Default Install was completed.
>> Back to Main Menu? [Y/n]

If you finish the installation, input “n”. Or back to the main menu by input of “Y” or only return.

Case of menu number 2#

In this case, the script does the compile and installation of C++ codes for Manyo Lib and Utsusemi.

Just after this choice, you are required to input the number of threads which means multi-threading works of Manyo Lib. Normally you input the number of CPUs in your PC.

Please input the number of threads, which is required to use
Manyo-lib with multi-threads.

>> How many threads? [>=1, default=1]

After this answer, the script starts to do compile and installation codes. Because this work needs a root privilege, you are required to input password like below.

[sudo] password for hoge:

Case of menu number 3#

In this case, the script starts the installation of codes and setting suitable for each beam line environment.

Just after this choice, the script asks you to confirm whether you do the menu number 2 or not.

>> Have you installed ManyoLib and Utsusemi Base system ( menu number 2 ) [y/N]?

Next, you choose the beam line to install environment.

---------------------------------
  Select Beam Lines you install
---------------------------------
 [ 1] BL01 4SEASONS (SIK)
 [ 2] BL02 DNA (DNA)
 [14] BL14 AMATERAS (AMR)
 [11] BL11 PLANET (HPN)
 [15] BL15 Taikan (SAS)
 [TK] TKtools
 [-1] Exit menu
---------------------------------

>> Which Package?

4 Setting of Utsusemi environment#

After doing step 1 to 3, Utsusemi software and environment setting have been installed. Environment setting of Utsusemi is described in the bash setting file, ${HOME}/.bashrc ( ~/.bashrc ). To be in Utsusemi environment, execute command like,

$ source ~/.bashrc

or open new terminal application.

In Utsusemi environment, some keywords to change beam line environment can be used.

Beamline

Keyword

4SEASONS(BL01)

SIK

DNA(BL02)

DNA

AMATERAS(BL14)

AMR

TAIKAN(BL15)

SAS

For example, if you want to be in 4SEASONS environment, type SIK like below.

$ SIK
===========================================
 Welcome to Utsusemi Environment for SIK
                             ver 4.0.0
===========================================
 Ana   : Sequencer
 D4mat : D4MatSlicer
 D4mat2: D4Mat2Slicer
===========================================
$

You see that you are in 4SEASONS (SIK) environment by these messages.

Uninstall#

To uninstall, choose 9 from main menu of the script.

9..... Uninstall

In this case, the script removes compiled library and python codes.

Installation directory#

Default path on Utsusemi environment#

Several directory paths are required for Utsusemi environment.

Type

Default path

Notes

MLF (Utsusemi) software directory

/opt/mlfsoft/

Manyo-lib and C++ codes for Utsusemi are installed in here

RAW data directory

/data

The directory to place raw data folders for beam lines. Utsusemi searches these folders for raw data by given run number to do data reductions. Usually, the folder is named for each instrument code as below and placed in this directory.

SIK/

AMR/

Users’ home directory

/home/<username>

( ${HOME} or ~/ )

This is used to store temporal files made in data reduction. In this directory,

ana/

exp/

are placed in.

There is possibility that these paths conflict with other environments on Linux PC because MLF software is placed at common directory /opt/mlfsoft . When such a conflict happens, the script can install Utsusemi environment into other paths given by a user, for example under the users’ home folders. This change of paths is enabled by choice of 7 on main menu.

Install into users’ home directory#

By the choice of 7 at main menu, you can change the path to install Utsusemi, which is usually used to install into user’s home directory.

------------------------------------------------
Install Directories Menu
----------------
1..... Change Directories to private area
2..... Return Directories to MLF default
3..... Load Previous Install Directories
4..... Show Present Setting

0..... Exit
>> Which?

If you choose number 1 of this menu, additional menu comes like below.

============================================================
                 Set your install paths
============================================================
 1. Path to install Utsusemi software
   --> /home/yinamura/mlfsoft

 2. Path to Event data directory
   --> /home/yinamura/mlfsoft/RAWDATA

3. Path to user directory (for ana/xml or exp/xml)
   --> /home/yinamura
============================================================

>> Which do you change ? [1 to 3. 0 to exit]

The default install paths for private are given as below.

Path

MLF (Utsusemi) software directory

${HOME}/mlfsoft

RAW data directory

${HOME}/mlfsoft/RAWDATA

Users’ home directory

${HOME}

On installing into home directory, the uninstall is easy to remove the directory ${HOME}/mlfsoft.

After giving new paths and back to main menu, the description of “Install Directories” at upper part of main menu are replaced by the given paths.

----------------------------------------------------------
 Install Directories
    MLF software root (Manyo, Utsusemi): /home/yinamura/mlfsoft
    User's home directory : /home/yinamura
    RAW data Directory : /home/yinamura/mlfsoft/RAWDATA
----------------------------------------------------------

Confirmation of Utsusemi version#

Type commands like below to know the Utsusemi version after “Setting of Utsusemi environment” described in previous section.

$ python3
>>> import utsusemi
>>> utsusemi.__version__
'4.0.0'
>>>
>>> import UtsusemiInfo
---------------------------------------------
               Utsusemi Info
---------------------------------------------
         version : 4.0 (rev 210113)
  Contact person : Yasuhiro Inamura
      e-mail : yasuhiro.inamura@j-parc.jp
---------------------------------------------

Manyo>>>

The release number and revision number are shown by this command import UtsusemiInfo .

On your sending some bug reports and requirements for Utsusemi, please tell me these numbers too.