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

how to get color text in VS2013 using Fortran XE2016

Greg_T_
Valued Contributor I
2,919 Views

Hello,

I've just started using Fortran XE2016 Composer in VS2013 Pro and the Fortran text in the VS editor is not color coded for comments, keywords, etc.  I checked in the Tools/Options menu in Environment/Fonts and Colors, and the Comment color choice is already set to green and the Keyword color choice is already set to blue.  Is there another setting or option needed to get these syntax color choices applied to the editor window?

The Fortran project compiles and builds, so it appears to be working from within VS2013.  I also reran the Fortran XE2016 installer as "repair" to see if that would fix something in the VS integration related to the syntax color in the editor, but that didn't help.

Thanks for your help.

Regards,

Greg

0 Kudos
19 Replies
Kevin_D_Intel
Employee
2,919 Views

This seems like some aspect of the integrations are still not 100% sorted out from the earlier problems you had.

In your other thread you said you ran VS2013 'repair' to clear up the VS2013 not starting issue and after that you could use Fortran 2016. What I'm wondering is after that 'repair', did you reinstall the Fortran 2016. It sounded like you did not. If not then I wonder trying the recipe you tried during some of your earlier problems from the Troubleshooting Fortran Integration Issues with Visual Studio would make a difference?

0 Kudos
Greg_T_
Valued Contributor I
2,919 Views

Hi Kevin,

Using the integration troubleshooting, I checked that the four Intel Fortran DLLs are present in the folder:

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Intel Fortran\VFPackages

And they are version 16.0.46.12.  Then I ran the "integrate.bat" file using the two command lines.  But unfortunately the Fortran text is just black on white, no syntax color, in VS2013.  As a test I created a new "hello world" project that compiles and runs using Fortran XE2016 in VS2013.

To hopefully answer your question, using VS2013 as the test case, previously I had run the Fortran XE2016 repair for integration into VS2013, but then VS2013 would not start (seemed to be like the prior problems).  Then I tried running the VS2013 installer repair, and afterward it will start, and Fortran will run, but no color text.

Since Fortran XE2016 is running from VS2013, I feel like I'm pretty close to having Fortran integrated, except for the color syntax.  Is there something else I could check or try?

Regards,
Greg

0 Kudos
IanH
Honored Contributor III
2,919 Views

Is .f90 (or whatever file extension you are using) listed under menu Tools > Options; category Intel Compilers and Tools > Visual Fortran > General; property Free Format Extensions > Sources ?
 

0 Kudos
Greg_T_
Valued Contributor I
2,918 Views

Thanks for the trail through the options to that item to check.  In VS2013 with Fortran XE2016 in that options page, the "Sources" item for free format extension is ".f90".  Most of the Fortran source code I have is free format with the .f90 extension.  The new test project I created using VS2013 also has a .f90 file extension, but the Fortran text is just black and white.

Regards,
Greg

0 Kudos
Kevin_D_Intel
Employee
2,919 Views

It is unclear whether there is an underlying defect with the loss of the syntax/keyword coloring or if it relates to the earlier issues you experienced after installing our PSXE 2016 release.

I recorded the details of the issue in an internal defect report to Development to help track any further discussions with them about it. I'm sorry that I have not heard back from Developers yet about any other configuration/settings we can check or tweak to enable this functionality. I will share any info just as soon as I hear something.

(Internal tracking id: DPD200378332)

0 Kudos
Kevin_D_Intel
Employee
2,918 Views

I don't know whether this will correct the issue. Earlier you noted the color choices were as expected, so under Tools > Options try clicking on Use Defaults in the Environment/Fonts and Colors menu. Keep in mind this would reset any custom color settings you might have set prior.

0 Kudos
Greg_T_
Valued Contributor I
2,919 Views

Hi Kevin,

Thank you for the "use defaults" suggestion.  I tried it in VS2013 but still no colorized syntax in the Fortran source code.  I closed and reopened the project, and also closed and reopened VS2013.

Would it be worth trying to uninstall Fortran XE2016, delete the Intel Fortran integration folder under VS2013, then reinstalling XE2016?  Would there be any other items to delete or uninstall?  Can I use the "modify" option when installing Fortran XE2016 to have it integrate only into VS2013 (not affect VS2015 or VS2012 using Fortran XE2015)?

Thanks for your help.

Regards,
Greg

0 Kudos
Steven_L_Intel1
Employee
2,918 Views

Here's something else to try - https://software.intel.com/en-us/articles/problem-fortran-source-files-not-compiled-when-building-in-visual-studio

 

0 Kudos
Kevin_D_Intel
Employee
2,919 Views

Based on all that you've overcome you are probably as unsettled as me about uninstalling XE2016, but, yes it might be worthwhile if what Steve referred to doesn't resolve it.

If you uninstall XE2016 and remove the Fortran integration folder you mention, then you would do a full installation again and only select integration with VS2013. Since you uninstall it, "Modify" would not be an available option but the install should still prompt to integrate into selected Visual Studio versions so you can leave VS 2012 & 2012 untouched.

0 Kudos
Greg_T_
Valued Contributor I
2,918 Views

Hi Steve,

Thanks for the article with direction to the Tools/Options/Intel Compilers.../Visual Fortran/General form in VS.  The default Fortran file extensions appear as shown in that article.  I click on each header and source item in that options page and then open the dialog, but the "Reset to default" button is not active (grayed out). After closing and restarting VS2013, the Fortran source code is not colorized.  My "hello world" test project has a main.f90 file.

Since I'd really like to get Fortran XE2016 working with VS2013, I will go ahead with the XE2016 uninstall and reinstall.  I'll create a system restore point first, just in case.  After uninstalling I'll delete the Intel Fortran folder for VS2013 at:  C:\Program Files (x86)\Microsoft Visual Studio 12.0\Intel Fortran

Anything else I should check or delete after the uninstall?

Thanks for your help.

Regards,
Greg

0 Kudos
Steven_L_Intel1
Employee
2,919 Views

Had you installed any other vendor's Fortran with VS integration on this system before? I suggest that after you uninstall, run regedit,exe and delete the keys HKEY_CLASSES_ROOT\.f90 and HKEY_CLASSES_ROOT\.f  Then reinstall.

0 Kudos
Greg_T_
Valued Contributor I
2,919 Views

Hi Steve,

I don't have Fortran from another vendor. Intel Fortran is the only one for me.

After uninstalling Fortran XE2016, using regedit.exe I searched for HKEY_CLASSES_ROOT and did not find either \.f90 or \.f.  I did find an instance of that under Microsoft with a different string, so I did not delete that.  I checked the VS 12.0 directory and the Intel Fortran subdirectory had been removed by the uninstall.

I also noticed after the Fortran XE2016 uninstall that VS2012 and VS2015 would not start, giving the errors previously seen.  Proceeding with the reinstall, I created a restore point, and I ran the setup as administrator, and when I reached the "customize" button I used the option to select only VS2013 for integration.  I restarted the computer after the install was finished.  This time VS2013 started and the Fortran text was colorized, so that is positive outcome.  But VS2012 and VS2015 did not start (previous errors).  I'd like to have both VS2012 with XE2015 and VS2015 working along with VS2013, so I used the restore point to revert to the previous state.  I did create a restore point with XE2016 installed, so I could switch back to that if needed.  Having Fortran XE2015 with VS2012, and VS2015 for C# is working well for me for now.

Does any of this information help diagnose why installing XE2016 seems to cause Visual Studio problems?  Let me know if I could gather more information.

Thanks for your help.
Regards,
Greg

0 Kudos
Steven_L_Intel1
Employee
2,919 Views

See https://software.intel.com/en-us/articles/using-older-intel-visual-fortran-versions-in-different-microsoft-visual-studio-versions (second section) for using different compiler versions in different VS versions. You may want to go through this and see if it helps your problem.

Is the color text the only thing wrong? Can you click on a keyword, press F1 and get help for that keyword? Does the project build ok?

0 Kudos
Greg_T_
Valued Contributor I
2,919 Views

Hi Steve,

Thanks for the link to the article about installing multiple Fortran versions.  I checked the version of the DLL files in the Visual Studio/xx/Intel Fortran/VFPackages folder and it looks like the correct version of Fortran XE2015 is in VS2012 and Fortran XE2016 is in VS2013.

The only issue I had observed previously was that the Fortran text was not colorized, but the project built and ran.  I had a chance this afternoon to check Fortran XE2016 in VS2013 again, and now the Fortran text is colorized, where it hadn't been before.  A "hello world" project compiles and runs.  The F1 help key also works on the keyword.

Since the previous status where the Fortran text was not colorized, I had shut down the laptop and restarted it out of the office, then did the steps of making a system restore point, uninstalling and reinstalling Fortran XE2016, observing the problems with Visual Studio not starting after the reinstall, then reverting back to the system restore point.  Last night shut down the laptop and restarted it this morning in the office at its docking station.

Do you suppose any of those steps affected the system or installation enough to get VS2013 to recognize the .f90 file or to activate the syntax colorizing?  I've noticed anecdotally that after restarting the laptop I takes Visual Studio several minutes to start up, but when the computer has been left on then VS will start up quickly.  Could VS be holding onto a parameter setting that prevented the Fortran text being colorized?  And that the several recent restarts or the restore point forced VS to start up from scratch?

It looks like this issue is fortunately resolved.

Thanks to you and Kevin for all the help.

Regards,
Greg

 

0 Kudos
Steven_L_Intel1
Employee
2,919 Views

Restore points save a lot of registry info and details about installed files, but I have no idea how well it really restores. I have used this feature in the past, but only under exceptional circumstances.

I do generally find that the first few minutes after a new boot everything is slow. Keep in mind that Windows "caches" frequently used executables and this may be why it's faster on resume from sleep.

VS installation and operation is incredibly complicated. I'm often astonished it works as well as it does.

0 Kudos
dasta_u_
Beginner
2,919 Views

Hi

when i was installing this software, at first loading of the program (intel fortran 2015 on vs 2013) a panel pop up apeared and asked me to select a default program and i have mistake and i select F# instead of intel visual fortran and problems of font, comment and ... color started

i think maybe the problem related to my experience.

thank you

0 Kudos
Steven_L_Intel1
Employee
2,919 Views

I'm not sure what you would have done to trigger such a popup, but if you caused .f90 files to be "associated with" F#, then I could definitely see this as an issue.

Try this:

  1. In the Windows search box (lower left of screen, click Start button if on Win7), type regedit.exe   When you see the program appear in the search results, click on it to open regedit.exe. Administrator privilege is required.
  2. Click on the + or triangle to the left of HKEY_CLASSES_ROOT
  3. Scroll down and find the entry for .f90 in the left column
  4. Click (once) on .f90 and press the Delete key to delete that registry entry
  5. Exit regedit
  6. Do a "repair" of Intel Parallel Studio XE from Programs and Features.

 

0 Kudos
dasta_u_
Beginner
2,919 Views

I do the above procedure and the problem is exist yet; Maybe i have mistake in the cause i said.

But this two errors shown when i run intel visual fortran:

1. the 'IntelCommonPkg' package did not load correctly.                    http://s6.picofile.com/file/8223874334/error_1.jpg

2. the 'IFLangServicePackage' package did not load correctly.            http://s3.picofile.com/file/8223874376/error_2.jpg

0 Kudos
Steven_L_Intel1
Employee
2,919 Views

I suggest an uninstall and reinstall of Fortran then.

0 Kudos
Reply