Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Warning

Attention:

All scripts in this page are assuming that your current shell is Bash.

  • If you are using some other shell such as tcsh, you can switch to bash in your current session by typing "bash" in your terminal.
  • If you wish to switch permanently to Bash as your default shell here are some instructions:

In order to change your default shell at login from tcsh (or any other shell) to Bash, please execute the following command on a Linux server on the AFS network, such as a rhel6-64* node. (You will be prompted for your password during this process):

ypchsh -s /bin/bash

After that, close the terminal and open a new one. You will be using Bash as the default shell. 

You can check if all went well with the following command in a new Terminal window:

echo $SHELL

...

Anchor
matpva

...

How to test matpva in DEV and PROD (lcls and facet)

...

At the time of this writing, the latest version of Java available in Development and Production is 1.8.0_181 (64-bit). In order to use this Java version, source the following scripts depending on your environment:

...

_top
matpva_top
Python with MATLAB

We can directly call Python library functionality from MATLAB or write Python programs that work with MATLAB.

For information on compatible Python versions, refer to the link: https://www.mathworks.com/support/requirements/python-compatibility.html


To check the Python version in MATLAB, use the following command:

Code Block
languagebash
>> pyenv

ans =

  PythonEnvironment with properties:

          Version: "3.8"
          Executable: "/usr/local/lcls/package/anaconda/envs/python3_env/bin/python"
          Library: "/usr/local/lcls/package/anaconda/envs/python3_env/lib/libpython3.8.so"
          Home: "/usr/local/lcls/package/anaconda/envs/python3_env"
          Status: NotLoaded
    ExecutionMode: InProcess
Note

The library conflicts between MATLAB's and Python's libraries can result in segmentation faults.

If the Python version in the MATLAB environment differs from the one in the Linux environment (the version used in DEV and PROD, you need to update the "startup.m" file located at "$TOOLS/matlab/toolbox/."

Code Block
languagebash
# A snippet of the file:

if strcmp(version('-release'),'2020a') | strcmp(version('-release'),'2022b') | strcmp(version('-release'),'2023a')
   % Setup Python Environment:
   package_top = getenv('PACKAGE_TOP');
   pyenv_path = [package_top '/anaconda/envs/python3_rhel7_env/bin/python'];
   pyenv('Version', pyenv_path,'ExecutionMode','InProcess');
%% Change default add-ons installation folder for Monkey Proof Code Checker
   theSettings = settings();
   theSettings.matlab.addons.InstallationFolder.TemporaryValue = [package_top '/matlab/2020a/SupportPackages'];
end


Anchor
matpva_top
matpva_top
matpva

  • matpva is a powerful extension that provides seamless integration between MATLAB and EPICS 7 through the Python P4P module.

How to use matpva

Matpva: Integrate EPICS7 into MATLAB using PVAccess for Python (P4P) module

Link to the GitHub Repository: https://github.com/slaclab/matpva

How to test matpva

How to test Matpva in DEV and PROD (lcls and facet)


Anchor
java_top
java_top
Java

At the time of this writing, the latest version of Java available in Development and Production is 1.8.0_181 (64-bit). In order to use this Java version, source the following scripts depending on your environment:

...

Note

For Oracle compatibility, the Oracle client used must also be compiled for 64-bit. In order to use the supported 64-bit Oracle client, source the following scripts depending on your environment:

  • Development
    /afs/slac/g/lcls/tools/oracle/oracleSetup-R11.2.0.4.bash
  • Production
    /usr/local/lcls/tools/oracle/oracleSetup-R11.2.0.4.bash

EPICS Java APIs

The EPICS Java APIs are located at:

  • Development
    /afs/slac/g/lcls/epics/java
  • Production
    /usr/local/lcls/epics/java

At these locations you will be able to find the following libraries:

  • epicsCoreJava
    Includes EPICS 7 (pvaccess, ntypes, pvdata) and JCA libraries
  • pvaClientJava
    Inlcudes pvaClientJava library developed by Marty Kraimer
  • phoebus
    This repository contains the whole phoebus code (replacement for the CS-Studio backend) but it also contains the new pva client library developed by Kay Kasemir.

  • pva
    Includes the pva library

...

For MATLAB admins (epicsmgr group members) only:

  • New versions (versions later than 2012a) of MATLAB should be installed in the 3rd-party software package area under the matlab folder:
    - Development: /afs/slac/g/lcls/package/matlab
    - Production: /usr/local/lcls/package/matlab
  • Inside the matlab directory, versions should be installed in folders that correspond to their MATLAB version, e.g. 2012a, 2019a, 2020a, etc.

At the time of this writing, the latest version of MATLAB deployed for LCLS Development and Production is 2020a.

Individual AFS user accounts in the LCLS Development environment default to set up and use MATLAB 2012a unless overridden.

The default MATLAB versions for shared login accounts in Production are as follows:

...

This is 32-bit software and will no longer be supported with OS versions later than RHEL6.
The Java version used by this Matlab is Java 6.

  • Development EnvironmentDevelopment
    /afs/slac/g/lcls/packagephysics/matlab/2012asetup/javaSetup-R1.8.0_181.bash
  • Production Environment
    /usr/local/lcls/matlab/2012a

...

  • physics/setup/javaSetup-R1.8.0_181.bash

This is 64-bit software.
The Java version used by this Matlab is Java 8.

Note

For Oracle compatibility, the Oracle client used must also be compiled for 64-bit. In order to use the supported 64-bit Oracle client, source the following scripts depending on your environment:

  • Development
    /afs/slac/g/lcls/

...

  • tools/

...

  • oracle/oracleSetup-R11.2.0.4.bash
  • Production
  • /usr/local/lcls/

...

  • tools/

...

  • oracle/oracleSetup-R11.2.0.4.bash

EPICS Java APIs

The EPICS Java APIs are located at:This is 64-bit software.
The Java version used by this Matlab is Java 8.

  • Development
    /afs/slac/g/lcls/packageepics/matlab/2020ajava
  • Production
    /usr/local/lcls/packageepics/matlab/2020a

...

In order to set up your environment to use one of the supported versions of MATLAB, follow one of the appropriate procedures below.

...

  • java

At these locations you will be able to find the following libraries:

  • epicsCoreJava
    Includes EPICS 7 (pvaccess, ntypes, pvdata) and JCA libraries
  • pvaClientJava
    Includes pvaClientJava library developed by Marty Kraimer
  • phoebus
    This repository contains the whole phoebus code (replacement for the CS-Studio backend) but it also contains the new pva client library developed by Kay Kasemir.

  • exampleJava
    Includes a set of examples of client and server code for PVAcess.

Anchor
matlab_top
matlab_top
MATLAB

Click the version name of MATLAB shown below to move to the detailed instructions for each version.

MATLAB R2012a

MATLAB R2019a

MATLAB R2020a

MATLAB R2022b

MATLAB R2023a

Anchor
matlab_installation
matlab_installation
Installation

For MATLAB admins (epicsmgr group members) only:

  • New versions (versions later than 2012a) of MATLAB should be installed in the 3rd-party software package area under the matlab folder:
    - Development: /afs/slac/g/lcls/package/matlab
    - Production:

    Development

    Warning

    Do not run MATLAB instances on mcclogin or lcls-prod02. MATLAB should be run on mcc-simul in DEV.

    Code Block
    languagebash
    source /afs/slac/g/lcls/epics/setup/epicsenv-3.14.12.bash
    source /afs/slac/g/lcls/tools/oracle/oracleSetup_11g.bash
    source /afs/slac/g/lcls/tools/matlab/setup/matlabSetup_dev.bash 
    
    # Launch in desktop mode: 
    matlab &
    
    # Launch in terminal mode: 
    run_matlab.bash --matlab=2012a

    Production

    Code Block
    languagebash
    source /usr/local/lcls/tools/script/ENVS.bash # Launch in desktop mode: matlab & # Launch in terminal mode: run_matlab.bash --matlab=2012a

...

Development

Warning

Do not run MATLAB instances on mcclogin or lcls-prod02. MATLAB should be run on mcc-simul in DEV.

Code Block
languagebash
source /afs/slac/g/lcls/epics/setup/epicsenv-7.0.2-1.0.bash
source /afs/slac/g/lcls/tools/oracle/oracleSetup-R11.2.0.4.bash
export MATLAB_VER=2019a  export MLM_LICENSE_FILE="27010@license1,27010@license2,27010@license3" 
source /afs/slac/g/lcls/tools/matlab/setup/matlabSetup64.bash

# Launch in desktop mode: 
matlab &

# Launch in terminal mode: 
run_matlab.bash --matlab=2019a
  • package/matlab
  • Inside the matlab directory, versions should be installed in folders that correspond to their MATLAB version, e.g. 2012a, 2019a, 2020a, 2022b, 2023a etc.

At the time of this writing, the latest version of MATLAB deployed for LCLS Development and Production is 2023a.

Individual AFS user accounts in the LCLS Development environment default to set up and use MATLAB 2020a unless overridden.

The default MATLAB versions for shared login accounts in Production are as follows:

AccountDefault MATLAB version
physics2020a
softegr2020a
laci2012a


Anchor
matlab_license
matlab_license
License servers for Matlab network licenses

In order to support the latest version of Matlab, the network license service had to be migrated to a newer operating system.  The new service is running on servers license701, license702, and license703 (replacing license1, license2, and license3). 

Linux users using bash or similar shells should update their environment with the command:

Code Block
languagebash
export MLM_LICENSE_FILE=27010@license701,27010@license702,27010@license703


If you are using csh or tcsh, the equivalent command is:

Code Block
languagebash
setenv MLM_LICENSE_FILE "27010@license701,27010@license702,27010@license703"

https://slacprod.servicenowservices.com/kb_view.do?sysparm_article=KB0011921


Anchor
running_matlab
running_matlab
Running MATLAB

Production

...

languagebash

...

Code Block
languagebash
# Launch in desktop mode:

...


$ run_matlab.bash -m <matlab_version> -d           # ex)  run_matlab.bash -m 2023a -d  

# Launch in terminal mode:
$ 

...

run_matlab.bash -

...

m <matlab_version>              # ex)  run_matlab.bash -m 2023a


To use one of the supported versions of MATLAB for development and configuration setup purposes, you need to follow the appropriate setup procedures.

  • Development

    WarningDo not run MATLAB instances on mcclogin or lcls-prod02. MATLAB should be run on mcc-simul in DEV.

    Development (MATLAB should be run on lcls-dev3 in DEV. Do not run MATLAB instances on login nodes such as centos7.)


    Code Block
    languagebash
    source $ source /afs/slac/g/lcls/epics/setup/epicsenv-7.0.23.1-1.0.bash
    source $ source /afs/slac/g/lcls/tools/oracle/oracleSetup-R11.2.0.4.bash
    $ export MATLAB_VER=2020a<matlab_version>     
    export MLM_LICENSE_FILE="27010@license1,27010@license2,27010@license3"
    source /afs/slac/g/lcls/tools/matlab/setup/matlabSetup64.bash
    
    # Launch in desktop mode: 
    matlab &
    
    # Launch in terminal mode: 
    run_matlab.bash --matlab=2020a

    Production

    Code Block
    languagebash
    source /usr/local/lcls/epics/setup/epicsenv-7.0.2-1.0.bash
    source /usr/local/lcls/tools/oracle/oracleSetup-R11.2.0.4.bash
    export MATLAB_VER=2020a 
    source /usr/local/lcls/tools/matlab/setup/matlabSetup64.bash
    
                      # Currently supported MATLAB versions: 2020a, 2022b, 2023a
    $ export MLM_LICENSE_FILE="27010@license701,27010@license702,27010@license703"
    $ source /afs/slac/g/lcls/tools/matlab/setup/matlabSetup64.bash
     
    # Launch in desktop mode: 
    matlab &
    
    # Launch in terminal mode: 
    run_matlab.bash --matlab=2020a

...

  • $ LD_PRELOAD=${FACILITY_ROOT}/epics/base/R7.0.3.1-1.0/lib/rhel7-x86_64/libCom.so matlab &
    $ LD_PRELOAD=${FACILITY_ROOT}/epics/base/R7.0.3.1-1.0/lib/rhel7-x86_64/libCom.so /afs/slac/g/lcls/package/matlab/<matlab_version>/bin/matlab &     # If "matlab &" couldn't find the correct location, use the absolute path
    $ run_matlab.bash -m <matlab_version> -d           # ex)  run_matlab.bash -m 2023a -d  
    
    # Launch in terminal mode:
    $ run_matlab.bash -m <matlab_version>              # ex)  run_matlab.bash -m 2023a
  • Production (Run on softegr@lcls-srv01 or physics@lcls-ssrv01 in PROD. Do not run MATLAB instances on mcclogin.)

    Code Block
    languagebash
    $ source /usr/local/lcls/epics/epicsenv-7.0.3.1-1.0.bash
    $ source /usr/local/lcls/tools/oracle/oracleSetup-R11.2.0.4.bash
    $ export MATLAB_VER=<matlab_version>                                   # Currently supported MATLAB versions: 2020a, 2022b, 2023a
    $ source /usr/local/lcls/tools/matlab/setup/matlabSetup64.bash
     
    # Launch in desktop mode:
    $ LD_PRELOAD=${FACILITY_ROOT}/epics/base/R7.0.3.1-1.0/lib/rhel7-x86_64/libCom.so matlab &
    $ LD_PRELOAD=${FACILITY_ROOT}/epics/base/R7.0.3.1-1.0/lib/rhel7-x86_64/libCom.so /usr/local/lcls/package/matlab/<matlab_version>/bin/matlab &      # If "matlab &" couldn't find the correct location, use the absolute path
    $ run_matlab.bash -m <matlab_version> -d           # ex)  run_matlab.bash -m 2023a -d   
     
    # Launch in terminal mode:
    $ run_matlab.bash -m <matlab_version>              # ex)  run_matlab.bash -m 2023a

Anchor
configuring_matlab
configuring_matlab
Configuring MATLAB

For the Development and Production environments, a set of working configuration files is already provided for users and invoked upon login. Users can override the usage of these files by having their own custom files in the folder where they launch MATLAB (see: Creating A Custom MATLAB Environment).

MATLAB is non-standard Unix software and does not adhere to values set by PATH, LD_LIBRARY_PATH, CLASSPATH, and other global environment variables that are used by most other Unix software. Instead, MATLAB uses the following configuration files to set its environment:

  • Parameters for the Java JVM that runs inside of MATLAB are configured via a java.opts file
  • The classpath is configured via a classpath.txt file
  • The library search path is configured via a librarypath.txt file

For questions on the installation and deployment of MATLAB in Development or Production, please contact:

Anchor
matlab_jvm
matlab_jvm
java.opts

Description: This file is used to pass variables and configurations to the Java JVM used by MATLAB.
Location:
<matlabroot>/bin/<architecture>/java.opts
e.g., in Development environment: /afs/slac/g/lcls/package/matlab/2019a/bin/glnxa64/java.opts

Anchor
matlab_classpath
matlab_classpath
classpath.txt

Description: This file is used to augment the Java classpath used by MATLAB.
Location:
<matlabroot>/toolbox/local/classpath.txt
e.g., in Development environment: /afs/slac/g/lcls/package/matlab/2019a/toolbox/local/classpath.txt

Anchor
matlab_librarypath
matlab_librarypath
librarypath.txt

Description: This file is used to augment the library search path used by MATLAB.

Location:
<matlabroot>/toolbox/local/librarypath.txt

e.g., in Development environment: /afs/slac/g/lcls/package/matlab/2019a/toolbox/local/librarypath.txt


Anchor
custom_matlab_env
custom_matlab_env
Creating A Custom MATLAB Environment

If you need to use a MATLAB environment configuration that does not match the default environment provided in Development or Production, you will need to create your own java.opts, classpath.txt or librarypath.txt files in your working directory prior to launching MATLAB.

It is strongly recommended to only override the files needed in your local workspace, since MATLAB will inspect your current working directory before looking at the global configuration files.

If you need to connect to a different set of EPICS servers, copy the java.opts file from one of the locations above to your local working directory and modify it according to your needs.

If you need to test a new JAR file, copy the classpath.txt file from one of the locations above to your local working directory and modify it according to your needs.

If you need to test a new library to add to the library path, copy the librarypath.txt file from one of the locations above to your local working directory and modify it according to your needs.

Warning

Never try to modify the existing global configuration files. If you need changes made to the global configuration files, consult the MATLAB admins for LCLS Development and Production (TID-ACS and EED Systems Group). Any changes to the global MATLAB configuration must be approved and implemented by those groups.


Anchor
known_issues
known_issues
Known issues

1. When MATLAB 2022b starts, you will see the following error message: Warning: X does not support locale en_US.UTF-8

This is a known issue in MATLAB R2022b Update 5. The bug that triggers the warning when starting up MATLAB will be resolved in the upcoming update.

https://www.mathworks.com/matlabcentral/answers/1929870-why-do-i-get-warning-on-startup-x-does-not-support-locale-en_us-utf-8-when-startup-matlab-with-r2?s_tid=answers_rc1-2_p2_MLT

The bug has been resolved in the following versions: R2023b, R2023a Update 3, and R2022b Update 6.

2. When using matpva in MATLAB and then exiting, it generates a segmentation violation message. While labCA closes, it displays the message "Entering labca finalizer." Ideally, it should complete this process and then show another message, such as "Leavving labca finalizer."

Code Block
>> exit
finish.m about to lcaClear
Entering labca finalizer

--------------------------------------------------------------------------------
          Segmentation violation detected at 2023-03-07 23:18:49 -0800
--------------------------------------------------------------------------------

Configuration:
  Crash Decoding           : Disabled - No sandbox or build area path
  Crash Mode               : continue (default)
  Default Encoding         : UTF-8
  Deployed                 : false
  GNU C Library            : 2.17 stable
  Graphics Driver          : Uninitialized software 
  Graphics card 1          : 0x102b ( 0x102b ) 0x534 Version 0.0.0.0 (0-0-0)
  Java Version             : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
  MATLAB Architecture      : glnxa64
  MATLAB Entitlement ID    : 6397849
  MATLAB Root              : /afs/slac.stanford.edu/g/lcls/vol9/package/matlab/2022b
  MATLAB Version           : 9.13.0.2166757 (R2022b) Update 4
  OpenGL                   : software
  Operating System         : "Red Hat Enterprise Linux Server release 7.9 (Maipo)"
  Process ID               : 29718
  Processor ID             : x86 Family 6 Model 63 Stepping 2, GenuineIntel
  Session Key              : 455c04fb-90e4-445d-a778-ba3106ff69bd
  Static TLS mitigation    : Enabled: Full
  Window System            : The X.Org Foundation (11906000), display localhost:25.0

Fault Count: 1


Abnormal termination:
Segmentation violation

Current Thread: 'MCR 0 interpret' id 140077373851392

Register State (from fault):
  RAX = 00007f6691d5e7a0  RBX = 00007f64b9b92e50
  RCX = 00007f64a80939b0  RDX = 00007f64b9c85df0
  RSP = 00007f664e1bf690  RBP = 0000000000000000
  RSI = 00007f64b9b92e50  RDI = 0000000000000000

   R8 = 0000000000000000   R9 = 00007f64b9ba2870
  R10 = 00007f664e1bf120  R11 = 00007f6691b39570
  R12 = 00007f64b9ba83c0  R13 = 00007f64b9ba83c0
  R14 = 00007f64b9ba8378  R15 = 0000000000000000

  RIP = 00007f6691b27f24  EFL = 0000000000010206

   CS = 0033   FS = 0000   GS = 0000

Stack Trace (from fault):
[  0] 0x00007f6691b27f24 /afs/slac/g/lcls/epics/base/R7.0.3.1-1.0/lib/rhel7-x86_64/libCom.so+00249636 _ZN10epicsMutex4lockEv+00000004
[  1] 0x00007f64b9ba81b0                                   <unknown-module>+00000000

** This crash report has been saved to disk as /u/gu/ktkim/matlab_crash_dump.29718-1 **



MATLAB is exiting because of fatal error

...

For questions on installation and deployment of MATLAB in Development or Production, please contact:

...

Description: This file is used to pass variables and configurations to the Java JVM used by MATLAB.
Location:
<matlabroot>/bin/<architecture>/java.opts
e.g., in Development environment: /afs/slac/g/lcls/package/matlab/2019a/bin/glnxa64/java.opts

Below are the working java.opts files for Development and Production.

2012a

Development
Code Block
languagetext
-Xbootclasspath/p:/afs/slac/g/lcls/package/iona/orbacus/prod/JOB/lib/OB.jar
-DAIDA_NAMESERVER_IOR_URL=http://mccas0.slac.stanford.edu/aida/NameServerPROD.ior
-DOOC_COSEVENTCONFIG_PATHNAME=/afs/slac/g/lcls/package/err/common/script/ooc_CosEvent_server.conf
-DAIDA_CLIENT_TIMEOUT=90
-DEPICS_PVA_SERVER_PORT=5075
-DEPICS_PVA_BROADCAST_PORT=5076
-DEPICS_PVA_AUTO_ADDR_LIST=FALSE
-DEPICS_PVA_ADDR_LIST=134.79.219.255 lcls-dev1.slac.stanford.edu mcc-simul.slac.stanford.edu
-Dcom.cosylab.epics.caj.CAJContext.addr_list=134.79.219.255 172.26.97.63
-Dcom.cosylab.epics.caj.CAJContext.auto_addr_list=false
-Dcom.cosylab.epics.caj.CAJContext.max_array_bytes=80000000
-Dcom.cosylab.epics.caj.CAJContext.repeater_port=5067
-Dcom.cosylab.epics.caj.CAJContext.server_port=5066
Production
Code Block
languagetext
-Xbootclasspath/p:/usr/local/lcls/package/iona/orbacus/prod/JOB/lib/OB.jar
-DAIDA_NAMESERVER_IOR_URL=http://mccas0.slac.stanford.edu/aida/NameServerPROD.ior
-DOOC_COSEVENTCONFIG_PATHNAME=/u1/lcls/tools/orbacus/ooc_CosEvent_server.conf
-DAIDA_CLIENT_TIMEOUT=90
-DEPICS_PVA_SERVER_PORT=5075
-DEPICS_PVA_BROADCAST_PORT=5076
-DEPICS_PVA_AUTO_ADDR_LIST=FALSE
-DEPICS_PVA_ADDR_LIST=172.27.3.255 172.27.131.255 172.27.43.255 172.21.40.63 mcc-dmz mccas0.slac.stanford.edu
-Dcom.cosylab.epics.caj.CAJContext.addr_list=172.27.3.255:5068 mcc-dmz 172.21.40.63:5064 172.27.72.24:5070 172.27.131.255:5068 172.27.43.255:5068
-Dcom.cosylab.epics.caj.CAJContext.auto_addr_list=false
-Dcom.cosylab.epics.caj.CAJContext.max_array_bytes=80000000
-Dcom.cosylab.epics.caj.CAJContext.repeater_port=5069
-Dcom.cosylab.epics.caj.CAJContext.server_port=5068

2019a and 2020a

Development
Code Block
languagetext
-Xbootclasspath/p:/afs/slac/g/lcls/package/iona/orbacus/prod/JOB/lib/OB.jar
-DAIDA_NAMESERVER_IOR_URL=http://mccas0.slac.stanford.edu/aida/NameServerPROD.ior
-DOOC_COSEVENTCONFIG_PATHNAME=/afs/slac/g/lcls/package/err/common/script/ooc_CosEvent_server.conf
-DAIDA_CLIENT_TIMEOUT=90
-Dgov.aps.jca.jni.JNIContext.jca.use_env=true
-Djca.use_env=true
-DEPICS_PVA_SERVER_PORT=5075
-DEPICS_PVA_BROADCAST_PORT=5076
-DEPICS_PVA_AUTO_ADDR_LIST=FALSE
-DEPICS_PVA_ADDR_LIST=134.79.219.255 lcls-dev1.slac.stanford.edu mcc-simul.slac.stanford.edu
Production
Code Block
languagetext
-Xbootclasspath/p:/usr/local/lcls/package/iona/orbacus/prod/JOB/lib/OB.jar
-DAIDA_NAMESERVER_IOR_URL=http://mccas0.slac.stanford.edu/aida/NameServerPROD.ior
-DOOC_COSEVENTCONFIG_PATHNAME=/u1/lcls/tools/orbacus/ooc_CosEvent_server.conf
-DAIDA_CLIENT_TIMEOUT=90
-Dgov.aps.jca.jni.JNIContext.jca.use_env=true
-Djca.use_env=true
-DEPICS_PVA_SERVER_PORT=5075
-DEPICS_PVA_BROADCAST_PORT=5076
-DEPICS_PVA_AUTO_ADDR_LIST=FALSE
-DEPICS_PVA_ADDR_LIST=172.27.3.255 172.27.131.255 172.27.43.255 172.21.40.63 mcc-dmz mccas0.slac.stanford.edu

...

Description: This file is used to augment the Java classpath used by MATLAB.
Location:
<matlabroot>/toolbox/local/classpath.txt
e.g., in Development environment: /afs/slac/g/lcls/package/matlab/2019a/toolbox/local/classpath.txt

Below are the working changes to the default MATLAB classpath.txt files for Development and Production.

Note

The lines listed for each file below must be APPENDED to the end of the existing default MATLAB classpath.txt file for the configuration to work. Do not remove the preceding lines in the default MATLAB classpath.txt file.

2012a

Development
Code Block
languagetext
# Additions to classpath.txt
/afs/slac/g/lcls/package/oracle/product/11.1.0.6/client/jdbc/lib/ojdbc5.jar
/afs/slac/g/lcls/package/iona/orbacus/prod/JOB/lib/OB.jar
/afs/slac/g/lcls/package/iona/orbacus/prod/JOB/lib/OBEvent.jar
/afs/slac/g/lcls/package/iona/orbacus/prod/JOB/lib/OBUtil.jar
/afs/slac/g/lcls/physics/package/except/lib/except.jar
/afs/slac/g/lcls/physics/package/err/lib/err.jar
/afs/slac/g/lcls/physics/package/aida/lib/aida.jar
/afs/slac/g/lcls/physics/release/hlaExtensions/hlaExtensions-R1-2-13/jar/hlaExtensions.jar
/afs/slac/g/lcls/physics/release/xal4lcls-R0-8-4A/build/jar/ext.jar
/afs/slac/g/lcls/physics/release/xal4lcls-R0-8-4A/build/jar/xal.jar
/afs/slac/g/lcls/physics/release/hlaCommon/hlaCommon-R1-0-16/jar/hlaCommon.jar
/afs/slac/g/lcls/epics/extensions/extensions-R3-14-12/lib/linux-x86
#/usr/local/facet/tools/matlab/sdds/java/SDDS.jar
/afs/slac/g/lcls/physics/release/MessageLogAPI-R0-0-1A/jar/MessageLogAPI.jar
# integration with EPICSv4 (greg)
# Note that the following MUST be compiled so as to target a Java 6 compiler at most,
# since matlab 2012b of LCLS is shipped with Java 6. pvAccess as shipped requires Java 7.
# But we use a special source version, adapted by Matej to compile under java 6.
/afs/slac/g/lcls/epics/base/base-java6-R4-4-0/easyPVAJava-0.4.3.jar
/afs/slac/g/lcls/epics/base/base-java6-R4-4-0/pvAccessJava-4.2.0-Java6-SNAPSHOT.jar
/afs/slac/g/lcls/epics/base/base-java6-R4-4-0/pvDataJava-4.0.2.jar
Production
Code Block
languagetext
# Additions to classpath.txt
/usr/local/lcls/package/oracle/product/11.1.0.6/client/jdbc/lib/ojdbc5.jar
/usr/local/lcls/package/iona/orbacus/prod/JOB/lib/OB.jar
/usr/local/lcls/package/iona/orbacus/prod/JOB/lib/OBEvent.jar
/usr/local/lcls/package/iona/orbacus/prod/JOB/lib/OBUtil.jar
/usr/local/lcls/physics/package/except/lib/except.jar
/usr/local/lcls/physics/package/err/lib/err.jar
/usr/local/lcls/physics/package/aida/lib/aida.jar
/usr/local/lcls/physics/release/hlaExtensions/hlaExtensions-R1-2-13/jar/hlaExtensions.jar
/usr/local/lcls/physics/release/xal4lcls-R0-8-4A/build/jar/ext.jar
/usr/local/lcls/physics/release/xal4lcls-R0-8-4A/build/jar/xal.jar
/usr/local/lcls/physics/release/hlaCommon/hlaCommon-R1-0-16/jar/hlaCommon.jar
/usr/local/lcls/epics/extensions/extensions-R3-14-12/lib/linux-x86
/usr/local/facet/tools/matlab/sdds/java/SDDS.jar
/usr/local/lcls/physics/release/MessageLogAPI-R0-0-1A/jar/MessageLogAPI.jar
# integration with EPICSv4 (greg)
# Note that the following MUST be compiled so as to target a Java 6 compiler at most,
# since matlab 2012b of LCLS is shipped with Java 6. pvAccess as shipped requires Java 7.
# But we use a special source version, adapted by Matej to compile under java 6.
/usr/local/lcls/epics/base/base-java6-R4-4-0/easyPVAJava-0.4.3.jar
/usr/local/lcls/epics/base/base-java6-R4-4-0/pvAccessJava-4.2.0-Java6-SNAPSHOT.jar
/usr/local/lcls/epics/base/base-java6-R4-4-0/pvDataJava-4.0.2.jar
2019a and 2020a
Development
Code Block
languagetext
# Additions to classpath.txt
# ****************************************************************************************************************
# EPICS 7 Java Interface
# ****************************************************************************************************************
/afs/slac/g/lcls/epics/java/epicsCoreJava/R7.0.2-1.0.0/products/epics-pvdata-6.1.2.jar
/afs/slac/g/lcls/epics/java/epicsCoreJava/R7.0.2-1.0.0/products/epics-pvaccess-5.1.2.jar
/afs/slac/g/lcls/epics/java/epicsCoreJava/R7.0.2-1.0.0/products/epics-ntypes-0.3.2.jar
/afs/slac/g/lcls/epics/java/epicsCoreJava/R7.0.2-1.0.0/products/epics-util-1.0.0.jar
/afs/slac/g/lcls/epics/java/epicsCoreJava/R7.0.2-1.0.0/products/jca-2.4.2.jar
#/afs/slac/g/lcls/epics/extensions/R0.5.0/javalib/jca.jar
/afs/slac/g/lcls/epics/java/pvaClientJava/R4.3.2-0.0.1/products/epics-pvaclient-4.3.2.jar
# ****************************************************************************************************************
# ****************************************************************************************************************
# Oracle Database connectivity
# ****************************************************************************************************************
/afs/slac/g/lcls/package/oracle/product/11.2.0.4/linux-x86_64/jdbc/lib/ojdbc5.jar
# ****************************************************************************************************************
# ****************************************************************************************************************
# IONA ORBacus ==> CORBA-based Client Server API
# ****************************************************************************************************************
/afs/slac/g/lcls/package/iona/orbacus/prod/JOB/lib/OB.jar
/afs/slac/g/lcls/package/iona/orbacus/prod/JOB/lib/OBEvent.jar
/afs/slac/g/lcls/package/iona/orbacus/prod/JOB/lib/OBUtil.jar
# ****************************************************************************************************************
# ****************************************************************************************************************
# AIDA Interface
# ****************************************************************************************************************
/afs/slac/g/lcls/physics/package/aida/lib/aida.jar
/afs/slac/g/lcls/physics/package/aida/lib/aidadp.jar
/afs/slac/g/lcls/physics/package/err/lib/err.jar
/afs/slac/g/lcls/package/except/lib/except.jar
# ****************************************************************************************************************
# ****************************************************************************************************************
# SLAC Java APIs
# ****************************************************************************************************************
/afs/slac/g/lcls/physics/release/hlaExtensions/hlaExtensions-R2-0-0/jar/hlaExtensions.jar
/afs/slac/g/lcls/physics/release/xal4lcls/xal4lcls-R1-0-0/build/jar/ext.jar
/afs/slac/g/lcls/physics/release/xal4lcls/xal4lcls-R1-0-0/build/jar/xal.jar
/afs/slac/g/lcls/physics/release/hlaCommon/hlaCommon-R2-0-0/jar/hlaCommon.jar
/afs/slac/g/lcls/epics/extensions/R0.5.0/lib/rhel6-x86_64
/afs/slac/g/lcls/physics/release/MessageLogAPI/MessageLogAPI-R1-0-0/jar/MessageLogAPI.jar
# ****************************************************************************************************************
Production
Code Block
languagetext
# Additions to classpath.txt
# ****************************************************************************************************************
# EPICS 7 Java Interface
# ****************************************************************************************************************
/usr/local/lcls/epics/java/epicsCoreJava/R7.0.2-1.0.0/products/epics-pvdata-6.1.2.jar
/usr/local/lcls/epics/java/epicsCoreJava/R7.0.2-1.0.0/products/epics-pvaccess-5.1.2.jar
/usr/local/lcls/epics/java/epicsCoreJava/R7.0.2-1.0.0/products/epics-ntypes-0.3.2.jar
/usr/local/lcls/epics/java/epicsCoreJava/R7.0.2-1.0.0/products/epics-util-1.0.0.jar
/usr/local/lcls/epics/java/epicsCoreJava/R7.0.2-1.0.0/products/jca-2.4.2.jar
#/usr/local/lcls/epics/extensions/R0.5.0/javalib/jca.jar
/usr/local/lcls/epics/java/pvaClientJava/R4.3.2-0.0.1/products/epics-pvaclient-4.3.2.jar
# ****************************************************************************************************************
# ****************************************************************************************************************
# Oracle Database connectivity
# ****************************************************************************************************************
/usr/local/lcls/package/oracle/product/11.2.0.4/linux-x86_64/jdbc/lib/ojdbc5.jar
# ****************************************************************************************************************
# ****************************************************************************************************************
# IONA ORBacus ==> CORBA-based Client Server API
# ****************************************************************************************************************
/usr/local/lcls/package/iona/orbacus/prod/JOB/lib/OB.jar
/usr/local/lcls/package/iona/orbacus/prod/JOB/lib/OBEvent.jar
/usr/local/lcls/package/iona/orbacus/prod/JOB/lib/OBUtil.jar
# ****************************************************************************************************************
# ****************************************************************************************************************
# AIDA Interface
# ****************************************************************************************************************
/usr/local/lcls/physics/package/aida/lib/aida.jar
/usr/local/lcls/physics/package/aida/lib/aidadp.jar
/usr/local/lcls/physics/package/err/lib/err.jar
/usr/local/lcls/package/except/lib/except.jar
# ****************************************************************************************************************
# ****************************************************************************************************************
# SLAC Java APIs
# ****************************************************************************************************************
/usr/local/lcls/physics/release/hlaExtensions/hlaExtensions-R2-0-0/jar/hlaExtensions.jar
/usr/local/lcls/physics/release/xal4lcls/xal4lcls-R1-0-0/build/jar/ext.jar
/usr/local/lcls/physics/release/xal4lcls/xal4lcls-R1-0-0/build/jar/xal.jar
/usr/local/lcls/physics/release/hlaCommon/hlaCommon-R2-0-0/jar/hlaCommon.jar
/usr/local/lcls/epics/extensions/R0.5.0/lib/rhel6-x86_64
/usr/local/facet/tools/matlab/sdds/java/SDDS.jar
/usr/local/lcls/physics/release/MessageLogAPI/MessageLogAPI-R1-0-0/jar/MessageLogAPI.jar
# ****************************************************************************************************************

...

Description: This file is used to augment the library search path used by MATLAB.

Location:
<matlabroot>/toolbox/local/librarypath.txt

e.g., in Development environment: /afs/slac/g/lcls/package/matlab/2019a/toolbox/local/librarypath.txt

Below are the working librarypath.txt files for Development and Production.

Note

The lines listed for each file below must be APPENDED to the end of the existing default MATLAB librarypath.txt file for the configuration to work. Do not remove the preceding lines in the default MATLAB librarypath.txt file.

2012a

Development
Code Block
languagetext
/afs/slac/g/lcls/epics/extensions/extensions-R3-14-12/lib/linux-x86
/afs/slac/g/lcls/epics/base/base-R3-14-12/lib/linux-x86
Production
Code Block
languagetext
/usr/local/lcls/epics/extensions/extensions-R3-14-12/lib/linux-x86
/usr/local/lcls/epics/base/base-R3-14-12/lib/linux-x86

2019a and 2020a

Development
Code Block
languagetext
/afs/slac/g/lcls/epics/extensions/R0.5.0/lib/rhel6-x86_64
/afs/slac/g/lcls/epics/base/R7.0.2-1.0/lib/rhel6-x86_64
/afs/slac/g/lcls/package/oracle/product/11.2.0.4/linux-x86_64/lib
Production
Code Block
languagetext
/usr/local/lcls/epics/extensions/R0.5.0/lib/rhel6-x86_64
/usr/local/lcls/epics/base/R7.0.2-1.0/lib/rhel6-x86_64
/usr/local/lcls/package/oracle/product/11.2.0.4/linux-x86_64/lib

...

If you need to use a MATLAB environment configuration that does not match the default environment provided in Development or Production, you will need to create your own java.opts, classpath.txt or librarypath.txt files in your working directory prior to launching MATLAB.

It is strongly recommended to only override the files needed in your local workspace, since MATLAB will inspect your current working directory before looking at the global configuration files.

If you need to connect to a different set of EPICS servers, copy the java.opts file from one of the locations above to your local working directory and modify it according to your needs.

If you need to test a new JAR file, copy the classpath.txt file from one of the locations above to your local working directory and modify it according to your needs.

If you need to test a new library to add to the library path, copy the librarypath.txt file from one of the locations above to your local working directory and modify it according to your needs.

Warning
Never try to modify the existing global configuration files. If you need changes made to the global configuration files, consult the MATLAB admins for LCLS Development and Production (TID-ACS and EED Systems Group). Any changes to the global MATLAB configuration must be approved and implemented by those groups.