Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)

using Inspector with third party software

Rodrigues__Pedro
Beginner
689 Views

   Hello

     I use Fortran third party software named Winteracter to build engineering app. My simple question is how can I run inspector outside Visual studio and inside Winteracter to perform Static security analysys in the code. My main concern is about uninitialized variables. Is there any compiler switch that I can add to make inspector avaiable during the building?

    Thanks in advance

                         Peter

0 Kudos
18 Replies
Peter_W_Intel
Employee
689 Views
I assume that Winteracter is SDK tookit, including IDE - you never work on Visual Studio. Am I right? You can use Static Security Analysys to check your source code, but Intel Fortran Compiler should be used. Here is an example: C:\temp\tmp\ipo_samples>ifort /Od /Qdiag-enable:sc3 /Qdiag-enbale:sc-full ipo_sam ple_sum.f90 ipo_sample_init.f90 ipo_sample_main.f90 Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Inte l(R) 64, Version 13.0.1.119 Build 20121008 Copyright (C) 1985-2012 Intel Corporation. All rights reserved. ifort: command line warning #10006: ignoring unknown option '/Qdiagenbale:sc-ful l' ifort: remark #10336: Static analysis complete; results available in ".\r003sc\r 003sc.inspxe" Finally you can use Inspector XE to open r003sc.inspxe
0 Kudos
Rodrigues__Pedro
Beginner
689 Views
Thanks for your answer I always use winteracter and never use Visual studio. I used the /Qdiag-enable:sc3 but I got this: test2.obj : warning LNK4229: invalid directive '/Intel(R) compiler non-linkable IL object file' encountered; ignored resource.obj : warning LNK4229: invalid directive '/Intel(R) compiler non-linkable IL object file' encountered; ignored LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup test2.exe : fatal error LNK1120: 1 unresolved externals How can I solve this? thanks in advance
0 Kudos
Rodrigues__Pedro
Beginner
689 Views
I also would like to show you all the compiler switches under winteracter: fortran: -c -include:"c:\wint\lib.if8" /Qdiag-enable:sc3 resource: /i"c:\wint\include" linker: -subsystem:windows -machine:ix86
0 Kudos
Peter_W_Intel
Employee
689 Views
I wonder if you used ifort and with options I gave exactly. If so, would you please try example C:\Program Files (x86)\Intel\Composer XE 2013\Samples\en_US\Fortran\ipo_samples.zip? I assume that you already installed Intel Fortran Compiler, Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Inte l(R) 64, Version 13.0.1.119 Build 20121008 Copyright (C) 1985-2012 Intel Corporation. All rights reserved. I don't think that this is a your program specific issue.
0 Kudos
Rodrigues__Pedro
Beginner
689 Views
I used that example and it runs fine. No problems with static analysis with no errors or warnings reported. The main issue is inside Winteracter IDE perhaps with one compiler option. I also would like to say that Winteracter builds windows app. So, Winteracter is a windows app builder and not a console app like the one I tested. What can I do? Thanks in advance
0 Kudos
Rodrigues__Pedro
Beginner
689 Views
I only supressed /Od option because the compiler ignores it.
0 Kudos
Peter_W_Intel
Employee
689 Views
P R. wrote:

I used that example and it runs fine. No problems with static analysis with no errors or warnings reported. The main issue is inside Winteracter IDE perhaps with one compiler option. I also would like to say that Winteracter builds windows app. So, Winteracter is a windows app builder and not a console app like the one I tested. What can I do?

Thanks in advance

It seems that ifort can't recognize the directives from Winteracter, I downloaded a demo of OpenGL from http://www.winteracter.com/demo.htm C:\DemoGL>ifort /Od /Qdiag-enable:sc3 /Qdiag-enable:sc-full gldemo.f90 Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 1 3.0.1.119 Build 20121008 Copyright (C) 1985-2012 Intel Corporation. All rights reserved. gldemo.f90(33): error #7002: Error in opening the compiled module file. Check I NCLUDE paths. [WINTERACTER] USE WINTERACTER ----------^ gldemo.f90(39): error #6457: This derived type name has not been declared. [WI N_MESSAGE] TYPE(WIN_MESSAGE) :: MESSAGE ...... So only way is to do dynamical memory check, such as - C:\DemoGL>inspxe-cl -collect mi2 -knob resources=false -knob stack-depth=1 -- gl demo.exe Used suppression file(s): 33 new problem(s) found 1 Invalid memory access problem(s) detected 6 Invalid partial memory access problem(s) detected 22 Memory leak problem(s) detected 1 Memory not deallocated problem(s) detected 3 Uninitialized memory access problem(s) detected Then use inspxe-gui to check error report.
0 Kudos
Peter_W_Intel
Employee
689 Views
One thing is correct: Most of time, the user only checks memory errors in user's module(s), to do: C:\DemoGL>inspxe-cl -collect mi2 -knob resources=false -knob stack-depth=1 -module-filter-mode=include -module-filter=.\gldemo.exe -- gldemo.exe Used suppression file(s): 0 new problem(s) found It means there is no memory issue in gldemo.exe
0 Kudos
Rodrigues__Pedro
Beginner
689 Views
Thanks I would like to tell you that you can not perform a build action with demogl.f90 becuase you do not have acess to the winteracter .lib modules. So, if you still want to help me one this you should download from winteracter the trial version and then compile it. Otherwise all efforts are useless. thanks a lot for everything
0 Kudos
Peter_W_Intel
Employee
689 Views
P R. wrote:

Thanks

I would like to tell you that you can not perform a build action with demogl.f90 becuase you do not have acess to the winteracter .lib modules. So, if you still want to help me one this you should download from winteracter the trial version and then compile it. Otherwise all efforts are useless.

thanks a lot for everything

I never try to rebuild gldemo.f90 just use existing gldemo.exe, downloaded from demo site. I think that associated winteracter's lib already was linked to gldemo.exe
0 Kudos
Rodrigues__Pedro
Beginner
689 Views
Do you think that It possible to solve this? What can I do?
0 Kudos
Peter_W_Intel
Employee
689 Views
There is no way to use Static Security Analysis for source code of Winteracter basis. Inspector XE can dynamically analyze binary built by Winteracter (or other compiler) with debug info - if binary is PE, COFF, DWARF, etc standard format, there is no extra need to rebuild source.
0 Kudos
Rodrigues__Pedro
Beginner
689 Views
I do not know if I understood what you said. But, winteracter uses intel compiler. It calls ifort to make the build. So, it is weird that you say that there is no way to make static analysis. The last paragraph I really didn't understood....
0 Kudos
Peter_W_Intel
Employee
689 Views
P R. wrote:

I do not know if I understood what you said. But, winteracter uses intel compiler. It calls ifort to make the build. So, it is weird that you say that there is no way to make static analysis. The last paragraph I really didn't understood....

ifort doesn't understand directive "USE WINTERACTER", MACRO "WIN_MESSAGE" - which are defined in winteracter's environment? Copyright (C) 1985-2012 Intel Corporation. All rights reserved. gldemo.f90(33): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [WINTERACTER] USE WINTERACTER ----------^ gldemo.f90(39): error #6457: This derived type name has not been declared. [WIN_MESSAGE] TYPE(WIN_MESSAGE) :: MESSAGE
0 Kudos
Rodrigues__Pedro
Beginner
689 Views
Winteracter is the main module which allows the user to build easy windows app. When I compile any app. without /Qdiag-enable:sc3 no error is displayed and the app runs very well. When I use that option the error happen's (LNK 4229 warning and LNK 1120). But I never got the error that you are reporting about "USE WINTERACTER". Do you think that the LNK warning can be fixed understanding what happen's inside winteracter static library module?
0 Kudos
Peter_W_Intel
Employee
689 Views
With /Qdia-enable:sc3, ifort NEVER generates binary (exe) - I don't know why you had LNK error? It generates Result Directory of Inspector XE My command (Intel Composer XE 2013): ifort /Od /Qdiag-enable:sc3 /Qdiag-enable:sc-full gldemo.f90 I don't know why you didn't get error about "USE WINTERACTER" - maybe you worked in WINTERACTER command prompt. Did you use similar ifort command that I used?
0 Kudos
Rodrigues__Pedro
Beginner
689 Views
- As I told you before when I us /Qdia-enable:sc3 the error I get is this one: " test2.obj : warning LNK4229: invalid directive '/Intel(R) compiler non-linkable IL object file' encountered; ignored resource.obj : warning LNK4229: invalid directive '/Intel(R) compiler non-linkable IL object file' encountered; ignored LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup test2.exe : fatal error LNK1120: 1 unresolved externals" - I am working inside winteracter environment but if if build the app with command prompt the error is the same. I suppose that you get that message because you don't have acess to winteracter lib (winter.lib) which has winteracter module. Something must be possible to solve this. thanks
0 Kudos
Rodrigues__Pedro
Beginner
689 Views
It seems that using "xilink" and not "ifort" to link the objects solves the problem. But there is no way to invoke xilink inside winteracter. With ifort can we do the same?
0 Kudos
Reply