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

VS2010 Editor is corrupting *.for file

Chris_H_3
Beginner
807 Views

I have  VS2010 with Intel(R) Visual Fortran Composer XE 2013 SP1 Update 3 Integration for Microsoft Visual Studio* 2010, 14.0.0092.2010, Copyright (C) 2002-2014 Intel Corporation.  I have a project where when I modify a file in the editor, save it, and compile it I get an error indicating an illegal character in the label field.  No line number given.  What is happening: if I edit the *.for file outside VS2010 I can see at the bottom of the file (past the 'End Program Name' line) there is a fragment of the program Name.  I can delete these lines and save the file.  I remove and re-all the file to the project, but the same compile error will happen.  I saw talk in the forum with turning off some advanced options.  I tried some of that but still have the same problem.  You reckon I have a corrupt installation?  This is a 'migrated' machine which was recreated by IT.  There may have been problem.  It would be hard and timely to get the software reinstalled (by IT).  Have you suggestions or experience with this phantom insertion stuff?

 

Please let me know.  Thank you.

 

Sincerely,

 

CHobbs

0 Kudos
4 Replies
jimdempseyatthecove
Honored Contributor III
807 Views

I haven't seen this particular case. While preserving your original file, I would use non-VS editor to verify that the original program does not contain any hidden or unusual formatting characters that by chance does not show up as a compilation error. The .for file is fixed format and must not contain Tab characters. Also the line terminators cannot be goofy (to the IVF compiler). CRLF and LF are usually good, LFCR and CR might not be. It is hard to tell this without a hex editor since these are whitespace characters.

I seem to recall an issue where if the last line of the source file was a valid statement but was missing a line termination character(s), such as:

END PROGRAM< End of file here >

That the compiler had an issue. If this is the case, add the line terminator.

If the input file is OK, then verify your VS Editor settings (Under Tools | Options, and Options | Fortran) is not set to insert Tabs for spaces that cross tab zones.

Jim Dempsey

0 Kudos
Steven_L_Intel1
Employee
807 Views

I wonder if there is disk file structure corruption on this system. Running a full disk error check would be worthwhile.

0 Kudos
Chris_H_3
Beginner
807 Views

I wondered, too, if there were disk or installation errors.  This is a recently imaged hard drive on this computer.  I did a scan disk and found no bad sectors.  One thing: fortran program whether ran inside the VS2010 or as a standalone gives this error on my machine:


forrtl: An attempt was made to move the file pointer before the beginning of the file.
forrtl: severe (38): error during write, unit 1, file F:\Mydocs\util\modeling\APET\examples\cleanstart\mi-08_aam.txt
Image              PC        Routine            Line        Source
aam_Win32_Release  0101F9B1  Unknown               Unknown  Unknown
aam_Win32_Release  00FF0B25  Unknown               Unknown  Unknown
aam_Win32_Release  00FB9788  Unknown               Unknown  Unknown
aam_Win32_Release  00F5537D  Unknown               Unknown  Unknown
aam_Win32_Release  00F99DA4  Unknown               Unknown  Unknown
aam_Win32_Release  01089CE2  Unknown               Unknown  Unknown
aam_Win32_Release  01068C35  Unknown               Unknown  Unknown
kernel32.dll       765E336A  Unknown               Unknown  Unknown
ntdll.dll          77089882  Unknown               Unknown  Unknown
ntdll.dll          77089855  Unknown               Unknown  Unknown
--- AAM execution unsuccessful ---                              APETRunAAM                                   ** FAILURE **

The program only writes to this file sequentially.  So, I take the program to another computer and it runs just fine!  Do you know if these dll's could be corrupt and cause this problem when running with fortran programs?  I am set to uninstall and reinstall the studio and compiler.  I would prefer to wait as I just purchased the new intel compiler, but it might not be here soon.  Any suggestions as to which individual dll's I might try replacing? Please let me know.  Thank you.

0 Kudos
mecej4
Honored Contributor III
807 Views

There are two separate issues here, and it is not a good idea to attempt to solve them as if they are facets of the same bug until we know that they are, indeed, such.

With regard to the issue of VS corrupting a file all by itself, at the outset save a copy of a source file, do whatever you do with that copy and VS, and post both the files: original and corrupt. Then do a file comparison using fc, and post the results, or post both versions of the file here, if fc says that they are different.

0 Kudos
Reply