Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29343 Discussions

Interaction between Compiler and Project settings

WSinc
New Contributor I
2,495 Views

I am bringing this up because of an issue I just found - - -

I have two routines, one compiles and the other does not, both using the same USE statements.

At first, I though it might be the computer environment, because they were on two differnet computers.

however, since both are NOW on the same computer, and I get the same error messages.

 

One generates 7002 errors, having to do with the USE path.

They are on the same computer, same compiler, using the same VS 2010 shell.

 

The only thing I can think of offhand is the PROJECT settings. However, so far, I haven't found anything obvious that would cause the compiler to reject a USE statement because of the project settings. Maybe you would know ?

 

I have the latest compiler download, and WINDOWS 10.

 

 

0 Kudos
20 Replies
jimdempseyatthecove
Honored Contributor III
2,484 Views

Environment variables may be at issue.

Or, the failing project is likely targeting different folders than the successful project. Your Antivirus may be deleting, or quarantining, the .mod files of the failing project but not the successful project.

And Windows 10 may be an issue as well.

Jim Dempsey

0 Kudos
Steven_L_Intel1
Employee
2,484 Views

Bill, this wouldn't have to do with the MKL issue you wrote about earlier, would it? It would be helpful if you'd give actual details (complete text of error messages, maybe attach the .vfproj file from the two projects) rather than excerpt what you think is important.

There are project properties that affect the set of places USE looks in.

0 Kudos
WSinc
New Contributor I
2,484 Views

I have the anti-virus turned off. And that does not explain why one compiles and the other does not.

 

Anyway, TRAP is the one that fails, and TEST_GESV works, OK.

See if you can discern why they are different.

I apologize for not mentioning the MKL issue earlier, but I thought this was of a more general nature.

 

I am wondering why your upload cant find any of my project files. They are readily accessible from the

Windows directory search, but are invisible when I try to upload them.

0 Kudos
WSinc
New Contributor I
2,484 Views

Is there a tool that will dissect in detail the project settings?

The one that compiles has no mention of the MKL library, so its puzzling that it even works.

 

Maybe if I pay for the premium intel support, someone can remotely log on to my screen and take a direct look at this.

Especially since it wont upload any project files.

It says "allowed types" are .vfproj but still cannot see any project files.

so how should they be uploaded?

0 Kudos
Steven_L_Intel1
Employee
2,484 Views

The .vfproj file is just an XML file and is quite readable in a text editor. The build log (buildlog.htm) also has pretty much all the info you need to compare builds.

In the file upload dialog, change "Custom files" to "All files".

0 Kudos
WSinc
New Contributor I
2,484 Views

Ok, will try again - - 

I did look at the settings, but whatever the difference is , I could not tell.

0 Kudos
WSinc
New Contributor I
2,484 Views

I wanted to also suggest -

In all the engineering stuff I did before, the special library routines were BUNDLED with the basic Fortran, so we NEVER had to

go thru anything like this. Why cant Intel do likewise?

I just don't see the need for all this complicated stuff, that makes it so difficult for everyone.

 

Perhaps its because of the need for the F95 interface? But we could also download the source code,

and use that instead, if absolutely necessary.

0 Kudos
Steven_L_Intel1
Employee
2,484 Views

Intel MKL is indeed bundled with Fortran. You just have to select the option to use it. Some prefer to use their own advanced math libraries and would complain if we overrode their choice.

test_gesv selects the Parallel MKL libraries. trap does not specify MKL, so if your source has any USE statements that reference MKL modules, they won't be found.

Since you haven't shown the actual errors (build log would show this), I'm not sure if this is the information you need.

0 Kudos
WSinc
New Contributor I
2,484 Views

Correction: In the one that compiles, it does have a clause for "additional dependencies."

So, I will fix that one in  the other project, see what happens.....

I put that in the other one, but it still does not compile.

So I went back to the project settings, but could not find anything in the TEST_GESV

one about "additional dependencies" there either.

Why does this have to be so confusing ?

0 Kudos
Steven_L_Intel1
Employee
2,484 Views

I'm in the dark here, Bill. You haven't shown what goes wrong. Please attach a ZIP of the buildlog.htm from the Debug or Release folder that shows the problem. Please do not use Additional Dependencies if you are using MKL - use the compiler project property for MKL instead. I think you're making it more difficult than it needs to be.

0 Kudos
WSinc
New Contributor I
2,484 Views

Well, for some reason I am getting the "additional dependencies" clause (see below):

AdditionalDependencies="mkl_lapack95.lib"/>
                <Tool Name="VFResourceCompilerTool"/>
                <Tool Name="VFMidlTool" 

in the one that compiles, where I dont for the one that does not compile.

But I still cannot find anything in the project settings that would generate that.

Apparently, all that's needed is the USE statements, supposedly.

So that does not explain the Problem.

Both projects have the exact same USE statements, and are on the same computer.

0 Kudos
Steven_L_Intel1
Employee
2,484 Views

It is not true that "all that's needed is the USE statements". You need the USE statements plus some option that specifies the correct set of MKL libraries to link in. "Use Intel Math Kernel Library" is the simplest way to do that. You still have not shown the problem symptoms.

0 Kudos
WSinc
New Contributor I
2,484 Views

OK, here is the ZIP file for the one that does not work.

0 Kudos
WSinc
New Contributor I
2,484 Views

I still cannot find that "use MKL libraries" settings anywhere.

Is that under project properties? If not where?

If I can find that, I can try turning it on for the one that does NOT compile.

0 Kudos
Steven_L_Intel1
Employee
2,484 Views

Thanks for finally showing the error messages and project.

Project properties: Fortran > Libraries > Use Intel Math Kernel Library > Parallel

0 Kudos
WSinc
New Contributor I
2,484 Views

I just cannot find that "USE Math Kernel Library" option anywhere.

Is that disguised as something else?

OH, its under Fortran Libraries? I will try that one - - -

 

NOPE - the visual studio does not have that option -

Under "fortran" I dont see the option "libraries."

 

It must be disguised as something else.

0 Kudos
FortranFan
Honored Contributor III
2,484 Views

billsincl wrote:

I just cannot find that "USE Math Kernel Library" option anywhere. ..

Bill,

In Visual Studio, go to Project Properties -> Fortran -> Libraries:

mkl_0.png

0 Kudos
WSinc
New Contributor I
2,484 Views

I finally found it - so I guess the problem is solved.

 

Thanks for your help ! ! !

0 Kudos
FortranFan
Honored Contributor III
2,484 Views

Bill,

Consider the following simple code.  If one uses Visual Studio and tries to compile it without selecting the Intel Math Kernel Library option, one would get the same error as you show in Message #14:

program p

   use lapack95
   use f95_precision
   
   implicit none

   stop
   
end program p
------ Build started: Project: p, Configuration: Debug|Win32 ------

Compiling with Intel(R) Visual Fortran Compiler 16.0 [IA-32]...
p.f90
p.f90(3): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [LAPACK95]
p.f90(4): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [F95_PRECISION]
compilation aborted for p.f90 (code 1)

Build log written to  "file://p_BuildLog.htm"
p - 3 error(s), 0 warning(s)


---------------------- Done ----------------------

But if one tries the compilation with an appropriate selection from the drop-down for Intel Math Kernel library option, you will notice the code compiles without any errors or warnings.

So now, if you look back on this thread and review all the back and forth messages, hopefully you will realize the problem has a good shot of getting solved quickly if one supplies the appropriate information which, in this case, happened to be the html file for the build log.  Alternately, if one puts together a very small example (like the 10 line code snippet above) where there is nothing proprietary and zips up the entire folder and attaches it here, someone (usually Steve) can very quickly guide you to an answer.  

0 Kudos
WSinc
New Contributor I
2,378 Views

The reason I had trouble is: 

I was clicking on the word "Fortran" which only gives you a limited set of choices.

You have to click on the > symbol to get all the other choices.

Only then do you get the "libraries" option.

 

pretty subtle, I have to say - - 

0 Kudos
Reply