Polyspace Code Prover doesn't create a report after a remote execution via command line
11 次查看(过去 30 天)
显示 更早的评论
I'm trying to run Polyspace Code Prover by command line in Windows. I create an "-options-file" to configure Polyspace. I'm using the option "-batch" and "-scheduler" to use a remote server. I'd like to have a report in a pdf format in a location that I want. To have this, I put at the end of my options file these lines:
# name of the report
-report-output-name test1_Code
# template provided by Polyspace
-report-template C:\Program Files\Polyspace\R2019b\toolbox\polyspace\psrptgen\templates\Developer.rpt
# choose wich extension for the report [HTML|PDF|Word]
-report-output-format PDF
-results-dir C:\Polyspace_Workspace\Results
After running the command "polyspace-code-prover -options-file <path>\myOptionsFile.txt" by command line, everything is going well (no error) and if I verify in Polyspace tool->Open Job Monitor I can see my task that is being executed. However, when I verify in the path of the result (C:\Polyspace_Workspace\Results\Polyspace-Doc), there isn't the .pdf file and if I open the "ps_results.pscp" with Polyspace it gives me this warning:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/745264/image.png)
Does someone know how to generate the report when the remote server finishes the execution? I read this sentence that alarmed me:
"After the analysis, you might have to manually download the results from the cluster" at the link of the documentation https://it.mathworks.com/help/polyspace_code_prover_server/ref/runbugfinderorcodeproveranalysisonaremoteclusterbatch.html#bt51qas-2
Am I doing mistakes in creating the report? If further information is needed, I will provide it.
Thanks,
Alessandro
0 个评论
采纳的回答
Anirban
2021-9-22
编辑:Anirban
2021-9-23
Thanks for the question!
If you use the remote analysis options in the Polyspace user interface, the results are automatically downloaded after analysis and the report generation should occur fine.
At the command line, you have to explicitly download the results using the polyspace-jobs-manager command using the syntax:
polyspace-jobs-manager download -job ID -results-folder FolderPath
Once you submit a job, the compilation part of the analysis runs locally. Then, the data is submitted to the server. After submission, the results folder contains a file ID.txt that gives you the job ID (or even at the console, you can see the job ID). You can use the command polyspace-jobs-manager listjobs to check if the job with your ID is completed. Once completed, you can download the results using the above syntax. Then, you can use the polyspace-report-generator command to generate a report from the downloaded results.
As you can see, this is not as friendly as the automatic download and report generation in the UI. There are two stages where you have to implement some sort of spooling: check if the compilation is done and an ID is available, then later check if the job has completed on the server. If you are comfortable doing that, you can write a script that will do this. The desktop workflow was mainly designed to be interactive. So, even if there are commands available, it takes quite a bit of work to put them into a script where everything would be automated.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!