forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

file loading error
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Sun Jan 30, 2022 5:21 pm    Post subject: Reply with quote

Compilation without error messages simply means that no syntax errors were detected by the compiler. Semantic errors are quite a different story. Whether the code does what the programmer wants, whether the algorithm being used is mathematically correct -- these are things that the compiler, linker and debugger cannot certify or fix. They can only help with the programmer's task.

Here is a simple example. Suppose you intended to write

z = x + y

but wrote

z = x * y

in a program. You cannot expect the compiler to read your mind and tell you to replace '*' by '+'.

With most programs, an experienced programmer can expect to spend a lot more time finding and fixing run time errors, and running tests to verify that the program produces correct results, than on syntax errors.
Back to top
View user's profile Send private message
alangr



Joined: 24 Oct 2016
Posts: 47
Location: Oxford,UK and Athens, Greece

PostPosted: Mon Jan 31, 2022 8:50 am    Post subject: Reply with quote

I certainly agree with that! The thing I do not see is how to find the run time error that stopped CALLS when working on TRADE. When I created CALLS, I used SDBG to help detect run time errors. Is it not possible to get more information than the Access Violation I reported? Can SDBG not show the (FORTRAN) code for TRADE and thus allow the error to be seen?

In the meantime, I am running SDBG on TRADE and working to fix any problems found.
_________________
Alan
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Mon Jan 31, 2022 9:26 am    Post subject: Re: Reply with quote

alangr wrote:
TSTC - in file tstc.for at line 29 [+0225] ] CALLS S/R

There appears to be some confusion with your "Trade" vs "Fortran" noumenclature, eg "calls"

However you did report an error was recognised at line 29. Did that help ?

Why is SDBG not working ? If a.exe was built using /debug or /check, you should be able to see the code if you are running SDBG A.EXE in the same directory where the .for source code files are located. I don't follow your explanation why this is not occurring ? Is the sdbg icon in the bottom windows task bar ? The SDBG window might be minimised or have a bad window address and not be visable.

Note that "build" can be a 2-stage process of compiling, using FTN95 (with /debug or /check) and then linking, using slink.

Alternatively you can use ftn95 trade.for /debug /link if trade.for has all the code. ( is this all.for?)

Could you try to produce a .map file in slink to check what has been linked into the .exe ?

Are you using /64 ? If so then SDBG64 should be used.

I am finding this thread a bit confusing ?
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Mon Jan 31, 2022 9:31 am    Post subject: Reply with quote

The traceback that you showed may be incomplete. The very first line should have shown the subprogram within which a runtime error occurred. The run time error report should have also told you the nature of the error (e.g., file not found, access violation, floating point overflow, end of file, etc.).

Which versions of FTN95 and SDBG are you using? I ask because the traceback report that you showed is a little bit different from what I see from the current versions. For example:

Code:
Runtime error from program:t:\fftpack\fftpack5.1-master\test\tcfft1.exe
Run-time Error
Attempt to call a routine with argument number four as a complex(kind=1) when a real(kind=1) was required

 C1F4KB -  in file c1f4kb.f at line 52 [+01b7]
 C1FM1B -  in file c1fm1b.f at line 57 [+07f9]
 CFFT1B -  in file cfft1b.f at line 54 [+03ef]
 TCFFT1 -  in file tcfft1.f at line 62 [+0337]

Notable is the absence of the ] CALLS S/R and [recur= 2] ] CALLS S/R that we see at the end of the lines in your report.

You will get more information and possibly catch errors earlier if you compile and link CALLS using /check or /checkmate.

When you are running CALLS on TRADE, inside SDBG or the command line, SDBG does not know anything about the contents of the source files of TRADE. As I said before, those files are simply data files from the point of view of the running program, which is CALLS. Whether the TRADE source files contain Fortran source or French text or stock market quotes has no effect on SDBG.

This degree of confusion noted in this thread is unusual. Did you write the program files in CALLS and TRADE, or did you obtain them from others?

It is going to be difficult to complete your project in such conditions. I urge you to get some local help, or collect all the files into a zip file, upload the zip file to a file storage service such as Dropbox, Google Drive, etc., and provide a link here.
Back to top
View user's profile Send private message
alangr



Joined: 24 Oct 2016
Posts: 47
Location: Oxford,UK and Athens, Greece

PostPosted: Mon Jan 31, 2022 12:58 pm    Post subject: Reply with quote

I suspect that I am about to be seen as very silly but I will get things together and respond to you both in due course.

In the meantime, the answer to the version query will say much as I am using FTN95 version 7.00.0. I do not know how to find the version of SDBG but I have:

SDBG.EXE and SDBGDLL.DLL both dated 7/9/2013

When I retired I wanted to continue using Fortran and bought an ‘academic licence’ I think it was called. As you can see, I have not updated since then for two reasons. The main one is that all was working OK and I could do what I wanted to do. The second was that I was not sure that I was eligible for an update and in the face of things working, I did not chase it.

It would be good to know whether I am eligible for updates as the current versions might make debugging easier!
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Mon Jan 31, 2022 2:50 pm    Post subject: Reply with quote

Please review the information on the free edition ( https://silverfrost.com/32/ftn95/ftn95_personal_edition.aspx ). If you are retired and the work that you are using FTN95 for is personal rather than commercial, you may be eligible for the 8.80 personal edition. Versions 8 and up have the capability to compile 64 bit EXEs, DLLs and LIBs. The most recent compiler version is 8.83.
Back to top
View user's profile Send private message
alangr



Joined: 24 Oct 2016
Posts: 47
Location: Oxford,UK and Athens, Greece

PostPosted: Mon Jan 31, 2022 3:09 pm    Post subject: Reply with quote

I am not running with the free, evaluation edition. I paid for a use that allowed personal work with no commercial action.

I do not have the email confirmation but my contact was Carolyn Chafer.

I am responding to JC and yourself at the moment and will send this soon.
_________________
Alan
Back to top
View user's profile Send private message
alangr



Joined: 24 Oct 2016
Posts: 47
Location: Oxford,UK and Athens, Greece

PostPosted: Mon Jan 31, 2022 3:43 pm    Post subject: Reply with quote

JC

I do not understand the nomenclature confusion you refer to. TRADE.FOR is a program in a directory \TRADE together with which are a number of subroutines. CALLS.FOR is program in another directory \CALLS together with its subroutines.

From the CALLS directory, SDBG runs CALLS, the code can be seen and no errors are indicated. Yes, both CALLS and TRADE are compiled with /DEBUG and linked using (separate) link files.

With TRADE, I have used the somewhat brief report of an error in TSTC and found the execution error. Correcting this has allowed the program to run to completion.

I am not using 64-bit.

Mecej4

As you will see from above, the limited description of the error arising from using SDBG with TRADE allowed the CALLS program to execute fully. This is good news and so I can now do all that I want to do (for the moment, anyway).

From the information you sent about current versions, if I am able to upgrade I may well get better run time error reports. Also, presumably, there would be further benefits of using a 64-bit system.

I am really sorry that there has ben confusion here, due largely to my somewhat imprecise descriptions of what is happening but, yes, I did write both CALLS and TRADE programs, though the latter has nothing to do with stocks, or French, but is a nascent ‘Space Trader’ game written for my own enjoyment.

Work or play, though, the problems are the same.

Thank you for all your help.
_________________
Alan
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Mon Jan 31, 2022 4:10 pm    Post subject: Reply with quote

JC is in Australia, and it is night there now, so I'll take one part of your description: "I do not understand the nomenclature confusion you refer to."

You have:

1. A directory called CALLS,
2. A program called CALLS,
3. A Fortran file called CALLS.FOR,
4. An EXE called CALLS.EXE,
5. CALL is a Fortran keyword, and you probably have several CALL statements in the source files, and CALL is a common verb,
6. Windows batch files may contain the CALL command.

Because of these multiple uses, it is quite easy to cause confusion when describing a program error that may involve many of these meanings of CALL.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group