Appendix D
PDPTool Standalone Executable
This section explains how to install your standalone copy of pdptool.This is
a compiled binary of the application that can be run if MATLAB is not
installed on your system.The procedures differ between Windows and Unix/Mac
OSX.
If you encounter problems in installation, send an email to: pdplab-support@stanford.edu.
D.1 Installing under Linux
Install a standalone copy of pdptool on Linux using the following steps.
- Make a pdptool directory for yourself. Lets call it ’PDPStandAlone’.
mkdir PDPStandAlone
cd PDPStandAlone
- Download the latest distribution for unix into your new directory.
- Unzip the package with -
unzip -x pdptool_linuxpkg.zip
- rm pdptool_linuxpkg.zip
- You will see the following files -
- readme.txt - This describes essentially the same set of steps as this
section. Additionally , it might contain instruction on updating the
MCRInstaller on your computer.
- pdptool - This is the pdptool executable
- First read readme.txt. If this is your first time installation, you MUST
download and run MCRInstaller.bin first. If you have done the installation
previously, you are not required to run MCRInstaller again (i.e ignore step 7
and 8 ) UNLESS it is specified in the readme.txt file.
- If the MCR is not installed or if it is an older version, download the
MCRInsaller.bin file
- After downloading ,type ./MCRInstaller.bin at the shell prompt to
start the installation process.
- This will bring up a dialog box and start InstallShield wizard for
MATLAB Compiler Runtime.
- Click on ’Next’ button. You will be prompted for a directory name
to install it in. You can create a new directory under your home
directory or if you have root access, you can specfiy any other
directory on the system.Let us call this directory MCRRootDir for
future reference. Click the ’Next’ button.
- If the directory name is accepted, the install shield wizard will present
a summary information. You can now click the ’Install’ button to
initiate installation. It may take several minutes to complete this
process.
- Click on ’Finish’ to close the wizard.
- Set up the environment :
- If you are using bash shell - ( If you are not sure about your shell type
echo $SHELL on the command prompt). Place the following commands in
your .bash_profile file after replacing MCRRootDir with the name of the
directory in which you installed MCR Compiler Runtime( see step
7(c)).
.bash_profile file will be directly under your home directory.
Replace <version> with the MCR version intalled in step 7(c).
The files in MCRRootDir are installed under version specific directory name e.g v714
MCRROOT=MCRRootDir/<version>
MCRJRE=${MCRROOT}/sys/java/jre/glnxa64/jre/lib/amd64
LD_LIBRARY_PATH=${MCRROOT}/runtime/glnxa64:
${MCRROOT}/bin/glnxa64:
${MCRROOT/sys/os/glnxa64:
${MCRJRE/native_threads:
${MCRJRE}/server:
${MCRJRE}/client:
${MCRJRE}
export XAPPLRESDIR ${MCRROOT}/X11/app-defaults
export LD_LIBRARY_PATH ${LD_LIBRARY_PATH}
- If you are using C shell, place the following commands in your
.cshrc file after replacing MCRRootDir with the name of the
directory in which you installed MCR Compiler Runtime ( see step
7(c)).
.cshrc file will be directly under your home directory.
Replace <version> with the MCR version intalled in step 7(c).
The files in MCRRootDir are installed under version specific directory name e.g v714
set MCRROOT=MCRRootDir/<version>
set MCRJRE = ${MCRROOT}/sys/java/jre/glnxa64/jre/lib/amd64
set LD_LIBRARY_PATH = ${MCRROOT}/runtime/glnxa64:
${MCRROOT}/bin/glnxa64:
${MCRROOT}/sys/os/glnxa64:
${MCRJRE}/native_threads:
${MCRJRE}/server:
${MCRJRE}/client:
${MCRJRE}
setenv XAPPLRESDIR ${MCRROOT}/X11/app-defaults
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}
- Add pdptool executable to your PATH environment variable.
- If you are using bash shell - ( If you are not sure about your shell type
echo $SHELL on the command prompt).Place the following command in
your .bash_profile file. Replace pdptool_path with the full directory name
created in Step 1.
export PATH=${PATH}:pdptool_path
The above change to .bash_profile file will be applied when you source the file using the command:
source .bash_profile
- If you are using C shell, place the following command in your .cshrc
file
setenv PATH=${PATH}:pdptool_path
The above change to .cshrc file will be applied when you source the file using the command :
source .cshrc
- You are now ready to start using pdptool. For the most part, things will work
as when running pdptool within MATLAB, so you can carry out exercises and
create and run your own networks, as described in the main body of the
Handbook. Information specific to running the standalone version under Linux
is given in the next section.
D.2 Running under Linux
- If you have not already done so, Download the pdptool.zip file.
- Extract the archived files into a new directory called ’pdptool’ in your
home directory or any other location on your linux machine using any
archiving tool like unzip.
- Open a shell prompt and cd to your pdptool directory (e.g. cd
/home/Yourusername/pdptool).
- To bring up an existing exercise, change to the subdirectory containing
that exercise and then type pdptool exname.m at the shell prompt. For
example, enter ’cd pa’, then enter ’pdptool lin.m’ to start the lin exercise in
the pa directory. The exercise will load, and a subshell will be started with
the comand prompt ’>>pdp ’. Alternatively, you can just type ’pdptool’
at the shell prompt. The main pdp window will open and you can then
proceed to create a network or load an existing network if you are in the
directory containing the files relevant to this network.
- The following features should facilitate your use of the software:
- You can enter built-in MATLAB commands to the pdp command
prompt. For example, entering ’2/3’ will return ans = .66667.
Entering ’net’ will return the top-level constituents of the loaded
network, if any.
- The up and down arrow keys allow you to move up and down
through previous commands issued to the pdp prompt. Right and left
arrows allow movement within a line so that you can edit a provious
command.
- You can use Ctrl+C and Ctrl+P keys to copy and paste text between
the pdp prompt and outside the shell.
- You can copy text from the pdp command Prompt window to the
Clipboard by clicking and dragging the mouse to select the text to be
copied; then press enter or right-click to execute the copy. You can
then paste this information into an editor window to save to a file or
edit. Such a file could become the basis of a set of commands that
you could save in a script file (e.g., myscript.m) for execution when
needed, using the command runscript myscript.m.
D.3 Installing under Windows
Install a standalone copy of pdptool on windows using the following steps.
- Create a new folder for yourself. Lets call it ’PDPStandAlone’.
- Download the latest distribution for windows to your desktop.
- Unzip the package with any windows archiving utility, extracting all files into
your new folder. This will extract the following files -
- readme.txt - This describes essentially the same set of steps as this
section. Additionally , it might contain instruction on updating the
MCR on your computer.
- pdptool.exe - This is the pdptool executable.
- Delete pdptool_winpkg.zip
- Verify that MCR is installed on your system and is the version specified in the
readme file. If it is, continue to next step. The usual location for MCR is
C:\Program Files\MATLAB\MATLAB Compiler Runtime\<version >, where
<version >indicates the version number, e.g v714. If the MCR is not
installed or if it is an older version, download the MCRInsaller.exe
file
- After downloading double click on MCRInstaller.exe to start the
installation process.
- This will bring up a dialog box and start InstallShield wizard for
MATLAB Compiler Runtime.
- Follow the instructions, click on ’Next’ button to initiate the
installation process.
- When the installation is complete, click on ’Finish’ button to close
the wizard.
- Set up the environment : Note the full path to the PDPStandAlone folder
where you extracted the executable to. (for example, the path might be
’C:\Users\YourUserName\Desktop\PDPStandAlone’). Add this to the ’Path’
environment variable. You can do this easily by doing a right-click on ’My
computer’ , select properties, then select ’Advanced’ tab. It will have
an ’Environment Variables’ button. Click on it to get a dialog box
for setting envornment variables. Here, select ’Path’ in the ’System
Variables’ , then select edit, it will open up a small editbox with the
current path, enter a ’;’ (semi-colon), then add the path to the folder
containing pdptool.exe. Then Click on ’Ok’ and dismiss the properties
window.
- You are now ready to run pdptool. For the most part, things will work as when
running pdptool within MATLAB, so you can carry out exercises and create
and run your own networks, as described in the main body of the Handbook.
Information specific to running the standalone version under Windows is given
in the next section.
D.4 Running under Windows
- If you have not already done so, Download the pdptool.zip file.
- Extract the archived files into a new folder called ’pdptool’ to your Desktop
or any other location on computer. (Some methods of extraction may
create a directory called pdptool in the location you specify – others
extract all files to that location; this depends on the extractor you use and
the method of extraction).
- Open
a Windows MS/Dos Command Prompt window (Found under Start/All
Programs/Applications/Command Prompt), and, within that window, cd
to your pdptool directory (e.g., cd C:\YourUserName\Desktop\pdptool).
- To bring up an existing exercise, change to the subdirectory containing
that exercise and then type pdptool exname.m at the MS-DOS command
prompt. For example, enter ’cd pa’, then enter ’pdptool lin.m’ to start
the lin exercise in the pa directory. The exercise will load, and a subshell
will be started within the MS-DOS Command Prompt window with the
comand prompt ’>>pdp’. Alternatively, you can just type ’pdptool’ at
the command prompt. The main pdp window will open and you can then
proceed to create a network or load an existing network if you are in the
directory containing the files relevant to this network.
- The following features should facilitate your use of the software:
- You can enter built-in matlab commands to the pdp command
prompt. For example, entering ’2/3’ will return ans = .66667.
Entering ’net’ will return the top-level constituents of the loaded
network, if any.
- The up and down arrow keys allow you to move up and down through
previous commands issued to the pdp command prompt or the pdp
prompt (whichever is active). Right and left arrows allow movement
within a line so that you can edit a provious command.
- You can allow cut and paste operations into the command prompt
window by activating a mode called ’QuickEdit Mode’ at the
command prompt. This mode can be set by right-clicking on the
title bar of the command prompt window, then selecting ’Properties’
then selecting ’QuickEdit Mode’ under ’Options’. You can also select
QuickEdit mode under ’Defaults’ in the same way to have this option
set automatically for future sessions.
- You can now copy text from the pdp command Prompt window to
the Clipboard by clicking and dragging the mouse to select the text
to be copied; then press enter or right-click to execute the copy. You
can then paste this information into an editor window to save to a
file or edit. Such a file could become the basis of a set of commands
that you could save in a script file (e.g., myscript.m) for execution
when needed, using the command runscript myscript.m.
- You can also paste text into the command window that has been saved to
the clipboard (e.g., with Ctrl+C or the Copy menu command). Once the
text you want is in the clipboard, simply Right Click at the command
prompt to enter the information. See what happens when you Copy the
following text to the clipboard and then Right Click at the command
prompt, and (if necessary) then hit enter:
2 +2; ans/3
D.5 Installing under Mac OSX
Install a standalone copy of pdptool on a Mac OS X version 10.5 or above using the
following steps.
- Create a new folder for yourself. Lets call it ’PDPStandAlone’.
- Download the latest distribution for mac osx to your desktop.
- Unzip the package with any archiving utility, extracting all files into your
new folder.
- Delete pdptool_osxpkg.zip
- You will see the following files -
- pdptool - This is the pdptool executable
- pdptool.app
- run_pdptool.sh (shell script run to temporarily set environment
variables and execute the application)
- readme.txt - This describes essentially the same set of steps as this
section. Additionally , it might contain instruction on updating the
MCRInstaller on your computer.
- First read readme.txt. If this is your first time installation, you MUST
download and run MCRInstaller.dmg first. Verify that MCR is
installed on your system and is the version specified in the readme
file. If it is, continue to next step. The usual location for MCR is
/Applications/MATLAB/MATLAB_Compiler_Runtime/<version >, where
<version >indicates the version number, e.g v714. If the MCR is not
installed or if it is an older version, download the MCRInsaller.exe
file
- After downloading, double click on MCRInstaller.dmg or select Open
menu item from the File menu on Finder window.
- This will open a window with MCRInstaller.pkg file in it.
- Double click on it to start the installation wizard.This will setup
MCR on your system.
- Typically, it is installed in
/Applications/MATLAB/MATLAB_Compiler_Runtime/<version
>. Here, <version >refers to directory name that reflects the mcr
version that is being installed. Currently it is v714. You can click on
’Choose Install Location’ button to select a Destination folder of you
choice for installation.
- Click the ’Install’ button to begin the installation.
- It may take a few minutes to complete the process after which you
will get a ’Successful installation’ dialog box.
- Set up the environment-
- Open run_pdptool.sh file using any editor.
- Edit line 15 to set MCRROOT variable to the destination folder you
selected in Step 6(d). It is by default set to the destination folder
/Applications/MATLAB/MATLAB_Compiler_Runtime/ <version
>. Replace <version >with the MCR version intalled in step 7(c).The
MCR files are installed under version specific directory name e.g v714.
- Save and close run_pdptool.sh file
- If you are using bash shell - ( If you are not sure about your shell
type echo $SHELL on the command prompt). Place the following in
your .bash_profile file. Replace pdptool_path with the full directory
name created in Step 1 of this section.
export PATH=${PATH}:pdptool_path
- The above changes to .bash_profile file will be applied when you source
the file using the command:
source .bash_profile
- If you are using C shell - ( If you are not sure about your shell type echo
$SHELL on the command prompt). Place the following in your
.cshrc/.tcshrc file. Replace pdptool_path with the full directory name
created in Step 1 of this section.
setenv PATH=${PATH}:pdptool_path
- The above changes to .cshrc file will be applied when you source the file
using the command:
source .cshrc
- You are now ready to start using pdptool. For the most part, things will work
as when running pdptool within MATLAB, so you can carry out exercises and
create and run your own networks, as described in the main body of the
Handbook. Information specific to running the standalone version under OSX is
given in the next section.
D.6 Running under Mac OSX
- If you have not already done so, Download the pdptool.zip file.
- Extract the archived files into a new directory called ’pdptool’ in your
home directory or any other location on your linux machine using any
archiving tool like unzip.
- Open a terminal window and cd to your pdptool directory (e.g.cd
/Users/Yourusername/pdptool).
- To bring up an existing exercise, change to the subdirectory containing
that exercise and then type pdptool exname.m at the terminal shell
prompt. For example, enter ’cd pa’, then enter ’pdptool lin.m’ to start the
lin exercise in the pa directory. The exercise will load, and a subshell will
be started with the comand prompt ’>>pdp ’. Alternatively, you can just
type ’pdptool’ at the shell prompt. The main pdp window will open and
you can then proceed to create a network or load an existing network if
you are in the directory containing the files relevant to this network.
- The following features should facilitate your use of the software:
- You can enter built-in MATLAB commands to the pdp command
prompt. For example, entering ’2/3’ will return ans = .66667.
Entering ’net’ will return the top-level constituents of the loaded
network, if any.
- The up and down arrow keys allow you to move up and down
through previous commands issued to the pdp prompt. Right and left
arrows allow movement within a line so that you can edit a provious
command.
- You can use Command+C and Command+P keys to copy and paste
text between the pdp prompt and outside the shell.
- You can copy text from the pdp command Prompt window to the
Clipboard by clicking and dragging the mouse to select the text to be
copied; then press enter or right-click to execute the copy. You can
then paste this information into an editor window to save to a file or
edit. Such a file could become the basis of a set of commands that
you could save in a script file (e.g., myscript.m) for execution when
needed, using the command runscript myscript.m.