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...
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.
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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 *...
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.
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...
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...
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...
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...
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...
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...
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...
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...
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
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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
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...
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 ...
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...
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...
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...
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...
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 =...
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...