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

Problems of running fortran 66 program

Tony
Beginner
2,383 Views

I am a beginner of the Fortran, I have a very old Fortran program which is written in FORTRAN, and was designed and implemented on the DEC-20 of the University of Chicago Graduate School of Business (FORTRAN-20, version 5, an extension of ANSI FORTRAN-66). I used the visual studio 10 with intel fortran compiler 2013, 1.1.139. My system is window 7 64-bit. <!--break--> I set the property of the old program as following:

/nologo /debug:full /Od /assume:buffered_io /Qopt-matmul- /f66 /d_lines /Qopenmp_stubs /standard-semantics /Qcoarray:shared /convert:ibm /fpscomp:filesfromcmd /fpscomp:ioformat /fpscomp:ldio_spacing /fpscomp:logicals /fpscomp:general /warn:interfaces /align:sequence /assume:dummy_aliases /Qsafe_cray_ptr /assume:noprotect_constants /assume:byterecl /Qtrapuv /module:"Debug\\" /object:"Debug\\" /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c

After I run with debug, there are error message, however I start without debugging. Errors occurred in cmd with following statements:

forrtl: severe (47): write to READONLY file, unit 5, file CONIN$
In coarray image 1

application called MPI_Abort(comm=0x84000000, 3) - process 0
forrtl: severe (47): write to READONLY file, unit 5, file CONIN$
In coarray image 3

application called MPI_Abort(comm=0x84000000, 3) - process 2
forrtl: severe (47): write to READONLY file, unit 5, file CONIN$
In coarray image 2

application called MPI_Abort(comm=0x84000000, 3) - process 1
forrtl: severe (47): write to READONLY file, unit 5, file CONIN$
In coarray image 4

application called MPI_Abort(comm=0x84000000, 3) - process 3

job aborted:
rank: node: exit code[: error message]
0: localhost: 3: process 0 exited without calling finalize
1: localhost: 3: process 1 exited without calling finalize
2: localhost: 3: process 2 exited without calling finalize
3: localhost: 3: process 3 exited without calling finalize
Press any key to continue . . .

I think the problem is come from the input commands. There is a subroutine called OFILE, the original statements are

SUBROUTINE OFILE(IO,FNAME,IAC)
DOUBLE PRECISION FNAME
IF(IAC.NE.0)GO TO 10
OPEN(UNIT=IO,FILE=FNAME,ACCESS='SEQIN')
RETURN
10 OPEN(UNIT=IO,DEVICE='DSK',ACCESS='SEQOUT',FILE=FNAME)
RETURN
END

However, the intel fortran compiler doesn't support the ACCESS='SEQIN/SEQOUT' and DEVICE='DSK'. Therefore, I rewrote these subroutine as following:

IF(IAC.NE.0)GO TO 10
OPEN(UNIT=IO,FILE=FNAME,ACCESS='SEQUENTIAL',STATUS='OLD',READONLY)
RETURN
10 OPEN(UNIT=IO,ACCESS='SEQUENTIAL',STATUS='UNKNOWN',FILE=FNAME)
RETURN
END

I don't know whether it causes the problems as mentioned above. I can upload the fortran program if necessary. Thank you for your help.

0 Kudos
36 Replies
Bernard
Valued Contributor I
585 Views

>>>WARPS.exe has triggered a breakpoint>>>

It seems that the program was compiled as a debug build.Usually in debug build stack will be filled with 0xcc opcodes which are used to pass control to currently registered debugger.

0 Kudos
Tony
Beginner
585 Views

Thanks for your help, and happy new year.

To Lorri, I find the stack frame: libifcoremdd.dll!1001fb60(), does it mean that I miss some libraries for this program.

To mecej4, thank you for your revised version, I still can't input the file, I enter Model Order as 3, drift parameter as "n", discontinue as "n", number of explanatory variable as "1", number of data as "72", and File name? "Return" To enter data here as data.txt, how many variables in this file as "2", enter 2 indices for variables as y x, then error occurred: forrtl: severe (64): input conversion error, unit 5, file CONIN$. I don't know whether I miss some libraries that you have.

To illyapolak: Thank you.

With best regards,

Tony

 

0 Kudos
andrew_4619
Honored Contributor II
585 Views

Tony,

There is zero i/o error handling in this program. The error is that it is expecting one type e.g integer and you have entered a different type e.g real or character. Ignore the stack frame entries for the system stuff after the point of failure,  look down the traceback list for the last entry that actually relates to the code you compiled.  

0 Kudos
Bernard
Valued Contributor I
585 Views

@Tony

Does the breakpoint exception occur  when you compile your program as a release build?

0 Kudos
mecej4
Honored Contributor III
585 Views

Tony, to run the program with the modifications that I gave above, open an Intel Fortran command window, change to the directory containing the files extracted from the zip file, compile the Fortran source to build warps.exe. Then run using "warps < dat". The output that I got is given below.

[bash]

S:\lang\warps>warps < dat
0            W A R P
             =======

 WECKER-ANSLEY REGRESSION PROGRAM
 =      =      =          =

0ORDER OF MODEL?
0DRIFT PARAMETER?
0DISCONTINUITY?
0HOW MANY LINEAR EXPLANATORY VARIABLES?
0NUMBER OF DATA POINTS?
0VARIABLES INDEXED 1 THROUGH  2
 1=DEPENDENT VARIABLE, 2=NON-LINEAR EXPLANATORY VARIABLE
0FILE NUMBER  1
0FILE NAME?   "RETURN" TO ENTER DATA HERE  0HOW MANY VARIABLES IN THIS FILE?
0ENTER  2 INDICES FOR VARIABLES
0FORMAT?


0MODEL SUMMARY

0MODEL ORDER M:                   1
0DRIFT PARAMETER INCLUDED:       NO
0DISCONTINUITY:                  NO
0LINEAR EXPLANATORY VARIABLES:    0
0SAMPLE SIZE:                    72
0NUMBER OF DISTINCT VALUES:      72


0STARTING VALUE FOR LAMBDA?
0MAXIMUM ITERATIONS?
0MAXIMUM 100 ITERATIONS WILL BE USED
0STANDARD CONVERGENCE CRITERIA?
0**ERROR IN LSREG--IE =  1**[/bash]

You cannot change the data without breaking things. In particular, the number of columns in the data file have to match the number of variables. I believe that for a data file with two columns, there is one independent and one dependent variable. The format string input to the program has to match the format of the two-column data in the data file.

At any rate, you will need to go elsewhere to find what type of input the program expects. Questions about what the program does and why it runs with error messages are unlikely to be answered by people who have little or no knowledge of the program.

0 Kudos
Bernard
Valued Contributor I
585 Views

>>>The program '[4708] WARPS.exe: Native' has exited with code 47 (0x2f)>>>

Cannot find the description of 0x2f error code.

I suppose that during the program execution somehow instruction pointer referenced(on the stack) 0xcc instruction thus triggering software breakpoint.

0 Kudos
Tony
Beginner
585 Views

Thank you for your help,

To illiyapolak, no breakpoint exception occurred.

To mecej4, I still can't open the file with commands "warps<dat", I try to input the information as like as your dat file, I get stuck at "Enter 2 indices for variables", I enter "1 2(2f8.2) 0.01 1000 y" which is given in the "dat" file then the same error occurred.

To app4619 and illiyapolak, the last three codes in call stack: ntdll.dll!_NtReleaseMutant@8() + 0x15 bytes, KernelBase.dll!_ReleaseMutex@4() + 0x10 bytes,  and 0100cc8b(). I don't understand what's these mean.

With best regards,

Tony 

0 Kudos
Tony
Beginner
585 Views

Thank you for your help,

To mecej4, I still can't open the warps file with the command "warps<dat", I use the Microsoft Visual Studio 2010 and intel fortran compiler 2013 to compile the program. I enter the information as like as your "dat" file, I get stuck at "Enter 2 indices for variables" as "1 2(2f8.2) 0.01 1000 y", but same error occurred. Thank you.

To app4619 and iliyapolak: The last three codes in call stack: 1. ntdll.dll!_NtReleaseMutant@8()+0x15 bytes, 2. KernelBase.dll!_ReleaseMutex@4()+0x10 bytes, and 3. 0100cc8b() . I don't understand what's this means.

With best regards,

Tony

0 Kudos
Bernard
Valued Contributor I
585 Views

>>>To app4619 and iliyapolak: The last three codes in call stack: 1. ntdll.dll!_NtReleaseMutant@8()+0x15 bytes, 2. KernelBase.dll!_ReleaseMutex@4()+0x10 bytes, and 3. 0100cc8b() . I don't understand what's this means.>>>

These are function calls which are dealing with Mutex(internally called Mutant) synchronization object.Put it simply KernelBase.dll calls ntdll.dll stub which in turn calls internal Mutant implementaion located in Ntoskrnl file.Regarding the function call no.3 you posted  probably unresolved function(opcode) of the call site.

0 Kudos
mecej4
Honored Contributor III
585 Views

Tony wrote:

 I enter the information as like as your "dat" file, I get stuck at "Enter 2 indices for variables" as "1 2(2f8.2) 0.01 1000 y", but same error occurred. 

If you are entering the data from the keyboard, rather than redirecting the file to standard input, note that you need to press "ENTER" between lines. The data should be as follows, with the ENTER key pressed at the end of each line of input:

1
n
n
0
72
data.txt
2
      1      2
(2f8.2)
0.01
1000
y

 

0 Kudos
Tony
Beginner
585 Views

To mecej4, Thank you for your help, I can get the same error as you mentioned, I find the error is the independent variable "x" is not full rank, I don't know the error is because the data or the type of input, since the type is character*10. 

0 Kudos
mecej4
Honored Contributor III
585 Views

Tony wrote:

I don't know the error is because the data or the type of input, since the type is character*10. 

The only variables of type CHARACTER are file names and a format string. None of these are used in the calculation itself, but, as I stated earlier, you need to know what data the program expects in order to run it successfully. Furthermore, I would not expect such a program to behave reasonably when given incorrect data. Do you have any documentation for the program?

0 Kudos
Anthony_Richards
New Contributor I
585 Views

IMHO, there is no point in continuing the struggle here unless you have, and can make available to the forum, an input data set that satisfies the requirements of and properly exercises the program as it was originally written in Fortran 66.

The Wecker-Ansley method of extracting a signal using a model dependant on a set of parameters in the presence of noise on the signal measurements (data) is described in several places on the Web if you do a search for 'Wecker-Ansley'. Their original paper was apparently published by the Journal of the American Statistical Society in 1983 and is frequently cited.

0 Kudos
Tony
Beginner
585 Views

To all, thank you for your help.

0 Kudos
Tony
Beginner
585 Views

To mecej4: I found out the problem of LSREG error =1 and have been revised. Kindly see the attached file. However I found out another problem, when I try to do the prediction, an error occurred: error(65) floating invalid. Thank you for you help again. With best regards, Tony 

0 Kudos
mecej4
Honored Contributor III
585 Views

There is nothing surprising about floating point errors occurring when a program that uses input data to perform calculations is given incorrect data. So far, you have not shown us what data you input to the program. Without that information in front of us, it is pointless to discuss the reasons why the floating point errors occurred.

0 Kudos
Reply