Note that there are some explanatory texts on larger screens.

plurals
  1. PODifficulties compiling a FORTRAN program
    text
    copied!<p>I would like to use some light scattering codes written in Fortran. I am quite familiar with MATLAB and teaching myself C++ but right now Fortran is causing me a lot of grief. </p> <p>I just got Photran working with Eclipse and it works compiling (using Gfortran from Cygwin as per Photrans instructions) example Fortran programs I have found online.</p> <p>The main one I would like to get working is here: <a href="http://www.ugr.es/~aquiran/ciencia/codigos/homer.f" rel="nofollow noreferrer">http://www.ugr.es/~aquiran/ciencia/codigos/homer.f</a> (note over half of it is just console output and comments it seems, the actual code is quite small).</p> <p>I actually have written a program in Mathematica which do these calculations already, but I feel it would be a good test case to get my hands dirty in Fortran and move to other codes. If anyone could point me in the right direction to get this compiling that would be great. Thanks. </p> <p>Edit: So I get it as far as compiling it with just up to (just with warnings)</p> <pre><code>OPEN (1,FILE='q.dat') </code></pre> <p>The second I add</p> <pre><code>DO I=1,5 WRITE (*,*) END DO </code></pre> <p>I get 3 errors:</p> <p><img src="https://i.stack.imgur.com/2Fp7m.png" alt="Fortran errors"></p> <p>Once I remove the DO I can add the writing and eg.</p> <pre><code> WRITE (*,*) 'This code calculates cross-efficiencies for' </code></pre> <p>And it will compile and make the .exe. I am guessing the DO's are causing me a issue. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload