Silverfrost Forums

Welcome to our forums

Error messages from bad build, Win 10

28 Nov 2015 6:24 #17034

I am using a Win 10 installation of FTN95 under the Visual Studio Shell 2008. In trying to build an executable for my program where I have a main program (Profgen.f90) and 16 modules, the first module M_kinds compiles OK but every subsequent one does not. The build output looks like this. Note- I've shortened the length of the messages to make it a little easier to see what's going on.

Error 1 Cannot find definition for MODULE M_KINDS C:\...\M_daytm.F90 5 Error 2 Cannot find definition for MODULE M_KINDS C:\...\M_dimen.F90 5 ... Error 14 Cannot find definition for MODULE M_DIMEN C:\...\PROFGEN.F90 26 Error 15 There were compile errors, abandoning link...

Build log saved at: 'file://C:\...\Debug\Win32\buildlog.txt' profgen_ftn build failed. ====== Rebuild All: 0 succeeded, 1 failed, 0 skipped ======

Note that this same setup compiles just fine under Win 7 and Win 8.1. Can anyone suggest what is causing these errors?

28 Nov 2015 8:31 #17035

There must be some difference in the way that the project is set configured. How was it finding the modules before and what is the different now?

Modules can be in the same folder as other source files or you can use the command line option /mod_path for example.

1 Dec 2015 5:25 #17038

Paul, Thanks for your suggestions. I tried them to no avail, so I am still stuck. I did an A:B comparison test to see if I could better isolate the problem. The idea was to see if I could get the exact same files to compile on both of my computers, i.e. on my old 32-bit Win 7 machine (where I've always had good success with FTN95) vs. on my newer 64-bit Win 10 machine (where I had good success until upgrading from Win 8.1 to Win 10 six weeks ago). Ultimately, I need to migrate all my work to the Win 10 machine, but these compilation failures prevent that. Note - I want to purchase FTN95 to support a consulting job that I recently started, but first I must make sure that FTN95 will actually work under Win 10. Here are the steps for the A:B comparison. Win 10 machine • uninstalled and then reinstalled all components of FTN95 Express • made new folder for test only • copied all sources into a new folder (one code of 68 program units plus 16 modules, some 14,000 code lines total) • initiated a new project in Visual Studio 2008 • attempted to compile new installation in Debug and Checkmate modes using default Property Pages • both Debug and Checkmate successfully compiled module M_kinds first because FTN95 recognizes that it is used in most other program units • both Debug and Checkmate compiles failed, producing almost identical errors • error messages displayed at end of compile attempts were previously reported • first of 3 error messages that display during Debug compile is shown below between dashed lines • also tried compiling using Plato IDE, 'Cannot find definition for MODULE M_KINDS' appears repeatedly as it did in Visual Studio, M_kinds.obj is present in Win32 folder but has 0 size, see M_kinds.f95 in postscript, failure again • CONCLUSION - these efforts did not solve anything, compilation problems on Win 10 machine remain

Runtime error from program:c:\program files (x86)\silverfrost\ftn95 express\ftn95.exe Access Violation The instruction at address 00538f51 attempted to write to location 7fff0000

00538e25 generate_default_pattern(<ptr>char,<ptr>structÄtype_definition) [+012c] 0050d9f0 allocate_static_object(<ptr>structÄscoped_entity) [+02d1] 004c1e0f allocate_a_variable(<ptr>structÄscoped_entity,<ptr>structÄscope)#42 [+02d2] 004c24ea allocate_all_the_vars(<ptr>structÄscoped_entity,<ptr>structÄscope)#42 [+004d] 004c290c allocate_var_space(<ptr>structÄscope) [+1b38] 004ce626 ProcessVariables(int,int,<ref>int) [+0905] 004124a7 handle_token(<ptr>char,int,int,int,int,<ref>int) [+0e55] 00405193 eax=00000000 ebx=00000000 ecx=00000004 edx=00000000 esi=0000000c edi=7fff0000 ebp=038469cc esp=0384697c IOPL=1 ds=002b es=002b fs=0053 gs=002b cs=0023 ss=002b flgs=00210202 [NC OP NZ SN DN NV]

00538f51 rep 00538f52 stosb 00538f53 pop edi

Win 7 machine • made new folder on Win 7 machine • brought all source files from Win 10 machine into new folder • initiated a new project in Visual Studio 2008 • compiled this installation in Debug and Checkmate modes using default Property Pages • both Debug and Checkmate compiled module M_kinds first because it is used in most other program units • both compile attempts were successful, each making its own EXE file • only compilation warnings were from Debug, # 242 and # 767, minor • ran test cases & compared new results to archived results, no change • CONCLUSION - fully successful effort, Win 7 machine working well I am completely stuck. All suggestions are welcome.

Stan

P.S. Since module M_kinds is central to my problems, here it is with its comments.

MODULE M_kinds ! file M_kinds.f95 IMPLICIT none SAVE ! ! This MODULE assigns parameters that are intended to be used in specification ! statements as KIND values, e.g. assigns the value of RK15 for use in ! REAL(KIND=RK15) :: a, b, c(10). ! By using the SELECTED_INT_KIND and SELECTED_REAL_KIND intrinsics for these assignments, ! we are adapting to the varying ways that compilers implement precision functionality. ! This approach provides a portable means to achieve desired precisions across all ! Fortran 90/95 compilers, and also across computers and operating systems. ! ! PARAMETER definitions ! IK8 KIND value for an integer variable in the range [-108, +108] ! RK6 KIND value for a real variable with precision of at least 6 decimal digits ! RK15 KIND value for a real variable with precision of at least 15 decimal digits ! INTEGER, PARAMETER :: IK8 = SELECTED_INT_KIND(r=8) INTEGER, PARAMETER :: RK6 = SELECTED_REAL_KIND(p=6) INTEGER, PARAMETER :: RK15 = SELECTED_REAL_KIND(p=15)

END MODULE M_kinds

1 Dec 2015 6:04 #17039

One of my statements in the last post is wrong. I said that 'both Debug and Checkmate successfully compiled module M_kinds first because FTN95 recognizes that it is used in most other program units'. This is false. Although the Win32 folder has .obj files for M_kinds and two other modules, all three files have size zero. So, NOTHING compiled successfully under Win 10!

1 Dec 2015 8:20 #17040

I would look at the build log provided by Visual Studio and then apply each of the build commands from a 'Command Prompt' window (a.k.a. DOS box). The compiler (FTN95) needs to be able to 'see' the .MOD files relating to each USE statement in your code. This means that they need to be in the same folder as the source code or the compiler must be directed to look elsewhere (for example by using /mod_path on the FTN95 command line.

I have no idea why changing machines has exposed this issue.

1 Dec 2015 2:16 #17041

I think that attributing the problems to Windows 10 is 'guilt by association'. I have used FTN95 7.2 in W8.1 and W10 for months, and I have so far seen no change in the behavior of FTN95 associated with the Windows version.

Note that the access violation occurred within the compiler itself (or in SALFLIBC.DLL).

If you post the source code of the first module that causes the problem, and any other modules that the problematic module requires, I can test them on W8.1 and W10.

Please login to reply.