552 questions
1
vote
0
answers
85
views
How to Automatically Split Overlong Lines in FORTRAN 77 Files Using Python?
Following this question, I'm working with legacy FORTRAN 77 files and need to address an issue where some lines exceed the 72-character limit. I've already developed a Python script that identifies ...
0
votes
2
answers
180
views
Standard conforming way to get command line arguments in FORTRAN77
The gcc manual mentions getarg as a gnu extension. It seems to be supported by many compilers (i.e. the rather strict f2c also understands it). But getarg is not mentioned in the FORTRAN77 standard. ...
0
votes
1
answer
330
views
Compile legacy fortran77 code as python module using f2py
I am able to successfully compile FORTRAN77 code, but only when specifying -std=legacy in
gfortran -o -std=legacy -o model.exe model.FOR
Without -std=legacy, I get some fatal errors. I wish to ...
2
votes
2
answers
218
views
Can an f77 subroutine be called from C?
In modern Fortran, we can call a subroutine from C by using C binding. E.g. The Fortran subroutine will look like this
subroutine my_routine(...) bind (C, name="my_routine")
However, if the ...
0
votes
0
answers
107
views
How to rewrite code with SAVE and ENTRY statements for OpenMP usage?
I am rewriting for OpenMP usage a large Fortran-77 program and one of the files contains a subroutine in which important variables marked as SAVE are initialized the first time the main program is ...
0
votes
0
answers
76
views
ASC2EPH ASCII to Binary conversion
Trying to run an ASC2EPH.exe to convert linked ASCII DE405 files to binary JPLEPH file. Getting error when running in CMD - ASC2EPH<infile.405 (see error code). Any help appreciated.
Have run this ...
0
votes
0
answers
490
views
'Random' "Program received signal SIGABRT: Process abort signal." Error
I have a large program (many modules, subroutines) and receive the error "Program received signal SIGABRT: Process abort signal." The odd thing about this error is that it occurs maybe e.g. ...
1
vote
1
answer
482
views
FORTRAN 77 comments starting at column 7
If I understand correctly, any line that starts with C in column 1 is automatically a comment. So why do some code samples I see start the comment text at column 7? Is this just to make all text line ...
0
votes
0
answers
106
views
Segmentation fault due to memory access issue
When I run my f77 code, I get a segmentation fault due to memory access issue.
This is the message that my terminal outputs:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000f523b7 in ...
2
votes
0
answers
95
views
f2py compiling f77 program with exposed variables
I was trying to compile a legacy code written in f77 using f2py.
The snippet of the code is shown below to demonstrate the issue I am facing.
PROGRAM TEST
IMPLICIT REAL*8(A-H,O-Z)
...
1
vote
0
answers
155
views
Resolving Fortran compilation error for `call itime(now)`, `error #6404: This name does not have a type, and must have an explicit types`
I am not a Fortran programmer at all, but I have a project where the original code was written in Fortran. I believe it is Fortran 77. The issue is that I am trying to compile the code, but I am ...
0
votes
0
answers
436
views
Fortran 77 compilation for IRI 2016 model
I've been trying to compile the IRI model lately, somewhat unsuccessfully. I've downloaded the IRI 2016 + common files + indices files, and using the test file to, well, test. I'm using gfortran (...
1
vote
0
answers
77
views
How to deal with the intrinsic funtion when using f2py module?
I have a Fortran code and try to compile it into a Python module with f2py. The Fortran Code "drandn.f" is below:
SUBROUTINE DRANDN (N,DX,SEED)
INTRINSIC DBLE, IABS, MOD
INTEGER ...
2
votes
0
answers
25
views
Fortran Help, open statement error any idea? [duplicate]
I have some Fortran error code in (open) statement like the following:
!IF ITS THE FIRST CALL TO THIS UNIT, DO SOME BOOKKEEPING
IF (INFO(7).GE.0) GO TO 100
!FIRST CALL OF SIMULATION, CALL THE TYPECK ...
1
vote
1
answer
188
views
Is it necessary to place an ampersand on the 73rd column for line continuations in Fortran 77?
Consider the following code which has a long string variable:
CHARACTER*256 MYSTRING
DATA MYSTRING / 'Lorem ipsum dolor sit amet, consectetur adipiscin&
&g elit, sed do ...