Real-time Code Generator (RCG) version 3.1.1

Contents

  1. Real-time Code Generator (RCG) version 3.1.1
    1. Preparation in advance
      1. 7.1.1 Install ldas-tools 2.4.2 for Gentoo DAQ
      2. 7.1.2 Update ldconfig on Gentoo DAQ computers
      3. 8.1 Install RCG 3.0 software for Gentoo
      4. 8.2.1 Set up new build area for front-ends
      5. 8.2.2.1 Rebuild GDS libraries, awgtpman for front-ends
      6. 8.2.2.2 Update mbuf driver
      7. 8.2.2.3 Update IRIG-B driver
      8. 8.2.2.4 Update mx_stream driver
      9. 8.3.1.2 Rebuild GDS libraries for Gentoo DAQ
      10. 8.3.1.3 Configure Gentoo daqd, nds build areas
      11. 8.3.1.4 Set up new build area for Gentoo DAQ
      12. 8.3.1.5 Build the Gentoo data receiver executable (daqd) for trend-writer
      13. 8.3.1.6 Build the Gentoo data receiver executable (daqd) for NDS servers
      14. 8.3.1.7 Build the Gentoo NDS executable (nds) for NDS
      15. 8.3.1.8 Build the Gentoo GDS broadcaster executable (daqd)
      16. 8.3.1.13 Build Gentoo data concentrator executable
    2. Update
      1. 7.1.1 Install ldas-tools 2.4.2 for Gentoo DAQ
      2. 7.1.2 Update ldconfig on Gentoo DAQ computers
      3. 8.1 Install RCG 3.0 software for Gentoo
      4. 8.2.1 Set up new build area for front-ends
      5. 8.2.2.1 Rebuild GDS libraries, awgtpman for front-ends
      6. 8.2.2.2 Update mbuf driver
      7. 8.2.2.3 Update IRIG-B driver
      8. 8.2.2.4 Update mx_stream driver
      9. 8.2.2.5 Update mx_stream driver script
      10. 8.2.2.6 Update script
      11. 8.2.3.1 Clear out old IPC tables
      12. 8.2.3.2 Create new 'tmp' folder for filters
      13. 8.2.3.3 Rebuild all models
      14. 8.2.3.4 Install all new models
      15. 8.2.4 Restart all front-ends
      16. 8.3.1.9 Stop daqs on trend-writer, install new daqd executable, restart
      17. 8.3.1.10 Install, run new daqd, nds executables on NDS server
      18. 8.3.1.11 Install, run new daqd, nds executables on GDS broadcaster
      19. 8.3.1.12 Stop DAQ on data concentrator for IRIG-B driver update
      20. 8.3.1.14 Update IRIG-B driver on data concentrator
      21. 8.3.1.15 Start daqd on Gentoo data concentrator
    3. Troubles

LIGO Document T1600055-v7

Preparation in advance

7.1.1 Install ldas-tools 2.4.2 for Gentoo DAQ

1. Log on as ‘controls’ to that NDS server 2. Copy the downloaded file to /opt/rtapps/tarfiles 3. cd /opt/rtapps 4. tar –xzf tarfiles/ldas-tools-2.4.2-gentoo.tar.gz 5. rm ldas-tools 6. rm framecpp 7. ln –s ldas-tools-2.4.2 ldas-tools 8. ln –s ldas-tools-2.4.2 framecpp

7.1.2 Update ldconfig on Gentoo DAQ computers

1. Login on to each Gentoo DAQ computer as ‘root’ 2. cd /etc/ld.so.conf.d 3. Edit framecpp-linux-x86_64 file to have the following /opt/rtapps/framecpp/lib 4. ldconfig (to update LD paths to point to new ldas-tools areas)

8.1 Install RCG 3.0 software for Gentoo

1. Log in as 'controls' to the boot server (i.e. l1boot) 2. cd $RTCDSBASE/rtscore (this should take you to /opt/rtcds/rtscore - top-level checkout for advLigoRTS)

LIGO LIGO-T1600055-v7 3. 4. 5. 6. 8.2 8.2.1 svn co https://redoubt.ligo-wa.caltech.edu/svn/advLigoRTS/tags/advLigoRTS-3.0 rm release (break link to old Gentoo RCG) ln -s advLigoRTS-3.0 release (set link to new Gentoo RCG) Logout out of your session, and then log back in. This will make the new release the default version.

8.2.1 Set up new build area for front-ends

1. Login to the boot server as 'controls' 2. cd $RTCDSROOT/rtbuild (this should take you to /opt/rtcds/<site>/<ifo>/rtbuild - top-level build area) 3. mkdir rt-3.0 (or similar) 4. cd rt-3.0 5. ${RCG_DIR}/configure - this will create Makefile, config.log, config.status files and doc,src folders 6. cd .. (this puts you back at $RTCDSROOT/rtbuild) 7. rm current (breaks link to old build area) 8. ln -s rt-3.0 current (set link to new build area)

8.2.2.1 Rebuild GDS libraries, awgtpman for front-ends

1. log in as 'controls' to the boot server 2. cd $RTCDSROOT/target (the alias 'target' may take you here) 3. cd gds/bin 4. cp -p awgtpman bin_archive/awgtpman.rcg-2.9.x (to save the existing one) 5. rcgcode (should take you to /opt/rtcds/rtscore/release) 6. cd src/gds 7. make clean 8. make 9. cp awgtpman $RTCDSROOT/target/gds/bin/bin_archive/awgtpman.rcg-3.0 (copies in the new version) 10. target 11. cd gds/bin 12. cp -p bin_archive/awgtpman.rcg-3.0 awgtpman (to install the new one)

8.2.2.2 Update mbuf driver

1. log in as 'controls' to the boot server 2. rcgcode (should take you to /opt/rtcds/rtscore/release) 17 LIGO LIGO-T1600055-v7 3. cd src/drv/mbuf (to get to the mbuf directory) 4. make (to build new mbuf kernel object) 5. sudo make install 6. su root 7. cd /diskless/root//lib/modules/2.6.34.1/extra 8. cp -p mbuf.ko mbuf.ko.2.9 (to save the existing one) 9. cp /lib/modules/2.6.34.1/extra/mbuf.ko mbuf.ko.3.0 (copies in the new version) 10. cp -p mbuf.ko.3.0 mbuf.ko (makes the new version the active one) 8.2.2.3 Update IRIG-B driver

8.2.2.3 Update IRIG-B driver

Your existing IRIG-B driver is likely compatible, but to be safe with updated leap second list, lets update it. 1. log in as 'controls' to the boot server 2. rcgcode (should take you to /opt/rtcds/rtscore/release) 3. cd src/drv/symmetricom (to get to the symmetricom directory) 4. make (to build new symmetricom kernel object) 5. sudo make install 6. su root 7. cd /diskless/root//lib/modules/2.6.34.1/extra 8. cp -p symmetricom.ko symmetricom.ko.2.9 (to save the existing one) 9. cp /lib/modules/2.6.34.1/extra/symmetricom.ko symmetricom.ko.3.0 (copies in the new version) 10. cp -p symmetricom.ko.3.0 symmetricom.ko (makes the new version the active one)

8.2.2.4 Update mx_stream driver

1. log in as 'controls' to the boot server 2. target 3. cd l1daqdc0 4. cp -p mx_stream bin_archive/mx_stream.2.9 (to save the existing one) 5. rcgcode 6. cd src/mx_stream 7. make clean 8. make 9. cp mx_stream $RTCDSROOT/target/l1daqdc0/bin_archive/mx_stream.rcg-3.0 (copies in the new version) 10. target 11. cd l1daqdc0 12. cp -p bin_archive/mx_stream.rcg-3.0 mx_stream (to install the new one)

8.3.1.2 Rebuild GDS libraries for Gentoo DAQ

1. log in as 'controls' on an NDS server (i.e. l1daqnds0) 2. rcgcode (should take you to /opt/rtcds/rtscore/release, which should be RCG 3.0 checout) 3. cd src/gds 4. make clean 5. make

8.3.1.3 Configure Gentoo daqd, nds build areas

1. rcgcode (should take you to /opt/rtcds/rtscore/release, which should be RCG 3.0 checout) 2. cd src/daqd 3. ./bootstrap 4. cd ../nds 5. ./bootstrap 6. cd ../..

8.3.1.4 Set up new build area for Gentoo DAQ

1. log in as 'controls' on an NDS server (i.e. l1daqnds0) 2. cd $RTCDSROOT (this should take you to /opt/rtcds/<site>/<ifo>) 3. mkdir -p daqbuild 4. cd daqbuild 5. mkdir daq-3.0 (or similar) 6. cd daq-3.0 7. ${RCG_DIR}/configure - this will create Makefile, config.log, config.status files and doc,src folders 8. cd .. (this puts you back at $RTCDSROOT/daqbuild) 9. rm current (breaks link to old build area) 10. ln -s daq-3.0 current (set link to new build area)

8.3.1.5 Build the Gentoo data receiver executable (daqd) for trend-writer

1. log in as 'controls' on NDS server (i.e. l1daqnds0) 2. daqcode 21 LIGO LIGO-T1600055-v7 3. make fw 4. cd build/fw 5. cp -p daqd ${RTCDSROOT}/target/l1daqtw0/bin_archive/daqd.rcg-3.0 (copies in the new version) 6. cp -p daqd ${RTCDSROOT}/target/l1daqtw1/bin_archive/daqd.rcg-3.0 (copies in the new version)

8.3.1.6 Build the Gentoo data receiver executable (daqd) for NDS servers

1. log in as 'controls' on NDS server 2. daqcode 3. make rcv 4. cd build/rcv 5. cp -p daqd ${RTCDSROOT}/target/l1daqnds0/bin_archive/daqd.rcg-3.0 (copies in the new version) 6. cp -p daqd ${RTCDSROOT}/target/l1daqnds1/bin_archive/daqd.rcg-3.0 (copies in the new version)

8.3.1.7 Build the Gentoo NDS executable (nds) for NDS

1. daqcode 2. make nds 3. cd build/nds 4. cp -p nds ${RTCDSROOT}/target/l1daqnds0/bin_archive/nds.rcg-3.0 (copies in the new version) 5. cp -p nds ${RTCDSROOT}/target/l1daqnds1/bin_archive/nds.rcg-3.0 (copies in the new version)

8.3.1.8 Build the Gentoo GDS broadcaster executable (daqd)

1. daqcode 2. make bcst 3. cd build/bcst 4. cp -p daqd ${RTCDSROOT}/target/l1daqgds0/bin_archive/daqd.rcg-3.0 (copies in the new version) 5. cp -p daqd ${RTCDSROOT}/target/l1daqgds1/bin_archive/daqd.rcg-3.0 (copies in the new version)

8.3.1.13 Build Gentoo data concentrator executable

1. log in as 'controls' to NDS server used for builds (i.e. l1daqnds0) 2. daqcode (Using an alias to get to /opt/rtcds/<site>/<ifo>/daqbuild/current) 3. make dc 4. cp -p build/dc/daqd ${RTCDSROOT}/target/l1daqdc0/bin_archive/daqd.rcg-3.0 (copies in the new version) 5. cp -p build/dc/daqd ${RTCDSROOT}/target/l1daqdc1/bin_archive/daqd.rcg-3.0 (copies in the new version)

Update

7.1.1 Install ldas-tools 2.4.2 for Gentoo DAQ

1. Log on as ‘controls’ to that NDS server 2. Copy the downloaded file to /opt/rtapps/tarfiles 3. cd /opt/rtapps 4. tar –xzf tarfiles/ldas-tools-2.4.2-gentoo.tar.gz 5. rm ldas-tools 6. rm framecpp 7. ln –s ldas-tools-2.4.2 ldas-tools 8. ln –s ldas-tools-2.4.2 framecpp

7.1.2 Update ldconfig on Gentoo DAQ computers

1. Login on to each Gentoo DAQ computer as ‘root’ 2. cd /etc/ld.so.conf.d 3. Edit framecpp-linux-x86_64 file to have the following /opt/rtapps/framecpp/lib 4. ldconfig (to update LD paths to point to new ldas-tools areas)

8.1 Install RCG 3.0 software for Gentoo

8.2.1 Set up new build area for front-ends

1. Login to the boot server as 'controls' 2. cd $RTCDSROOT/rtbuild (this should take you to /opt/rtcds/<site>/<ifo>/rtbuild - top-level build area) 3. mkdir rt-3.0 (or similar) 4. cd rt-3.0 5. ${RCG_DIR}/configure - this will create Makefile, config.log, config.status files and doc,src folders 6. cd .. (this puts you back at $RTCDSROOT/rtbuild) 7. rm current (breaks link to old build area) 8. ln -s rt-3.0 current (set link to new build area)

8.2.2.1 Rebuild GDS libraries, awgtpman for front-ends

1. log in as 'controls' to the boot server 2. cd $RTCDSROOT/target (the alias 'target' may take you here) 3. cd gds/bin 4. cp -p awgtpman bin_archive/awgtpman.rcg-2.9.x (to save the existing one) 5. rcgcode (should take you to /opt/rtcds/rtscore/release) 6. cd src/gds 7. make clean 8. make 9. cp awgtpman $RTCDSROOT/target/gds/bin/bin_archive/awgtpman.rcg-3.0 (copies in the new version) 10. target 11. cd gds/bin 12. cp -p bin_archive/awgtpman.rcg-3.0 awgtpman (to install the new one)

8.2.2.2 Update mbuf driver

1. log in as 'controls' to the boot server 2. rcgcode (should take you to /opt/rtcds/rtscore/release) 17 LIGO LIGO-T1600055-v7 3. cd src/drv/mbuf (to get to the mbuf directory) 4. make (to build new mbuf kernel object) 5. sudo make install 6. su root 7. cd /diskless/root//lib/modules/2.6.34.1/extra 8. cp -p mbuf.ko mbuf.ko.2.9 (to save the existing one) 9. cp /lib/modules/2.6.34.1/extra/mbuf.ko mbuf.ko.3.0 (copies in the new version) 10. cp -p mbuf.ko.3.0 mbuf.ko (makes the new version the active one)

8.2.2.3 Update IRIG-B driver

1. log in as 'controls' to the boot server 2. rcgcode (should take you to /opt/rtcds/rtscore/release) 3. cd src/drv/symmetricom (to get to the symmetricom directory) 4. make (to build new symmetricom kernel object) 5. sudo make install 6. su root 7. cd /diskless/root//lib/modules/2.6.34.1/extra 8. cp -p symmetricom.ko symmetricom.ko.2.9 (to save the existing one) 9. cp /lib/modules/2.6.34.1/extra/symmetricom.ko symmetricom.ko.3.0 (copies in the new version) 10. cp -p symmetricom.ko.3.0 symmetricom.ko (makes the new version the active one)

8.2.2.4 Update mx_stream driver

1. log in as 'controls' to the boot server 2. target 3. cd l1daqdc0 4. cp -p mx_stream bin_archive/mx_stream.2.9 (to save the existing one) 5. rcgcode 6. cd src/mx_stream 7. make clean 8. make 9. cp mx_stream $RTCDSROOT/target/l1daqdc0/bin_archive/mx_stream.rcg-3.0 (copies in the new version) 10. target 11. cd l1daqdc0 12. cp -p bin_archive/mx_stream.rcg-3.0 mx_stream (to install the new one)

8.2.2.5 Update mx_stream driver script

1. Login to boot server as 'root' 2. cd /diskless/root/etc/init.d 3. Edit the mx_stream file so the mx_stream command line has an added ‘–e 0’ on it. For example: start-stop-daemon --start --quiet -b -m --pidfile /var/log/mx_stream.pid --exec /opt/rtcds/llo/l1/target/l1daqdc0/mx_stream -- -e 0 -r "$epnum" -W 0 -w 0 -s "$sys" -d l1daqdc0 –l /opt/rtcds/llo/l2/target/l1daqdc0/mx_stream_logs/$hostname.log

8.2.2.6 Update script

4. Login to boot server as 'controls' 5. rcgcode (alias to get to ${RCG_DIR}) 6. cd src/epics/util 7. cp iniChk.pl ${RTCDSROOT}/scripts 8. cp fe_load_burt ${RTCDSROOT}/scripts 9. cp grdfiltdecode.py ${RTCDSROOT}/scripts

8.2.3.1 Clear out old IPC tables

1. Log into boot server as ‘controls’ 2. cd $RTCDSROOT/chans/ipc 3. mv L1.ipc L1_<date>.ipc 4. touch L1.ipc

8.2.3.2 Create new 'tmp' folder for filters

1. Log into boot server as ‘controls’ 2. cd $RTCDSROOT/chans 3. mkdir tmp

8.2.3.3 Rebuild all models

1. Logout and back into the boot server as controls (to reset paths, aliases) 2. Use ‘cdscode’ to move to build area 3. make -i World (run make ignoring errors) 4. Check for errors in *_error.log files (grep ERROR *_error.log). Correct issues with ungrounded filter inputs, etc. in models 5. Inspect ipc file at ${RTCDSROOT}/chans/ipc/L1.ipc 6. cdscode 7. make World

8.2.3.4 Install all new models

1. cd to build area. 2. make installWorld

8.2.4 Restart all front-ends

8.3.1.9 Stop daqs on trend-writer, install new daqd executable, restart

1. log in as 'controls' to trend writer (i.e. l1daqfw0) 2. sudo /etc/init.d/monit stop 3. sudo /etc/init.d/daqd_tw0 stop 4. target 5. cd l1daqtw0 6. cp -p daqd bin_archive/daqd.rcg-2.9.x 7. cp -p bin_archive/daqd.rcg-3.0 daqd 8. sudo /etc/init.d/monit start

8.3.1.10 Install, run new daqd, nds executables on NDS server

1. log in as 'controls' to NDS server (i.e. l1daqnds0) 2. sudo /etc/init.d/monit stop 3. sudo /etc/init.d/daqd_nds0 stop 4. sudo /etc/init.d/nds_nds0 stop 5. target 6. cd l1daqnds0 7. cp -p daqd bin_archive/daqd.rcg-2.9.x 8. cp -p bin_archive/daqd.rcg-3.0 daqd 9. cp -p nds bin_archive/nds.rcg-2.9.x 10. cp -p bin_archive/nds.rcg-3.0 nds 11. sudo /etc/init.d/monit start

8.3.1.11 Install, run new daqd, nds executables on GDS broadcaster

1. log in as 'controls' to GDS broadcaster (i.e. l1daqgds0) 2. sudo /etc/init.d/monit stop 3. sudo /etc/init.d/daqd_gds0 stop 4. target 5. cd l1daqgds0 6. cp -p daqd bin_archive/daqd.rcg-2.9.x 7. cp -p bin_archive/daqd.rcg-3.0 daqd 8. sudo /etc/init.d/monit start

8.3.1.12 Stop DAQ on data concentrator for IRIG-B driver update

1. log in as 'controls' to data concentrator (i.e. l1daqdc0) 2. sudo /etc/init.d/monit stop (stop the monit process to keep from restarting daqd, nds) 3. sudo /etc/init.d/daqd_dc0 stop (stops daqd)

8.3.1.14 Update IRIG-B driver on data concentrator

1. log in as 'controls' to data concentrator (i.e. l1daqdc0) 2. rcgcode (should take you to /opt/rtcds/rtscore/release) 23 LIGO LIGO-T1600055-v7 3. cd src/drv/symmetricom (to get to the symmetricom directory) 4. make (to build new symmetricom kernel object) 5. sudo make install

8.3.1.15 Start daqd on Gentoo data concentrator

1. log in as 'controls' to data concentrator (i.e. l1daqdc0) 2. target 3. cd l1daqdc0 4. cp -p daqd bin_archive/daqd.rcg-2.9.x (to preserve the existing one) 5. cp -p bin_archive/daqd.rcg-3.0 daqd (to install new one as active copy) 6. sudo /etc/init.d/monit start

Troubles