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

Not working in VS2013

Earl_Geddes
New Contributor I
1,101 Views

I have long used VB structures to implement complex numbers in VB which can be passed to and from Fortran subs.  This has always worked fine in the past.  Recently, since upgrading to VS2013 I find that when debugging the code I cannot view the local variables in the Fortran code.  The debugger tells me that all the complex variables are "CXX0017: Error: symbol "xx" not found" or "Cxx068: Error: type not supported".  Has something changed in VS2013, or in IVF?

For what it is worth the code seems to work fine, I just can't view the variables.  Hence when the code is not working fine it is virtually impossible to debug.

 

I have example code if this helps.

Public Class Form1

Friend test(1) As Complex

Public Sub New()

Dim result As Double

' This call is required by the designer.

InitializeComponent()

test(0).Real = 1.0

test(0).Imag = 0.0

test(1).Real = 0.0

test(1).Imag = 1.0

' Add any initialization after the InitializeComponent() call.

Dll1(test(0), result)

End Sub

end class

subroutine Dll1( test, result_ )

! Expose subroutine Dll1 to users of this DLL

!DEC$ ATTRIBUTES DLLEXPORT::Dll1

!DEC$ ATTRIBUTES ALIAS:'Dll1' :: Dll1

!DEC$ ATTRIBUTES REFERENCE :: test

!DEC$ ATTRIBUTES Value :: Result_

complex(8) test(0:1)

real(8) result_

complex(8) temp

temp = test(0) * test(1)

result_ = real(temp)

return

end subroutine Dll1

Option Strict Off

Option Explicit On

Module numerical

'Public Structure Complex

Public Real As Double

Public Imag As Double

 

Return c

End Operator

Public Overloads Shared Operator *(ByVal a As Double, b As Complex) As Complex

Dim c As Complex

c.Real = a * b.Real

c.Imag = a * b.Imag

End Structure

Declare Sub Dll1 Lib "Dll1.dll" ( ByRef test As Complex, ByVal result As Double)

 End Module

0 Kudos
1 Solution
Earl_Geddes
New Contributor I
1,101 Views

Hi Steve

I located the problem.  In VS Options/Debugging/General) I had check the "Use Managed Compatibility Mode".  Changing this corrected the problem.

I remember setting this option to correct for some previous problems, but I don't remember what that was at this point.  If I discover that situation again I will repost.

Thanks for your help.

View solution in original post

0 Kudos
13 Replies
Steven_L_Intel1
Employee
1,101 Views

The Fortran debugger support isn't getting loaded. What is the exact version of Intel Fortran you have installed? In VS2013, select Help > About. Look for Intel Visual Fortran and tell us what "Package ID" is reported.

If you are using a version that supports VS2013, which would be 2013_sp1.1 or later, then I suggest uninstalling Fortran, deleting the Intel Fortran folder under Program Files (x86)\Microsoft Visual Studio 12.0, then reinstalling.

0 Kudos
Earl_Geddes
New Contributor I
1,101 Views

I have the latest version installed.

Can I just reinstall from w_fcompxe_novsshell_2013_sp1.1.139 (1).exe?  Will I need to lookup some code for this to install?

0 Kudos
Steven_L_Intel1
Employee
1,101 Views

Well, that's not the latest version, but it should work. Yes, you can reinstall from that and won't need any code. Make sure you do the uninstall/folder delete/reinstall, not just a "repair".

0 Kudos
Earl_Geddes
New Contributor I
1,101 Views

There is no folder "Intel Fortran" in Program Files (x86)\Microsoft Visual Studio 12.0.  I will go ahead and reinstall anyways.

0 Kudos
Earl_Geddes
New Contributor I
1,101 Views

I uninstalled, no Fortran folder found, reinstalled, problem is unchanged.

I actually had 2013 SP3 and installed that.

Now what?

0 Kudos
Steven_L_Intel1
Employee
1,101 Views

Can you attach a ZIP of a solution, with the VB and Fortran projects, that I could look at? Can you view other variables ok?

0 Kudos
Earl_Geddes
New Contributor I
1,101 Views

It appears that only complex data types are affected.  The array appears in places as a long integer, presumably a pointer to the first element.

 

Hope this helps as this is turning into a real PITA.

0 Kudos
Earl_Geddes
New Contributor I
1,101 Views

Oops, I see that Result_ in the F90 code should not be passed as value, but that has no effect on the problem that I am getting.

0 Kudos
Steven_L_Intel1
Employee
1,101 Views

My guess is that you're still not seeing the Fortran debug support and instead are getting C's. It works for me, though. I do find that when I am using a .NET project that I need to set the target platform to x86 when running on an x64 system, though I see there is a "prefer x86" option which may make that unnecessary.

Can you show me a screenshot of your locals window?

0 Kudos
Earl_Geddes
New Contributor I
1,101 Views

I tried targeting X86 and that did not make a difference.

This all worked in VS2010 before I upgraded - just want to make sure that you are not using VS2010 or VS2012 as they both worked for me as well.  This is unique to VS2013, which I upgraded to because I use MS Azure as a web provider and it needs VS2013.  I unloaded VS2010, but I could perhaps reinstall it and try on that platform. 

Here is the screen shot.

0 Kudos
Earl_Geddes
New Contributor I
1,102 Views

Hi Steve

I located the problem.  In VS Options/Debugging/General) I had check the "Use Managed Compatibility Mode".  Changing this corrected the problem.

I remember setting this option to correct for some previous problems, but I don't remember what that was at this point.  If I discover that situation again I will repost.

Thanks for your help.

0 Kudos
Earl_Geddes
New Contributor I
1,101 Views

Hi again Steve

I found the issue.  When I change the Compatibility mode then I can no longer view the complex variables in VB.  At this point there does not appear to be a solution in both languages.

Any ideas?

0 Kudos
Steven_L_Intel1
Employee
1,101 Views

Right - now I remember that. When you have that option on, it disables the Fortran expression evaluator - there is nothing we can do about that.

0 Kudos
Reply