Fortran runtime error - array allocation

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
trs

Fortran runtime error - array allocation

#1 Unread post by trs »

Hello.

I have just downloaded, installed and compiled NetCDF and ROMS 3.0 without any problems. However when I try to run ROMS I immediately receive the error message: Fortran runtime error: attempting to allocate already allocated array. I get this for the two test cases I have tried - upwelling and benchmark.

I am using a 64-bit linux machine with a gfortran compiler.

Does anyone have any suggestions about this?

Thank you for your help.

Tania.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

#2 Unread post by kate »

In general, this could be a problem with gfortran or with ROMS. One way to tell is to try another compiler to see if it gives the same result. Last time I tried gfortran I didn't have this problem, but it was before a few ROMS changes. The next thing to try is to look at the source code. Does it tell you a line number? The variable name? Are we indeed allocating something twice and if so what?

Sure, I could try the latest ROMS with my gfortran, but this is a relatively easy thing for you to track down since you got actual error messages. Think of it as a lesson in dealing with models. ROMS is not for the faint of heart when it comes to facing code. I'm running the debugger on it to look for a more elusive tides problem (or several, heh).

trs

#3 Unread post by trs »

Thanks for the suggestions. I have managed to get things running OK using g95. With gfortran, the error occurs just after the version number and date/time are displayed. I don't get any information about where the error has occurred, or what variable is involved. I think I will stick with g95 for the moment.

Tania.

Post Reply