Fortran Definition and 876 Threads

  1. Saladsamurai

    BinariesWhat are some free Fortran compilers for Mac OSX?

    I was just wondering if anyone can recommend any free Fortran compilers for OSX on Mac? I am going to be starting some work that requires the use of Fortran and though I have a Windows machine, I would like to use my Mac since it is faster. I have Googled around, but I am really not sure...
  2. J

    Fortran Programming in FORTRAN - Begginer

    I've to do a program which read "N" pairs of points and print the points which are contained in a two dimensions quadrilateral domain with vertices on (2,2), (2,5), (7,5) and (5,2), Can anyone help me? Thanks for the atention and patience.
  3. S

    Fortran Fortran 2008: The Final Steps of Standardization for Scientific Computing

    http://www.nag.co.uk/sc22wg5/ It looks like Fortran 2008 is going through its final steps of standardization. What does this mean for scientific computing? Since people still use Fortran 90 despite new revisions up to 2003, will this go under the radar, or will this be a new and useful...
  4. O

    Fortran How to declare real constants in Fortran? Please help

    How do I declare constants beginning with "zero" in Fortran to get the output beginning with zero ? If I declare : I get the output: Thanks in advance
  5. O

    Fortran How to Implement a Do-Loop for Incremental Calculations in Fortran?

    I can't figure out how to make a do-loop in Fortran to do the following: I have 2 variables. Let's say: and I need 10 fields printed out. The first field will have the value: level + step <then the value of the one above + step> <then the value of the one above + step> <then the...
  6. D

    Fortran Question about printing with FORTRAN

    Hey guys, I tried looking around on the web and came back without much luck.. Is it possible to print FORTRAN output using FORTRAN code? When I say "print," I mean to a local printer such as a laserjet.. not just printing to the terminal screen.. I've searched pretty intensely on the...
  7. D

    Fortran Help with reading file into FORTRAN

    Hey all, I'm in the process of writing a Suggested Reorder Program for my father's small business.. His current computer program exports its item data in the form of .CSV files. I'm trying to read the file into FORTRAN to manipulate. However, I run into the following problem: Even...
  8. G

    MATLAB MATLAB To FORTRAN Troubles (eig.m equivalent?)

    Hello all, first time I post here. I'm doing a PhD in Plasma Physics at the moment and have always been using MATLAB. It seems the research industry however does not look kindly on MATLAB and develops solely on FORTRAN (!).. Anyway, I don't need to go into a lot of detail. I have a big 10x10...
  9. M

    Fortran Turn off writing to screen in Fortran 90

    Hi, Is there a command available that makes the compiler ignore all write(*,*) statements?! The thing is, I'm working on a code which will eventually run for several hours (perhaps days) to complete a single run. At the moment I'm testing so I write a lot of data to the screen in order to...
  10. P

    Is there any command in Fortran that is similar to eval in MATLAB?

    Hello, I am trying to write a Fortran subroutine to solve non-linear equations (given by external function fnxname) using Newton's method, where the derivative is given by finite difference calculation. How may I use the function in the program. Suppose the desired function name is given...
  11. V

    Comp Sci Comparing array of data is fortran

    Hi FORTRAN experts, I have two arrays of data, called data1.dat and data2.dat. each contains 60 data. What I want to do is to compare the data in each file and write the counting into bins. It goes like this. First, take the first data in data1.dat file and compare with the 60 data in...
  12. J

    Fortran Salford fortran library compiler error?

    Salford fortran library compiler error?? Dear all, I have install the NAG fortran library, firstly, I compile the fortran program by using the Salford Fortran compiler with NAG static Lib. Command Prompt by typing ftn95 -c ProgramName.f95 It got a few warning, not error. But I...
  13. A

    Return Multiple variables in Fortran

    Hey Guys, I am converting my code from MATLAB to fortran. Now in MATLAB it is rather convenient to write a function which returns multiple variables. I believe a function in fortran can return only one variable. I think a subroutine can return multiple variables. I was not able to find any...
  14. N

    Comp Sci Fortran 77: Reading CSV File & Outputting Time, Latitude, Longitude

    Hi guys and gals, I'm trying to use fortran 77 to read a csv file which has data like this...
  15. F

    Fortran Why isn't my Fortran program running properly?

    We made a program for our thermo class and when we go to run it, it tells us errors were encountered but will not display what errors it has. It won't print out anything. I appreciate any help you guys have to offer. Print *, 'Nicholas Grover / Corey Demers' Print *...
  16. W

    Fortran Which Fortran version to learn

    I have decided to learn Fortran over the summer. However there are various versions out there. Which version would you recommend learning? I will be using Fortran for computation in physics primarily. I will also be interfacing Python and Fortran together.
  17. R

    Fortran Why is my FORTRAN 90 Program Producing Unexpected Matrix Elements?

    Hi all, I encountered a problem while running a FORTRAN 90 program, which appears (to me) to be quite surprising. Can someone please explain the following things: 1. Why the (4,1) element of the beta matrix is 5.0 instead of being 2.0 ?? 2. Why the (5,8) element of the beta matrix...
  18. E

    MATLAB Fortran 90 vs Matlab: Comparing Program Speed

    Hello. I am trying to translate a program written in MATLAB to a fortran code and I have found out that the fortran code is slower. I couldn't believe it so I decided to do a simple program in fortran 90 and MATLAB in order to be sure. The code in MATLAB is: function D2D() Nx=2^11...
  19. W

    Fortran How Can I Integrate Two Fortran Programs for a Game of Hangman?

    Hello all, I am attempting to make a fortran program that allows the user to play a game of hangman. So far I have written a complete program that assembles piece by piece the base, gallows, rope, body parts, etc.. I have another completely separate program that reads from a file 264 random...
  20. C

    Fortran Formatted output problem in Fortran

    Hello, I have correctly defined my OPEN and CLOSE statements. When all of my WRITE statements with their associated FORMAT statements are at the end of the program I get the formatted output that I need. If I move one of the WRITE statements to the body of the program (within a particular...
  21. L

    Fortran Need help installing fortran compiler

    Hi! I wanted to install a f77 compiler, I am running Win7 but also have WinXP, I installed MinGW 5.1.3 and did everything mentioned in this pdf (https://docs.google.com/viewer?url=http://www.pns.anl.gov/instruments/scd/subscd/Fortran_and_C.pdf) So, basically its an automatic installer, I...
  22. Ƒ

    Fortran Can You Loop Numbers and Write an Output File in Fortran?

    Is it possible to loop a set of numbers? For example I wish to run a set of number 1,2,3,4,5...52 but when we get to 52 I wish to go back to 1 and start looping again. How do write an output file in Fortran? I have opened a file and moved each character so that each letter has moved for...
  23. N

    Fortran Fortran: help with I/O in Direct Access and Seq. access

    Hello, I am implementing simple check-pointing in an application so that the history is saved to a file and upon restart the data is read from this file. -> The history file contains an array of real*8 numbers and precision is very important in the program. I first implemented this using...
  24. C

    Fortran (Fortran) Does order of accessing a matrix affect the performance?

    Hello, In Fortran 90, will the performance (in terms of computational efficiency) of the following two be the same. If not, which one will be faster. Please advise with the reasoning: (i) do i = imin,imax do j = jmin,jmax do k = kmin,kmax Several statements (rigorous...
  25. S

    Finding Fortran Compiler & Running Clawpack on Windows XP

    I don't know fortran. I have to run few files from clawpack and I have to get results. I have windows xp 2002. Can anyone tell me what software/fortran compiler should I install ? and how do I get results? Thanks in advance
  26. O

    Fortran Simple Fortran Reading Values and Calculations

    I am trying to self-teach myself Fortran for an undergrad research position. A basic program that I am trying to develop is something will open a file, read a single value from a large table of data, do some calculations with it, and print it into a new file. I was hoping to get a little advice...
  27. S

    Fortran Merging arrays in fortran 90/95

    Hi, can someone help me with this one? I'm trying to merge several 1d-arrays into one 2d-array. Is there any intrinsic routine/function in fortran 90/95 to do so? I also thought of pointers. Can I assign a 2d-pointer to more than one object so I have a pointer array whose columns point to...
  28. N

    Fortran Help with formatted output in fortran

    Hello, I am trying to print in formatted output using the format specifiers but I am not able to get the correct output. I am trying to print an array with 11 reals, followed by one more real number and finally an integer. When I skip the integer, the format statement works and but when I add...
  29. Ƒ

    Fortran Simple Fortran Program With Random Numbers

    I have been busy trying to generate, using FORTRAN's random number generator, random x and y co-ordinates which follow a simple pattern such as x2-100x, but for some reason the FORTRAN compiler prints nothing. Anybody want to help me with this problem? program quadraticdistribution...
  30. A

    Finite difference method in fortran

    1. I have problem numerical solving of PDE with finite difference method in fortran. it is about optical fibers. At the beginning of the fiber the delta impuls is inserted, and I need function at the end of the fiber. 2. The equation is given in attachement as the code in fortran...
  31. R

    Fortran Learn Fortran Programming: Tips & Resources

    Hi , i need help in writing fortran code.? can any suggest me best site or where to approach?
  32. N

    Fortran Co-Array Fortran: Questions & Answers for Amateur Programmers

    Hi Guys, I have coded in f77/f90 for a few years in what I would consider a fairly amateurish way but I am now hitting the CPU wall for some programs and need to parallelize some programs to make use of multiple cores. Looking around Google, I quickly came across this co-array business...
  33. N

    Fortran Quantile subroutine, Fortran 90

    Hi all, I have been Googling for a Fortran 90 quantile routine but to no avail... I need a subroutine to which one passes an 1-D array plus the quantile range required... e.g. "call quantile(array,0.5D0,value)" would give me the median of array. Does anyone know of a handy (and...
  34. R

    Comp Sci How can I read an array from a specific part of a file in FORTRAN 77?

    Using Fortran 77, I'm trying write a program which will read in the coordinates of the atoms in a molecule from this input file: 21 Aspirin C 0.8641 0.1885 -0.0550 C 1.6904 1.2832 -0.0518 C 3.0579 1.1437 -0.0197 C 3.6120 -0.1296 0.0167 C 2.7571 -1.2117 0.0051 C 1.3999 -1.0697 -0.0319...
  35. Ƒ

    Fortran Solving Problems in Fortran Code for Prime Numbers

    Everytime I try to compile the followng code, it fails to give me the values when n is greater than one, I have tried and failed to correct that mistake, can you help? program sieve implicit none integer*1 s(1000000), offset (10), sequence integer i, j, n c INITIALISATIONS: n=0...
  36. D

    Fortran What does errorfmt mean when running Fortran g77 code?

    Hi, I received a code written in Fortran 77, and I am trying to compile it and run it using g77. It compiles easily with no errors, but I keep getting the following error when I execute errorfmt: read unexpected character apparent state: unit 5 named jeffin last format: (10X,D13.7) lately...
  37. Ƒ

    Comp Sci What Is the Last Prime Quadruplet in the Sequence i, i+2, i+6, i+8?

    Homework Statement I am trying to find prime numbers that are i,i+2,i+6,i+8 apart. Could someone tell me the last set that this gives? Homework Equations - The Attempt at a Solution program sieve_t implicit none integer*1 s(1000000), offset (10), sequence integer i, j, n...
  38. C

    Fortran How Do I Determine Single-Precision Machine Constants in Fortran?

    Help! I know almost nothing about Fortran but need to use a program by others. I encountered a problem in determining the "Single-Precision Machine Constants" for my desktop computer (intel pentium dual core 5200 2mb l2 2.5ghz 800 fsb with Window Vista). Please take a look at following part or...
  39. A

    Fortran Solving Problem in Fortran Program - Bevington Polyfit.f

    hi all, greetings, i have a fortran prg to fit 2nd order polynomial to my data taken from (bevington--- polfit.f) i'm making some mistake, and i could not find what is the problem with this. When i give some other other random data it is fitting properly but not the data i have :( for...
  40. D

    Ising Model & Wolff's algorithm in FORTRAN

    Hi, I have the problema of implementing wolff's algorithm for ising model in 2-D lattice. Has anyone ever done this algorithm in FORTRAN ? I have questions of how to join the clusters. Alexandre
  41. B

    Fortran Help to a FORTRAN newbie with KIND, please

    Hi, I'm starting with FORTRAN (I have Microsoft Powerstation) and I was experimenting with KIND. Specifically, what I wanted was: integer (kind=8):: list of variables But the compiler doesn't let me use KIND with integers if kind>4, and I really need to use long integers. Can someone...
  42. fluidistic

    Fortran Simple program in Fortran, I get an error

    It's not an assignment. Rather I'm trying to learn back some fortran. I've found a website with some simple problems to do, that's where I got this one. See the first problem of this page : http://www.chem.ox.ac.uk/fortran/. Here's my program : Program vasy implicit none Integer ...
  43. Ƒ

    Comp Sci Solving Twin Primes with a Sieve Algorithm in Fortran

    Homework Statement I have been trying to come up with a program to calculate twin primes using a sieve algorithm in Fortran. So far I have been successful in creating one that finds primes, but I am having difficulty finding one that finds prime twins. If I knew how to do this I could find...
  44. D

    Fortran Fortran: Passing loop names to subroutines

    Hello, A Fortran program I'm working on has a few nested, recursive subroutines, with many entry points between each one (there are lots of places in the first subroutine where calls to the 2nd depth subroutine are made, etc.). I'm looking for a way to conditionally exit all subroutines...
  45. C

    Comp Sci Reading and Multiplying Matrices in Fortran?

    I have two files I need to read arrays out of using the "open" command and I keep getting a compiler error saying "(col. 1) remark: LOOP WAS VECTORIZED." I assume this is because I am reading the data out of the files incorrectly but I don't really understand what "loop was vectorized" means...
  46. B

    LAPACK for Fortran under Cygwin

    I just installed LAPACK, but I'm not sure how to use it. The documentation tells about the routines, but the problem is my compiler isn't recognizing them. For example...I wrote a simple Fortran program to test a routine (SGESV): program testlapack implicit none...
  47. Somefantastik

    Fortran Finding a Good Fortran Intro Text: Examples & Exercises

    Can someone suggest a good fortran introductory text, with examples and exercises?
  48. K

    Comp Sci Fortran 90 Euler Scheme for Radioactive Decay

    Homework Statement in fortran 90 write a program to using the euler scheme to solve the differential equation for decay of a radioactive substance dx/dt = -j*x solving the equation we get x = e^(-j*t) following info is given 2. Homework Equations and values t0 = 0.0 tF =...
  49. A

    Fortran How to Call Gnuplot from Fortran to Plot Data Points?

    hello. I have a fortran code that has data points as output. How do I get fortran to plot these data points using gnuplot? Is there a way to call the external program from within fortran? I am using fortran95, gfortran compiler. I'm on a windows machine, but I'm connected remotely to...
Back
Top