Gfortran Definition and 30 Threads

  1. N

    Fortran Need help with Jacobi relaxation method for Dirichlet boundary conditions

    program r_jacobi implicit none !!!!Variables!!! real*8 V, V_1, V_2, Lx, Ly integer n ,i , j, k, nx, ny real*8, allocatable :: arrx(:), arry(:), phi(:,:,:) real*8 x, xi, xf, y, yi, yf, dx, dy real*8 d, q, bx, by V=1 V_1=V V_2=-V Lx = 2 Ly = 1 nx = 200 ny = nx/2...
  2. C

    Is it possible to get a downgraded version of gfortran?

    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...
  3. J

    Fortran Why Won't GFORTRAN Versions Beyond 5.4 Compile with Optimization?

    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...
  4. J

    Fortran MinGW64 GFORTRAN Issues newer versions

    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...
  5. P

    Fortran Are these bugs for the GNU Fortran, g++, and clang compilers?

    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...
  6. U

    Fortran Fixing Fortran Runtime Error for Beginner

    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...
  7. A

    Fortran Print correct value of Real number with gfortran?

    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)...
  8. Y

    Fortran How to use Real Array Index in Matrix dimension?

    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...
  9. J

    Testing my Discrete Fourier Transform program

    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...
  10. Y

    FORTRAN 90 How to plot the Poincaré section?

    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)...
  11. Y

    Fortran Program that reads data from a file and calculates the mean?

    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...
  12. MathematicalPhysicist

    Fortran What are common errors when compiling a simple Fortran code?

    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...
  13. G

    Fortran [Fortran] Filon's method Fourier Transform

    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...
  14. B

    Fortran Fortran 90 - gfortran error - help

    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...
  15. Z

    Fortran Fortran (gfortran) compiling error

    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...
  16. N

    Fortran Why is gfortran on my mac continuously printing 'y' instead of 'Hello'?

    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 ..
  17. B

    Fortran Fortran bug: rank problem gfortran

    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...
  18. T

    Fortran How can I successfully use the LAPACK package with gfortran on windows?

    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...
  19. A

    Fortran Nested iterators produce only zeros as data (gfortran)

    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...
  20. S

    Fortran Gfortran, finding empty text lines?

    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.)...
  21. R

    Fortran Why is my Gfortran Code Not Compiling?

    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...
  22. M

    Fortran How can I fix the Fortran module problem with gfortran?

    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...
  23. L

    Fortran Compilation problem with gfortran

    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...
  24. J

    Fortran Why is my fortran program giving an internal compiler error with gfortran?

    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...
  25. S

    Fortran What causes undefined reference errors in gfortran compilation?

    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
  26. A

    Fortran Using Cuda with gFortran - Is it Possible?

    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...
  27. C

    Fortran Increase of array memory in gfortran compiler

    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
  28. D

    Fortran Newb Success Gfortran & G77 in Vista. Step by Step Tutorial.

    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...
  29. K

    Fortran Why is Gfortran not printing on Cygwin?

    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?
  30. D

    Fortran Fortran - Cygwin, gfortran and emacs

    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'...
Back
Top