Problem running model (allocatable array is already allocated)

Problem running model (allocatable array is already allocated)

Hi, all.

I'm trying to run an ocean model called wavewatch and I'm having some problems.

I'm not a programmer so maybe my questions are quite simple or are not quite correct. So, I'm sorry.

I'm on a (uname -a):
Linuxmycomputer 2.6.24-24-generic #1 SMP Sat Aug 22 00:30:49 UTC 2009 x86_64 GNU/Linux

I'm using ifort: 11.1.038 (intel64)

I installed the model following the manual and ran a test case without problems. But when i'm trying to run the model in other caseI get some errors:

forrtl: severe (151): allocatable array is already allocated
Image PC Routine Line Source
ww3_shel 00000000005712CD Unknown Unknown Unknown
ww3_shel 000000000056FDD5 Unknown Unknown Unknown
ww3_shel 0000000000514B99 Unknown Unknown Unknown
ww3_shel 00000000004CD46D Unknown Unknown Unknown
ww3_shel 00000000004F786B Unknown Unknown Unknown
ww3_shel 0000000000410D68 Unknown Unknown Unknown
ww3_shel 000000000040348C Unknown Unknown Unknown
libc.so.6 00002B7BFDA8E1C4 Unknown Unknown Unknown
ww3_shel 00000000004033B9 Unknown Unknown Unknown
forrtl: error (76): Abort trap signal
Image PC Routine Line Source
ww3_shel 00000000005712CD Unknown Unknown Unknown
ww3_shel 000000000056FDD5 Unknown Unknown Unknown
ww3_shel 0000000000514B99 Unknown Unknown Unknown
ww3_shel 00000000004CD46D Unknown Unknown Unknown
ww3_shel 00000000004D1883 Unknown Unknown Unknown
libpthread.so.0 00002B7BFD8627D0 Unknown Unknown Unknown
libc.so.6 00002B7BFDAA2095 Unknown Unknown Unknown
libc.so.6 00002B7BFDAA3AF0 Unknown Unknown Unknown
ww3_shel 00000000004CD458 Unknown Unknown Unknown
ww3_shel 00000000004F786B Unknown Unknown Unknown
ww3_shel 0000000000410D68 Unknown Unknown Unknown
ww3_shel 000000000040348C Unknown Unknown Unknown
libc.so.6 00002B7BFDA8E1C4 Unknown Unknown Unknown
ww3_shel 00000000004033B9 Unknown Unknown Unknown
Cancelled (core dumped)

There are some script related with ifort configuration:

First (compiler options)
# --------------------------------------------------------------------------- #
# 2. Compile #
# --------------------------------------------------------------------------- #
# Add here the correct compiler call including command line options
# Note: - do not invoke a link step
# - if possible, generate a listing $name.l
# - make sure the compiler point to the proper directory where the
# modules are stored ($m_path), see examples below.

# 2.a Determine file extension - - - - - - - - - - - - - - - - - - - - - - - -
# .f90 assumes free format, .f assumes fixed format, change if necessary

if [ -f $name.f90 ]
then
fext='f90'
else
fext='f'
fi

# 2.b Perform compilation - - - - - - - - - - - - - - - - - - - - - - - - - -
# Save compiler exit code in $OK
#
# Intel compiler on Linux ----------------------------------------------------
# 2.b.1 Build options and determine compiler name
# Note that all but GrADS output is forced to big endian data

# opt="-c -list -O3 -unroll -tpp7 -Zp8 -module $path_m"
opt="-c -g CB -list -O3 -module $path_m"

if [ "$name" != 'gx_outp' ] && [ "$name" != 'gx_outf' ]
then
opt="$opt -convert big_endian"
fi

if [ "$mpi_mod" = 'yes' ]
then
comp=mpif90
else
comp=/opt/intel/Compiler/11.1/038/bin/intel64/ifort
fi

# if [ "$omp_mod" = 'yes' ]
# then
# opt="$opt -mp"
# fi

# 2.b.2 Compile

$comp $opt $name.$fext > $name.out 2> $name.err
OK="$?"

Second (linker options)

# --------------------------------------------------------------------------- #
# 3. Link all things #
# --------------------------------------------------------------------------- #
# Add here the correct linker call including switches

# Intel compiler ------------------------------------------------------------
# 3.a Build options and determine compiler name
# No GRIB libraries for this one

opt="-O3 -Zp8 -tpp7 -o $prog"

if [ "$mpi_mod" = 'yes' ]
then
comp=mpif90
else
comp=/opt/intel/Compiler/11.1/038/bin/intel64/ifort
fi

# if [ "$omp_mod" = 'yes' ]
# then
# opt="$opt -mp"
# fi

# 3.b Link

$comp $opt $objects > link.out 2> link.err
OK="$?"

Thank you very much!!

7 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

Quoting - etmeyer

etmeyer is right - you have a code bug where an ALLOCATE is passed a variable that has already been allocated.

To isolate this, change your build script a little. For the

opt=

lines on BOTH compile AND LINK, add

-g -traceback

to the other arguments. This should give you the source file and line number where the error is occurring.

Quoting - basuradek

It looks like either an error in the code (your model triggers something that tries to re-allocate an allocatable), or perhaps a namespace issue if this is a big set of codes.

First, are you having to recompile, it looks like, for each model? You might want to check the .err file to see if it compiled correctly. If it didn't but is still trying to run, you might get some weird results.

The optimist thinks that this is the best of all possible worlds, and the pessimist knows it. -- J. Robert Oppenheimer, \"Bulletin of Atomic Scientists\"

Quoting - Ronald W. Green (Intel)

etmeyer is right - you have a code bug where an ALLOCATE is passed a variable that has already been allocated.

To isolate this, change your build script a little. For the

opt=

lines on BOTH compile AND LINK, add

-g -traceback

to the other arguments. This should give you the source file and line number where the error is occurring.

Hi.

I compiled the code with "-g -traceback" options and the problem is in line 592 in the file attached to this post.

I'm sorry but I do not program in fortran since ten years ago and maybe my questions are very simple and the problemare not related with ifort.

Thank you everybody.

Allegati: 

AllegatoDimensione
Download ww3_shel.f9038.17 KB

Hi, again.

I found the trouble. Now it's working.

Thank you (etmeyer and Ronald) and everybody because your suggestions where very helpful.

Hi,

I am also runninga wave model and have the same error when running certain cases; however, I am using two way nesting (ww3_multi).

I was wondering how you fixed your problem in the one way nesting (ww3_shel)?

Thanks, any help/info would be greatly appreciated!

Citation :

basuradek a écrit :
Hi, again.

I found the trouble. Now it's working.

Thank you (etmeyer and Ronald) and everybody because your suggestions where very helpful.

Can you tell us how did you resolve this problem??

tnks

Accedere per lasciare un commento.