Polyspace Bug Finder Polyspace Code Prover - MathWorks · Polyspace Bug Finder and Polyspace Code...
Transcript of Polyspace Bug Finder Polyspace Code Prover - MathWorks · Polyspace Bug Finder and Polyspace Code...
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 1
Polyspace Bug Finder
Polyspace Code Prover
Polyspace R2013b Installation Guide
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 2
Table des matières Polyspace R2013b in a nutshell (for the C and C++ products) ...................................................................... 3
Dependencies ................................................................................................................................................ 3
Both products on a single machine (no batch mode) ................................................................................... 4
Products to install ...................................................................................................................................... 4
Licenses ..................................................................................................................................................... 5
Polyspace usage ........................................................................................................................................ 6
Products on two different machines (or more) ............................................................................................ 7
Products to Install ...................................................................................................................................... 8
On the Desktop side (each) ................................................................................................................... 8
On each Cluster side (first cluster) ........................................................................................................ 8
Licenses ..................................................................................................................................................... 9
Services ...................................................................................................................................................... 9
On first Cluster side ............................................................................................................................... 9
Set preference on the desktop ................................................................................................................ 11
Start a Batch mode job ........................................................................................................................ 12
Manage more than one worker .............................................................................................................. 12
Both Products on a single machine with batch mode ................................................................................. 15
Installation ............................................................................................................................................... 15
Licenses ................................................................................................................................................... 15
Services .................................................................................................................................................... 16
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 3
Polyspace R2013b in a nutshell (for the C and C++ products)
Polyspace Bug Finder and Polyspace Code Prover are now “on top of MATLAB“ and take benefits
of it:
o Polyspace products are now on the MATLAB&SIMULINK DVD
o MATLAB can be launched from the Polyspace products
o Parallel Computational Toolbox (PCT)/MATLAB Distributed Computing Server
(MDCS) are now used to send remote analysis and verifications (nominated as
Batch mode later in this document)
This document is intended to describe the three kind of installation we can do for Polyspace
products: desktop mode installation, batch mode installation on two different machines
(standard installation) and batch mode installation on the same machine. The document
describes a Windows system install but can be applied to Linux also.
This document contains ONLY the information specific to Polyspace and do not describe steps
about how to get a (1) FIK, (2) launch installation, (3) do an activation, and (4) set up a FlexNet
license manager service that are standard operations when installing a MathWorks product. If
you are interested also by one of the previous (item), please refer to document at root of install
DVD folder: install_guide.pdf or to this link
http://www.mathworks.com/com/help/install/index.html .
Dependencies This configuration of Polyspace products implies dependencies between the different
components, but other dependencies have also been implemented to define a new business
approach.
Here are the main ones:
Polyspace interfaces require MATLAB to work.
Polyspace Code Prover requires Polyspace Bug Finder to run, and a Polyspace Bug finder
license is required to view Polyspace Code Prover results.
Computer cluster requires MDCS.
Desktop computers require PCT to submit jobs (Polyspace Code Prover verifications or
Polyspace Bug Finder analysis) to a cluster.
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 4
Both products on a single machine (no batch mode) In this configuration, Polyspace Code Prover and Polyspace Bug Finder can be used on a
(powerful) Desktop machine. No PCT/MDCS toolboxes are required, but then there is no
possibility to queue verifications and analyses.
The Polyspace user interfaces have to be stay opened; otherwise the verification or the analysis
will stop.
Figure: Desktop mode
Products to install
FIK requires at least installation on the same machine the following products:
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 5
Figure: Product Selection for a desktop mode only (no need of PCT).
Note that a “License Manager 11.11” is also necessary for Concurrent Network licenses
management.
Licenses
After activation using MATLAB\bin\win64\activate_matlab.exe, you should find in
the MATLAB\licenses folder, a file with a suffix .lic or .dat and contents are
increments:
MATLAB
o License for the MATLAB Interface.
PolySpace_Bug_Finder
o License for the Polyspace UIs. It is uncounted, so you can open as many
interfaces as you want and review either Polyspace Code Prover or Polyspace Bug
Finder interface.
PolySpace_Bug_Finder_Engine
o License counted. This increment is used when an analysis or verification is
launched.
PolySpace_Server_C_CPP
o License counted. This increment allows to run a Code Prover verification.
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 6
Polyspace usage
Polyspace UI commands are:
MATLAB\polyspace\bin\polyspace-code-prover.exe
MATLAB\polyspace\bin\polyspace-bug-finder.exe
Command line versions:
MATLAB\polyspace\bin\polyspace-code-prover-nodesktop.exe –
lang [c|cpp]
MATLAB\polyspace\bin\polyspace-bug-finder-nodesktop.exe –
lang [c|cpp]
All commands around Polyspace are located in MATLAB\polyspace\bin
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 7
Products on two different machines (or more) A Desktop is used to launch the batch verifications/analyses. That is also on the Desktop that
the results are opened and reviewed.
A Cluster computer is now used to run batch verifications (with the Code Prover) or batch
analyses (with the Bug Finder) out of a graphical interface, i.e. as a simple process.
With this configuration, there is no need to open the interfaces on the server. MDCS is installed
on a remote computer
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 8
Products to Install
On the Desktop side (each)
Figure:Product to install on the desktop side.
On each Cluster side (first cluster)
Figure: Product to install on the cluster side.
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 9
Note that a “License Manager 11.11” is only necessary to install on one cluster for Concurrent
Network licenses management.
Licenses On the Desktop side, license.lic is located in MATLAB\licenses with the following DC increments:
MATLAB
Distrib_Computing_Toolbox
o Allow to establish communication with Cluster
PolySpace_Bug_Finder
PolySpace_Bug_Finder_Engine
On the Cluster side, a license.lic file contains the following CN increments and attached to the FlexNet
MathWorks licenses manager:
MATLAB_Distrib_Comp_Engine
o Counted license with 16 possible workers
PolySpace_Bug_Finder_Engine
o Counted license for Polyspace Bug Finder
PolySpace_Server_C_CPP
o Counted license for Polyspace Code Prover
Note that on the cluster side, license located in MATLAB\licenses sub-folder described location of
The MathWorks FlexNet license manager:
SERVER <localhost> <hostid> [port]
USE_SERVER
where localhost is the location of the MathWorks Flexnet server and hostid, id provided during
activation.
Services
On first Cluster side
We have to launch the polyspace-rl-manager.exe command in order to set up the services:
MATLAB\Polyspace\bin\polsypace-rl-manager.exe
Note that it is recommended to execute it with administration rights or using right click and select “Run
as administrator”. Then it opens a small Apps allowing to
1. Start Polyspace web metrics tomcat service (polyspaced) allowing to manage results from a Web
browser.
2. Start MDCE service with one worker. It starts a MathWorks Job Scheduler (MJS) and an
associated worker.
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 10
The MJS will manage the queue of jobs sent from any desktop.
The worker will be used to run a verification (Polyspace Code Prover) or an analysis (Polyspace
Bug Finder).
Figure: Metrics and Remote Server Settings.
You have to enter your password and let default options. The button “Start Daemon” will start the MDCE
service and polyspaced service on the Cluster side.
If you have more than one cluster, then you need to open admincenter on first cluster side
(matlabroot\toolbox\distcomp\bin\admincenter.bat), add all hosts where clusters have
been installed (see Manage more than one worker), create associated workers and attach each of
worker to already existing MJS: see section Manage more than one worker.
Note: refer to MDCS documentation (step 4) to install mdce at boot time.
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 11
Set preference on the desktop On the desktop side, open a Polyspace User Interface (Polyspace UI), and go to the Preferences menu:
Figure: MDCS cluster configuration on the Desktop.
Enter the name of your server in “Job Scheduler host name”. Figure above shows
“localhost” but you can also type an IP address. If everything is fine, you are ready to launch a
remote verification.
Save and close the Preferences, and click on Spooler icon:
Figure: Spooler icon in icon toolbar.
It will open the spooler. If everything’s fine, you will see the queue of jobs on the server:
Figure: a Spooler view.
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 12
Start a Batch mode job
Last step consists in launching a remote verification or remote analysis, go to “Distributed Computing”
and activate “Batch” (see figure below).
Figure: “Batch” mode in Polyspace Code Prover.
You are all set.
Manage more than one worker In such case it means that you have more than one Polyspace Bug Finder and Polyspace Code Prover
concurrent license (CN) on the cluster. A worker is associated to one license on the server.
To add N worker to the MJS, it is mandatory to install first mdcs and Polyspace on each host (machine)
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 13
Figure: Install next cluster (on each host).
As soon as each cluster has been installed, you have to start mdce on each. Please refer to MDCS system
administrator’s guide to do so: in a summary you need to start mdce service on the cluster
(MATLAB\toolbox\distcomp\bin\mdce install;
MATLAB\toolbox\distcomp\bin\mdce start)
Then use the admincenter tool located on the first cluster to link all workers to the first MathWorks Job
Scheduler (MJS):
MATLAB\toolbox\distcomp\bin\admincenter.bat
You have to select the available MathWorks Job Scheduler available and add the N workers located on
the N clusters (see documentation Configure for a MJS).
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 14
Figure: Admin Center tool.
On the previous figure, three workers have been associated to the MJS called PS_MJS on host gnb-as01-
ct6-64:
One cluster contains two workers (gnb-as01-ct6-64 host)
The second cluster has been installed on gnb-as02-ct6-64 host where one worker has been
declared and started.
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 15
Both Products on a single machine with batch mode In this configuration, a single machine is the desktop and the cluster. PCT and MDCS have then
to be installed.
Installation Let’s see what you need to do if you want to install with one have one of the three configurations:
Figure:Product to install on a single machine.
Licenses
After executing activation command, you will get a license file in MATLAB\licenses sub-
folder that you will cut in three pieces: two licenses for the “desktop side” and one for the
FlexNet license manager server
license.lic located in MATLAB\licenses with Designated Computer (DC)
increments:
o MATLAB
o Distrib_Computing_Toolbox
o PolySpace_Bug_Finder
o PolySpace_Bug_Finder_Engine
network.lic located in MATLAB\licenses. It contains the following:
SERVER localhost <hostid> [port]
USE_SERVER
Where hostid and [port] have to be set. hostid has been required during
activation
Polyspace Advanced Support Group 2013
The MathWorks, copyright 2013-2014 – version 1.1 Page 16
license.dat located near the FlexNet license manager which is located by default in
MATLAB\etc:
SERVER localhost <hostid>
MLM <pathto>\MATLAB\etc\MLM.exe
INCREMENT MATLAB_Distrib_Comp_Engine …
INCREMENT PolySpace_Bug_Finder_Engine …
INCREMENT PolySpace_Server_C_CPP …
Services Three services will run on the machine:
1. Flexnet service that allows to manage concurrent licenses
Figure: FLEXnet service on a Windows system
2. PolySpace service that allows to manage Polyspace web metrics database (see “On the cluster
side” §)
Figure: polyspaced service on a Windows system.
3. MathWorks MDCE service that allows to manage the MJS and the worker (see On the cluster
side” §)
Figure: mdce service on a Windows system.