Re: amber-developers: The modification of amber9 sander/qm_mop/qm2_scf.f for g95

From: Scott Brozell <sbrozell.scripps.edu>
Date: Tue, 19 Apr 2005 18:50:29 -0700

Hi,

The maximum line length in Fortran 90 is 132.
Here's a good site for getting the info inside the Fortran standards,
which
are annoyingly hard for ggggooooooooooooooooogggggggggggggggggggggle to
find:
http://www.kcl.ac.uk/kis/support/cit/fortran/f90home.html

On Tue, 19 Apr 2005, Mengjuei Hsieh wrote:

> Hi,
>
> Recently we've tried to use g95 on windows and linux and it seems that
g95
> doesn't like long lines in the code like this:
>
> g95 -c -O3 -ffree-form -o qm2_scf.o _qm2_scf.fWarning (115): Line 376
of
> _qm2_scf.f is being truncatedIn file _qm2_scf.f:376e(1,1) 1Error:
Invalid
> form of array reference at (1)In file _qm2_scf.f:377
> qm2_struct%mat_diag_workspace(1,2),qm2_struct%mat_diag_workspace
> 1Error: Unclassifiable statement at (1)make[1]: *** [qm2_scf.o] Error 1
>
> Here is the modification of the qm2_scf.f file that I used to avoid that
> problem.
>
> Change the line 149 from:
> call
>
qm2_mat_diag(fock_matrix,qm2_struct%norbs,qm2_struct%norbs,qm2_struct%eige
n_
> vectors,qm2_struct%mat_diag_workspace(1,1), &

  123456789012345
 
12345678901234567890123456789012345678901234567890123456789012345678901234
56
  123456789012345678901234567890123456789012345

15 + 76 + 45 = 136

So even without the consideration of whether the max line length
includes the &, that line is too long.

However, it looks like Dave fixed this in revision 1.12.
Nevertheless, there are still many lines that are longer than 80
characters;
many people find such lines inconvenient to read.

Scott

> to
>
> call qm2_mat_diag(fock_matrix,qm2_struct%norbs,&
>
qm2_struct%norbs,qm2_struct%eigen_vectors,qm2_struct%mat_diag_workspace(1,
1)
> , &
Received on Wed Apr 05 2006 - 23:49:58 PDT
Custom Search