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 

Dum Array

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato
View previous topic :: View next topic  
Author Message
AKS



Joined: 19 Mar 2008
Posts: 29

PostPosted: Tue Jul 07, 2020 11:05 pm    Post subject: Dum Array Reply with quote

I have a program that runs fine on one machine but when I take it to another machine I get this runtime error:

Runtime error from program:c:\users\aks\desktop\smpnew\checkmate\win32\smp.exe
Run-time Error
Attempt to call a routine with argument number five containing too few array elements

RAOPHS - in file raophs.for at line 28 [+0136]

RMSTOE - in file rmstoe.for at line 143 [+0ba8]

IRGSEA - in file irgsea.for at line 28 [+013b]

main - in file smp91.for at line 128 [+031e]

break point
RMSTOE.for
Code:
      CALL RAOPHS (AOMGE(1,IH),RAO1(1,1,IH),DUM,RAO2(1,1,KH),DUM,     
     2 KREC(IH),IR,IV,IH,IPHS)


RAOPHS.for
Code:
      COMMON/PHYSCO/II,TPI,PI,PIOT,DEGRAD,RADDEG,VKMETR,METRVK,GRAV,RHO,
     2 GNU,RHOS,RHOF,GNUS,GNUF,FTMETR,PUNITS,REYSCL


The errors come in the lines that begin with 2. I checked the variable named DUM and it says that it's undefined. This code works on another computer without any issues[/i]
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6459
Location: Salford, UK

PostPosted: Wed Jul 08, 2020 8:26 am    Post subject: Reply with quote

AKS

This issue relates to the FTN95 compiler rather than the Plato editor/IDE but since you raise it here...

If you are using FTN95 on both machines then in this context you will almost certainly get the same results provided that you use the same command line options. My assumption here is that you have used something like /CHECKMATE on one machine but not on the other.

I don't know if you have provided enough information for me to identify your error. If you compile using /CHECKMATE and run the program using the debugger SDBG (or SDBG64 for 64 bits) then the execution will stop at the error and you should be able to discover the fault.
Back to top
View user's profile Send private message AIM Address
AKS



Joined: 19 Mar 2008
Posts: 29

PostPosted: Wed Jul 08, 2020 4:49 pm    Post subject: Reply with quote

On both machines I'm using FTN95 with Checkmate/Win32. I stepped through in the the debugger and it gives me an error at the 2nd line of the call command

Edit: The computer where it works is running the program from a shared network and the one where it doesn't is being run from the local drive


Last edited by AKS on Wed Jul 08, 2020 7:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1366

PostPosted: Wed Jul 08, 2020 5:31 pm    Post subject: Reply with quote

Your program may have a benign bug: passing a scalar such as DUM as an argument when the corresponding dummy argument in the called subroutine/function is an array. The name DUM suggests that this argument is merely a placeholder, and that it will never be used in the callee.

Compiling and running with /CHECKMATE will give you the following problem: regardless of whether DUM will be used in the subprogram, as soon as that subprogram is entered the scalar vs. array mismatch will be detected and execution will stop.

If this is the case, either fix the code or do not use /CHECKMATE.
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 -> Plato All times are GMT + 1 Hour
Page 1 of 1

 
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