BNMR: Experimental Setup: Difference between revisions
m (Bsmith moved page DaqWiki:BNMR: Experimental Setup to BNMR: Experimental Setup without leaving a redirect) |
No edit summary |
||
Line 1: | Line 1: | ||
{{Pagelinks}} | {{Pagelinks}} | ||
== Introduction == | == Introduction == | ||
Line 16: | Line 9: | ||
== NIS ISAC Cluster == | == NIS ISAC Cluster == | ||
Both these desktops run NIS and are part of the ISAC cluster. The "master" computer is '''''isdaq00''''' (located in the Computing Services server room). ''isdaq00'' is the main file server and hosts the home directories for the cluster. The VMIC | Both these desktops run NIS and are part of the ISAC cluster. The "master" computer is '''''isdaq00''''' (located in the Computing Services server room). ''isdaq00'' is the main file server and hosts the home directories for the cluster. The VMIC CPUs (''lxbnqr,lxbnmr'') and the CAMP VxWorks CPUs (''bnmrvw,polvw'') also mount home directories served by isdaq00. These machines (isdaq00, isdaq01, isdaq06) are on UPS. | ||
;Note :Unless '''''isdaq00''''' is up and running, and the '''network''' is working, it will be impossible to run the experiments. | ;Note :Unless '''''isdaq00''''' is up and running, and the '''network''' is working, it will be impossible to run the experiments. | ||
== Experimental setup == | == Experimental setup == | ||
Two accounts with usernames | Two accounts with usernames <code>bnmr</code> and <code>bnqr</code> have been set up to run the {{bnmqr|join=and}} experiments. These accounts run the <code>bash</code> shell, and the files /home/[[BNMR#Nomenclature|<beamline>]]/.bashrc contain the required setup for the experiments (see [[#File .bahrc]]). The ~/.login file (executed when logging in interactively) contains required EPICS fonts (see [[#File .login]]). Users may add more definitions to these files, but should not change any of the DAQ definitions or their experiments may fail to run properly. | ||
== Physica == | == Physica == | ||
Scripts to run physica are in directory /home/[[BNMR#Nomenclature|<beamline>]]/bin This directory also contains links to run {{File|name=bnmrfit, campvarlog}} and {{File|name=lcrplot}}. This directory is included in the PATH (hence no alias is defined). A '''local copy''' of the physica package is used (NOT the one in /triumfcs/linux/physica , which does not work for SL6). | Scripts to run physica are in directory /home/[[BNMR#Nomenclature|<beamline>]]/bin This directory also contains links to run {{File|name=bnmrfit, campvarlog}} and {{File|name=lcrplot}}. This directory is included in the PATH (hence no alias is defined). A '''local copy''' of the physica package is used (NOT the one in /triumfcs/linux/physica , which does not work for SL6). | ||
Environment variables required for physica defined in . | Environment variables required for physica defined in .bashrc are shown in Table 3 below. | ||
== Environment Variables == | == Environment Variables == | ||
There are a number of important Environment variables that must be correctly defined for the DAQ to run successfully. These | There are a number of important Environment variables that must be correctly defined for the DAQ to run successfully. These | ||
are defined in [[#File . | are defined in [[#File .bashrc|.bashrc]]. This file is executed at login. | ||
Some of the environment variables needed for data | Some of the environment variables needed for data acquisition are: | ||
* DAQ setup (Table 1) | * DAQ setup (Table 1) | ||
* MIDAS setup (Table 2) | * MIDAS setup (Table 2) | ||
Line 85: | Line 76: | ||
|- style="text-align:center; background-color:silver" | |- style="text-align:center; background-color:silver" | ||
! Name !!Purpose !!Value | ! Name !!Purpose !!Value | ||
|- | |- style="background-color:whitesmoke" | ||
| EPICS_BASE || path of EPICS package || /home/midas/packages/epics-base | | EPICS_BASE || path of EPICS package || /home/midas/packages/epics-base | ||
|- | |- | ||
| EPICS_HOST_ARCH|| host architecture || linux-x86_64 | | EPICS_HOST_ARCH|| host architecture || linux-x86_64 | ||
|- style="background-color:whitesmoke" | |- style="background-color:whitesmoke" | ||
| EPICS_PATH || path of EPICS utilities || /home/midas/packages/epics-base/bin/linux-x86_64 | | EPICS_PATH || path of EPICS utilities || /home/midas/packages/epics-base/bin/linux-x86_64 | ||
Line 129: | Line 118: | ||
== Aliases == | == Aliases == | ||
A number of useful aliases that run various scripts or start programs are defined in [[#File . | A number of useful aliases that run various scripts or start programs are defined in [[#File .bashrc|.bashrc]], e.g. | ||
* [[BNMR: Scripts#start-all|start-all]] runs a script to start missing MIDAS clients | * [[BNMR: Scripts#start-all|start-all]] runs a script to start missing MIDAS clients | ||
* [[BNMR: Scripts#kill-all|kill-all]] runs a script to kill all MIDAS clients | * [[BNMR: Scripts#kill-all|kill-all]] runs a script to kill all MIDAS clients | ||
* [[BNMR: Scripts#show-windows|show-windows]] runs a script to show the client windows for clients frontend, mdarc and mheader | * [[BNMR: Scripts#show-windows|show-windows]] runs a script to show the client windows for clients frontend, mdarc and mheader | ||
* [[BNMR: CAMP#CAMP User Interface|camp]] runs the CAMP user interface | * [[BNMR: CAMP#CAMP User Interface|camp]] runs the CAMP user interface | ||
== File . | == File .bashrc == | ||
The parts of the ~/. | The parts of the ~/.bashrc file relevent to DAQ is shown below: | ||
<pre> | <pre> | ||
# | # .bashrc | ||
# | # User specific aliases and functions | ||
# | # Source global definitions | ||
if | if [ -f /etc/bashrc ]; then | ||
. /etc/bashrc | |||
fi | |||
export PS1='(bash) [\u@\h \W]\$ ' | |||
alias tnt2k1='rdesktop -f tnt2k.triumf.ca' | |||
alias mycommd='sh cmds' | |||
alias phys='/home/bnmr/packages/physica/physica &' | |||
#Passwordless access for bnmrpc | |||
alias gobnmrpc='vncviewer bnmrpc -passwd ~/.vnc/passwd' | |||
unset SHELL | |||
export HOST=`hostname` | |||
export MIDAS_EXPT_NAME=bnmr | |||
export MIDAS_EXPTAB=/home/bnmr/online/exptab | |||
export DAQ_HOST=isdaq01 | |||
export VMIC_HOST=lxbnmr | |||
export MIDASSYS=$HOME/cycling_dev/packages/midas_oct2020 | |||
export EPICS_BASE=/home/midas/packages/epics-base | |||
export MUSR_DIR=/home/musrdaq/musr | |||
# | # For python3 | ||
export PATH=$PATH:$HOME/.local/bin | |||
export PYTHONPATH=$PYTHONPATH:~/cycling_dev/packages/benmr | |||
alias autoruns=/home/bnmr/cycling_dev/packages/mui/autoruns.tcl | |||
alias campvarlog=/home/bnmr/cycling_dev/packages/mui/bnmr_logger.tcl | |||
alias | alias muddiff="python3.6 ~/cycling_dev/packages/benmr/bnxr_common/tests/diff_mud_files.py" | ||
alias muddump="python3.6 ~/cycling_dev/packages/benmr/bnxr_common/tests/dump_mud_file.py" | |||
triumf=".triumf.ca" | |||
export daq_host=$DAQ_HOST$triumf | |||
export vmic_host=$VMIC_HOST$triumf | |||
unset MIDAS_LINUX | |||
if [ $HOST == $VMIC_HOST ] || [ $HOST == $vmic_host ]; then | |||
# lxbnmr - talk to isdaq01 through mserver | |||
#export MIDAS_SERVER_HOST=$DAQ_HOST":7072" | |||
export MIDAS_SERVER_HOST=$DAQ_HOST":1195" | |||
export PATH=$MIDASSYS/linux-m32/bin:/triumfcs/linux/bin:/home/bnmr/cycling_dev/packages/benmr/bin:$PATH | |||
export EPICS_HOST_ARCH=linux-x86 | |||
export CAMP_DIR=$MUSR_DIR/camp/linux-m32 | |||
export EPICS_CA_AUTO_ADDR_LIST=YES | |||
export EPICS_CA_ADDR_LIST=142.90.133.255 | |||
export EPICS_CA_REPEATER_PORT=9003 | |||
export EPICS_CA_SERVER_PORT=9004 | |||
export EPICS_CA_AUTO_LIST=NO | |||
export EPICS_CA_ADDR_PORT=142.90.130.27 | |||
# export EPICS_CA_AUTO_ADDR_LIST=NO | |||
# export EPICS_CA_ADDR_LIST=142.90.132.202 | |||
# export EPICS_CA_REPEATER_PORT=9093 | |||
# export EPICS_CA_SERVER_PORT=9094 | |||
fi | |||
if [ $HOST == $DAQ_HOST ] || [ $HOST == $daq_host ]; then | |||
# isdaq01 - main host | |||
source scl_source enable devtoolset-8 | |||
source scl_source enable rh-python36 | |||
export PYTHONPATH=$MIDASSYS/python:$DAQ_DIR:$PYTHONPATH | |||
export PATH=$MIDASSYS/bin:/home/bnmr/cycling_dev/packages/midas_tcl:/home/bnmr/cycling_dev/packages/benmr/bin:/home/bnmr/cycling_dev/packages/lcrp64:$PATH | |||
unset MIDAS_SERVER_HOST | |||
export EPICS_HOST_ARCH=linux-x86_64 | |||
export CAMP_DIR=$MUSR_DIR/camp/linux | |||
export EPICS_CA_AUTO_ADDR_LIST=NO | |||
export EPICS_CA_ADDR_LIST=142.90.132.202 | |||
export EPICS_CA_REPEATER_PORT=9093 | |||
export EPICS_CA_SERVER_PORT=9094 | |||
fi | |||
export EPICS_PATH=$EPICS_BASE/bin/$EPICS_HOST_ARCH | |||
export LD_LIBRARY_PATH=${EPICS_BASE}/lib/$EPICS_HOST_ARCH | |||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/musrdaq/lib | |||
export PATH=${PATH}:${EPICS_PATH}:${CAMP_DIR}:${HOME}/bin | |||
export CAMP_HELP=$CAMP_DIR | |||
export CAMP_HOST=bnmrvw.triumf.ca | |||
alias camp_cmd=$CAMP_DIR/camp_cmd | |||
alias camp=$CAMP_DIR/camp_cui | |||
alias | |||
alias | alias python3='python3.6' | ||
alias pip='pip3.6' | |||
alias bfit='python3.6 -m bfit' | |||
alias bccd='python3.6 -m bccd' | |||
export BNMR_ARCHIVE=/isdaq/data1/bnmr/dlog/ | |||
export BNQR_ARCHIVE=/isdaq/data1/bnqr/dlog/ | |||
</pre> | </pre> | ||
== File .login == | == File .login == |
Latest revision as of 13:14, 27 April 2022
Introduction
This page describes the experimental setup of the bnmr and bnqr experiments, which are based on the MIDAS DAQ system.
MIDAS Host
The MIDAS Host for the bnmr and bnqr experiments is currently isdaq01, located in the ISAC1 counting room. Another desktop (isdaq06) is located nearby. isdaq06 is normally used as a terminal by the bnmr and bnqr experimenters, but also serves as the secondary MIDAS Host, in case of failure of isdaq01 (see #Changing the Midas host).
NIS ISAC Cluster
Both these desktops run NIS and are part of the ISAC cluster. The "master" computer is isdaq00 (located in the Computing Services server room). isdaq00 is the main file server and hosts the home directories for the cluster. The VMIC CPUs (lxbnqr,lxbnmr) and the CAMP VxWorks CPUs (bnmrvw,polvw) also mount home directories served by isdaq00. These machines (isdaq00, isdaq01, isdaq06) are on UPS.
- Note
- Unless isdaq00 is up and running, and the network is working, it will be impossible to run the experiments.
Experimental setup
Two accounts with usernames bnmr
and bnqr
have been set up to run the bnmr and bnqr experiments. These accounts run the bash
shell, and the files /home/<beamline>/.bashrc contain the required setup for the experiments (see #File .bahrc). The ~/.login file (executed when logging in interactively) contains required EPICS fonts (see #File .login). Users may add more definitions to these files, but should not change any of the DAQ definitions or their experiments may fail to run properly.
Physica
Scripts to run physica are in directory /home/<beamline>/bin This directory also contains links to run bnmrfit, campvarlog and lcrplot. This directory is included in the PATH (hence no alias is defined). A local copy of the physica package is used (NOT the one in /triumfcs/linux/physica , which does not work for SL6).
Environment variables required for physica defined in .bashrc are shown in Table 3 below.
Environment Variables
There are a number of important Environment variables that must be correctly defined for the DAQ to run successfully. These are defined in .bashrc. This file is executed at login.
Some of the environment variables needed for data acquisition are:
- DAQ setup (Table 1)
- MIDAS setup (Table 2)
- EPICS setup (Table 3)
- Physica (Table 4)
Name | Purpose | Value for expt: | |
---|---|---|---|
bnmr | bnqr | ||
DAQ_HOST | defines the name of the MIDAS Host | isdaq01 | |
BEAMLINE | defines the beamline | bnmr | bnqr |
VMIC_HOST | defines the name of the MIDAS Frontend host (VMIC) | lxbnmr | lxbnqr |
MUSR_DIR | defines the path of MUSR libraries and required software | /home/musrdaq/musr | |
CAMP_HOST | name of CAMP host (mvme162) running VxWorks | bnmrvw | polvw |
MSERVER_PORT | defines the port to be used by environment variable MIDAS_SERVER_HOST | 1176 | 1177 |
The MIDAS Environment variables required are shown in Table 2.
Name | Purpose | Value for expt: | |
---|---|---|---|
bnmr | bnqr | ||
MIDASSYS | Path of local copy of the MIDAS software package | /home/bnmr/packages/midas | /home/bnqr/packages/midas |
MIDAS_EXPTAB | Path of the experimental directory | /home/bnmr/online/ | /home/bnqr/online/ |
MIDAS_SERVER_HOST | Must not be defined on MIDAS Host. Must be defined on VMIC | isdaq01:1176 | isdaq01:1177 |
MIDAS_EXPT_NAME | MIDAS Experiment Name. Defined as BEAMLINE | bnmr | bnqr |
Environment variables defined for EPICS are shown in Table 3 below:
Name | Purpose | Value |
---|---|---|
EPICS_BASE | path of EPICS package | /home/midas/packages/epics-base |
EPICS_HOST_ARCH | host architecture | linux-x86_64 |
EPICS_PATH | path of EPICS utilities | /home/midas/packages/epics-base/bin/linux-x86_64 |
EPICS_CA_AUTO_ADDR_LIST | YES | |
EPICS_CA_ADDR_LIST | 142.90.133.255 | |
EPICS_CA_REPEATER_PORT | 9003 | |
EPICS_CA_SERVER_PORT | 9004 | |
EPICS_CA_AUTO_LIST | NO | |
EPICS_CA_ADDR_PORT | 142.90.130.27 |
Environment variables defined for #Physica are shown in Table 4 below:
Name | Purpose | Value |
---|---|---|
TRIUMF_TERMINAL_TYPE | TRIUMF default terminal type | x |
TRIUMF_PLOTTER_TYPE | TRIUMF default plotter | hp |
TRIUMF_FONTS | TRIUMF default fonts | ${HOME}/physica/fonts |
PHYSICA_INIT | Initialization file | ${HOME}/physica/physica_macros/PHYSICA.INIT |
PHYSICA_DIR | Path of physica package | ${HOME}/packages/physica |
Changing the Midas host
The MIDAS host is defined by the environment variable DAQ_HOST in the ~/.cshrc file. Only isdaq01 or alternatively isdaq06 can be the midas host, and successfully run the experiment, because these hosts have the required permission to write to the required EPICS variables. If isdaq01 fails, change the environment variable DAQ_HOST to isdaq06 and also remove or edit /home/<beamline>/vmic_online/$BEAMLINE/.SHM_HOST.TXT .
Aliases
A number of useful aliases that run various scripts or start programs are defined in .bashrc, e.g.
- start-all runs a script to start missing MIDAS clients
- kill-all runs a script to kill all MIDAS clients
- show-windows runs a script to show the client windows for clients frontend, mdarc and mheader
- camp runs the CAMP user interface
File .bashrc
The parts of the ~/.bashrc file relevent to DAQ is shown below:
# .bashrc # User specific aliases and functions # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi export PS1='(bash) [\u@\h \W]\$ ' alias tnt2k1='rdesktop -f tnt2k.triumf.ca' alias mycommd='sh cmds' alias phys='/home/bnmr/packages/physica/physica &' #Passwordless access for bnmrpc alias gobnmrpc='vncviewer bnmrpc -passwd ~/.vnc/passwd' unset SHELL export HOST=`hostname` export MIDAS_EXPT_NAME=bnmr export MIDAS_EXPTAB=/home/bnmr/online/exptab export DAQ_HOST=isdaq01 export VMIC_HOST=lxbnmr export MIDASSYS=$HOME/cycling_dev/packages/midas_oct2020 export EPICS_BASE=/home/midas/packages/epics-base export MUSR_DIR=/home/musrdaq/musr # For python3 export PATH=$PATH:$HOME/.local/bin export PYTHONPATH=$PYTHONPATH:~/cycling_dev/packages/benmr alias autoruns=/home/bnmr/cycling_dev/packages/mui/autoruns.tcl alias campvarlog=/home/bnmr/cycling_dev/packages/mui/bnmr_logger.tcl alias muddiff="python3.6 ~/cycling_dev/packages/benmr/bnxr_common/tests/diff_mud_files.py" alias muddump="python3.6 ~/cycling_dev/packages/benmr/bnxr_common/tests/dump_mud_file.py" triumf=".triumf.ca" export daq_host=$DAQ_HOST$triumf export vmic_host=$VMIC_HOST$triumf unset MIDAS_LINUX if [ $HOST == $VMIC_HOST ] || [ $HOST == $vmic_host ]; then # lxbnmr - talk to isdaq01 through mserver #export MIDAS_SERVER_HOST=$DAQ_HOST":7072" export MIDAS_SERVER_HOST=$DAQ_HOST":1195" export PATH=$MIDASSYS/linux-m32/bin:/triumfcs/linux/bin:/home/bnmr/cycling_dev/packages/benmr/bin:$PATH export EPICS_HOST_ARCH=linux-x86 export CAMP_DIR=$MUSR_DIR/camp/linux-m32 export EPICS_CA_AUTO_ADDR_LIST=YES export EPICS_CA_ADDR_LIST=142.90.133.255 export EPICS_CA_REPEATER_PORT=9003 export EPICS_CA_SERVER_PORT=9004 export EPICS_CA_AUTO_LIST=NO export EPICS_CA_ADDR_PORT=142.90.130.27 # export EPICS_CA_AUTO_ADDR_LIST=NO # export EPICS_CA_ADDR_LIST=142.90.132.202 # export EPICS_CA_REPEATER_PORT=9093 # export EPICS_CA_SERVER_PORT=9094 fi if [ $HOST == $DAQ_HOST ] || [ $HOST == $daq_host ]; then # isdaq01 - main host source scl_source enable devtoolset-8 source scl_source enable rh-python36 export PYTHONPATH=$MIDASSYS/python:$DAQ_DIR:$PYTHONPATH export PATH=$MIDASSYS/bin:/home/bnmr/cycling_dev/packages/midas_tcl:/home/bnmr/cycling_dev/packages/benmr/bin:/home/bnmr/cycling_dev/packages/lcrp64:$PATH unset MIDAS_SERVER_HOST export EPICS_HOST_ARCH=linux-x86_64 export CAMP_DIR=$MUSR_DIR/camp/linux export EPICS_CA_AUTO_ADDR_LIST=NO export EPICS_CA_ADDR_LIST=142.90.132.202 export EPICS_CA_REPEATER_PORT=9093 export EPICS_CA_SERVER_PORT=9094 fi export EPICS_PATH=$EPICS_BASE/bin/$EPICS_HOST_ARCH export LD_LIBRARY_PATH=${EPICS_BASE}/lib/$EPICS_HOST_ARCH export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/musrdaq/lib export PATH=${PATH}:${EPICS_PATH}:${CAMP_DIR}:${HOME}/bin export CAMP_HELP=$CAMP_DIR export CAMP_HOST=bnmrvw.triumf.ca alias camp_cmd=$CAMP_DIR/camp_cmd alias camp=$CAMP_DIR/camp_cui alias python3='python3.6' alias pip='pip3.6' alias bfit='python3.6 -m bfit' alias bccd='python3.6 -m bccd' export BNMR_ARCHIVE=/isdaq/data1/bnmr/dlog/ export BNQR_ARCHIVE=/isdaq/data1/bnqr/dlog/
File .login
The file ~/.login is shown below"
# The commands in this file are executed when a csh user first # logs in. This file is processed after .cshrc. # # $Revision: 1.6 $ # # EPICS fonts... put xset in .login rather than .cshrc if ( "$?DISPLAY" ) then if ( "$DISPLAY" =~ "*:0.*" ) then if ( `xset -q` =~ "*/usr/share/X11/fonts/100dpi/,/usr/share/X11/fonts/75dpi/*" ) then #echo "Bitmap font paths already set" else #echo "Set bitmap font paths for display $DISPLAY" xset +fp /usr/share/X11/fonts/100dpi/ xset +fp /usr/share/X11/fonts/75dpi/ endif else #echo "Display is not the console" endif else #echo "There is no display" endif