Is it still possible to somehow get a downgraded version of gfortran? Currently I have version 10.2.0 but this leads to some incompatibility in the compilation of some fortran code in a package I wish to install. As I am on a new machine, it is probably ok for me to uninstall gfortran without...
I am trying to troubleshoot why GFORTRAN versions beyond 5.4 will not compile with optimization on some of my .f source.
You can request options included in each level by:
Gfortran -Q -O1 --help=optimizers > listO1.txt (as an example)
When I enter the enabled flags individually and compile...
http://www.chemroc.com/programs/NEC2Test.zip
I don't understand what has happened with newer versions of GFORTRAN/MinGW64 . This is a very old FORTRAN program that I had edited years ago to compile and run with GFORTRAN. It doesn't work with newer versions. Can anyone help? I included link to...
I tried to calculate the smallest number in my machine with gfortran, g++ and clang. I did it by looping as:
a = a / 1.73
In gfortran after 1358 loops, I found that a = 4.9406564584124654E-324, and the value of a never changes from loop 1358 till the end 1500 loop.
It is questionable for me...
Hi, I am a beginner of Fortran. Recently I try to use a fortran code for my simulation. But it always shows me the following error when execute the program: At line 18 of the file sous.f (unit =11, file = 'fluid'), fortran runtime error, End of file, Error termination. Backtrace: could not print...
The following program is printing wrong value of RWTSED. How can I print correct value??
program inpdat
c
IMPLICIT NONE
REAL RHOMN,RWTSED,VOLSED
VOLSED = 17424.0
RHOMN = 2.42 !0000076293945
RWTSED= VOLSED*RHOMN*1.0E6
2000 FORMAT(/,3F40.5)...
I am developing a FORTRAN code (.f90) which "ll calculate some matrix in some time interval (dt1=0.001) and these matrices have to be integrated in some time steps (dt=0.1). Though I am experience in FORTRAN 77, new to FORTRAN 90. I am unable to make dimension of matrix real (I think that is the...
Homework Statement
I've written a program that calculates the discrete Fourier transform of a set of data in FORTRAN 90. To test it, I need to "generate a perfect sine wave of given period, calculate the DFT and write both data and DFT out to file. Plot the result- does it look like what you...
Hi all,
I'm writing a fortran 90 program to simulate the Duffing oscillator. I have it working and have produced a cos wave which I expected for D (the driving force) being set to 0. Here's the code:
program rungekutta
implicit none
integer, parameter :: dp = selected_real_kind(15,300)...
Hi everyone.
I'm trying to write a program that reads data from 2 files and then calculates the mean, standard deviation and standard error of both files (separate values for each). I'm struggling to get my head around simple I/O, so excuse the poor attempt, but this is what I have so far: (I'm...
So I have a Ubuntu machine with gfortran installed in it.
I wrote the following simple code in fortran:
program calculation
print *, 55+55
end program calculation
I saved it as 'calculation.f' file and then tried to compile it in the terminal, but got the following errors...
I was told to do a Fourier transform of function by using a Filon's method. I have found the code but I don't know how to include any function to the subroutine. I would be grateful for any example of how to use this code.
SUBROUTINE FILONC ( DT, DOM, NMAX, C, CHAT )
C...
Hi, I have written a fortran 90 program that finds the definite integral of a function using the trapezium method.
Everything is fine, other than when I compile my program it produces the following error:
assignment_2_final.f90:127.2:
ITRAP = (z/2)((G(a) + G(b)) + z*area)
1...
Hello, I need help for programming my first program in Fortran, because it doesn't run. I think it's a problem with the compiler. What do you think?
This is my code
program Steifigkeitsmatrix
implicit none
real :: E,I,l,p
real...
I just downloaded gfortran on my mac and I'm having an issue running the program.
For example, when I run the following using .f90,
program test
write (*,*) "Hello"
end program test
the computer, seemingly infinitely, spews out y's:
y
y
y
y
y
y
y
..
This is my own code, and it won't compile with gfortran. All I want to do is extract the location of the cell with the minimum value in an array. A seemingly simple task but one that does not work with the intrinsic function minloc, for reasons I do not understand.
The error message...
Hi,
I've been using gfortran on windows through the command line to compile .f95 files using the command
gfortran file.f95
to get an a.exe file which I can then run. However, I'm currently writing some Fortran code which needs some of the subroutines of the LAPACK package. I've been...
Hello. I'm supposed to plot a bifurcation diagram for the logistic map. What I'm trying to do is calculate 1128 iteration of y=a*y*(1-y), scrap the first 1000 and write the last 128 points of data in the LogisticMapDiagram.dat file and then plot that with gnuplot, but the value of y stays in...
Win 7 MinGW compilers.
I have a txt file that has empty lines that I'd like to pass by when reading them. Each line is assumed to be 85 characters. Here's a snippet of code:
Open(unit=astro_in, file="METEOR_LegacyInputToNML.txt", status = "OLD")
do while(.True.)...
I'm new to programming in Fortran, but have programmed for quite a while in C, Matlab, and Python.
This is my code. It's incomplete at the moment (the subroutines are unreferenced), though it should still compile, but won't.
PROGRAM bunkers
IMPLICIT NONE
SUBROUTINE...
Hi!
I am writing a simple code to get familiar with creating Fortran module. The program consist of a main.f and a module.mod file. When I type in:
gfortran main.f
I get the following error:
Fatal Error: File 'module.mod' opened at (1) is not a GFORTRAN module file
I think I found the...
Hello everyone,
I'm trying since a few days to compile a f90 program with gfortran (on Ubuntu) with a makefile. The fortran program calls 2 routines written in C.
Here is my makefile:
FC = gfortran
SFC = gfortran
FFLAGS = -ffree-form...
hello,
I have a program that compiles and runs fine with the ifort compiler (a fortran 90 program). This program is on a server at my university. When I download the program to my own computer, and use gfortran to compile it (as I do not have ifort available), I get an internal compiler...
Hi friends!
I am a complete newbie to fortran..
I've been trying to compile linpack but keep getting following error..
[SAks@localhost Desktop]$ gfortran schdc.f -lblas
/usr/bin/ld: cannot find -lblas
collect2: ld returned 1 exit status
please advise..
Thanks in advance
Dear all,
I wish to implement some part of my codes to use the GPU of my graphic card but I have no idea whether GNU as already implemented it (as for OpenMP). I mean, there are PGI Fortran compiler which embedded CUDA but I figure it's not free.
I also wonder if that works only with ATI...
Dear colleagues
My code in Fortran passes all data in one large vector. I increased the size of this vector for the maximum that the compiler accepts but still need more positions allocable to it. Is there any way I can increase the memory allocation of the compiler?
Thank's
Now that I have a suitable Fortran compiler I wonder what would be a good IDE. Anyway here is what I did:
I am new to programming and command prompt usage. Here is the tutorial I used, then an added step that was necessary not covered in the link...
I use gfortran on cygwin and i want to print in the command window (like it prints in windows)
i use the usual stuff:
WRITE(6,*) 'Give a number:'
or
PRINT(6,*) 'Give a number:'
but the execution completes without any printing..
What is wrong?
Hello,
I am in need of assistance, not with code, but with simply setting Fortran up in XP.
I am under the impression that I need cygwin, gfortran/g95 and emacs. I installed Cygwin, and downloaded some file tree (gfortran-4.4-Cygwin-i686.tar). But I do not know where to get the 'emacs'...