This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

minloc function problem


Hi,

I just tried my large microscopic nuclear reactions code and found only one problem.

In a small routine I have a line

loc = minloc(e,  mask = .not. selected)

where the array selected is initially all False. I am just running through and finding
minimum values. This works with Intel 8.x and Absoft 9.x. But with gfortran it is
interpreted like a scalar rather than an array. Namely, the second dimension
argument is usually "optional" (I think this is f95 addition to f90). If you are doing
f95 strictly you may have to have the dimension argument, but if you are compiling
an f90 code you don't have to. Anyway, the changed version:

loc = minloc(e, ns, mask = .not. selected)

works fine.

FYI

-- 
Prof. S. Umar
Dept. of Physics & Astronomy
Vanderbilt University
Nashville, TN 37235
Tel : (615) 322-2459
umar@compsci.cas.vanderbilt.edu
http://compsci.cas.vanderbilt.edu/~umar/resu.htm


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]