Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Latest commit

 

History

History
102 lines (79 loc) · 5.09 KB

SPECIAL_MODE.md

File metadata and controls

102 lines (79 loc) · 5.09 KB

Special Modes for ESS EPICS Environment (e3)

The Special modes are optional. However it will give users to explore more posssibilities while running IOC in any circumstances.

Cell Mode

When a user faces the difficulty to work within entire work-flow in terms of the tighted-controlled deployment or within limited RW permissions. Sometimes, it is very difficult to compile and run any IOC appplication within the ESS EPICS environment. Thus, the Cell Mode is introduced.

One should define E3_CELL_PATH, where one can has the RW permission. The default is $(TOP)/cellMods because the e3 has the assumption that one can download the e3-modules or e3-application within a writable path. This variable can be overried with CONFIG_CELL.local or configure/CONFIG_CELL.local as the same as other CONFIG_MODULE or RELEASE files. The different commands are shown in

make cellinstall
make celluninstall
make cellvars

Once one install an application with the cell mode, one can run an IOC via

iocsh.bash -l ${E3_CELL_PATH}

Real-Time Mode

The e3 will handle all modules and applications as a dynamic libraries, which we have to consider when all symbols are resolved. We put this time at startup moment. Although it can slow down any IOC initialization, it is only way to avoid non-deterministic latencies during IOC execution [1].

Here we set the LD_BIND_NOW=1 before we are going into actually IOC application, and run a IOC application with a scheduler policy of FIFO and a prority of 1. One needs the proper permission to execute it chrt, mostly realtime group should be created and a user should be in that group.

  • Command
iocsh.bash -rt 

ESS Site System Application Mode

ESS is planing to deploy its through site-wide NFS shared directories. Due to long-term maintenance issues and minimal footprints on e3 application, we also introduce the SAMode (System Application Mode). It only is valid for the site-wide deployment system, not for any local installation.

Technically, e3 uses E3_SITEAPPS_PATH to install any system specific applications. Without any modification, the default path is defined as follows:

E3_SITEAPPS_PATH= /epics/base-3.15.6/require/3.1.0/siteApps

However, for the system or subsystem deployment procedure, we will replace them system or subsystem specific shared folders, for example, such as

  • ICS : /siteApps/ics
  • Accelerator : /siteApps/acc
  • Conventional Facility : /siteApps/cf
  • Target : /siteApps/tgt
  • Experiments : /siteApps/exp and /siteApps/exp{1..16}

These parameter is define in each configure/CONFIG_SITE_SYSTEMAPPS as E3_MODULES_PATH:= and can be overridden via configure/CONFIG_SITE_SYSTEMAPPS.local also during the static (configure, build, and install) procedure.

When an IOC is running, each IOC should know where they are belong into through IOCID, and will set SITE_SYSTEMAPPS_PATH before doing source setE3Env.bash and iocsh.bash or run iocsh.bash directly.

  • Static
$ e3-myexample (master)$ echo "E3_MODULES_PATH=/siteApps/icsApps" > configure/CONFIG_SITE_SYSTEMAPPS.local
$ e3-myexample (master)$ make init
$ e3-myexample (master)$ make build
$ e3-myexample (master)$ sudo make install
$ e3-myexample (master)$ make existent
/siteApps/icsApps/myexample
└── master
    ├── db
    ├── dbd
    ├── include
    └── lib
  • Running
export SITE_SYSTEMAPPS_PATH=/siteApps/icsApps/
source setE3Env.bash
echo $EPICS_DRIVER_PATH
/home/jhlee/e3-test/base-3.15.6/require/3.1.0/siteMods:/home/jhlee/e3-test/base-3.15.6/require/3.1.0/siteApps:/siteApps/icsApps/
iocsh.bash -r myexample,master
....
require myexample,master
Module myexample version master found in /siteApps/icsApps//myexample/master/
Module myexample depends on sequencer 2.2.6
Module sequencer version 2.2.6 found in /home/jhlee/e3-test/base-3.15.6/require/3.1.0/siteMods/sequencer/2.2.6/
Loading library /home/jhlee/e3-test/base-3.15.6/require/3.1.0/siteMods/sequencer/2.2.6/lib/linux-x86_64/libsequencer.so
Loaded sequencer version 2.2.6
sequencer has no dbd file
Loading module info records for sequencer
Loading library /siteApps/icsApps//myexample/master/lib/linux-x86_64/libmyexample.so
Loaded myexample version master
Loading dbd file /siteApps/icsApps//myexample/master/dbd/myexample.dbd
Calling function myexample_registerRecordDeviceDriver
Loading module info records for myexample
# Set the IOC Prompt String One 
epicsEnvSet IOCSH_PS1 "c72f6a5.kaffee.31345 > "

For the deployment system, we have to define each E3_MODULES_PATH differently within system specific application, it will be done with the global CONFIG_SITE_SYSTEMAPPS.local. And each ioc should know SITE_SYSTEMAPPS_PATH in order to match E3_MODULES_PATH before it starts.

  • IOCID defines a system group
  • Before the systemd service, the additional systemd service check "mountable" path, which will be used in SITE_SYSTEMAPPS_PATH, and do export $SITE_SYSTEMAPPS_PATH globally.

References

[1] Original paragraph from Red Hat Enterprise Linux for Real Time 7 Tuning Guide. 2018-04-30 / CC BY-SA 3.0 https://creativecommons.org/licenses/by-sa/3.0/