From: Arjan on
I compiled my code with ifort 11.0 under linux.
All goes well when I use the following parameters at compilation to
get a debuggable program:
-g -debug -C -traceback -assume byterecl
The same run crashes when I use optimization:
-fast -assume byterecl
To narrow down to the problem, I added some write-statements.
The crash vanished...

What to do to get non-crashing, optimized code?

Arjan
From: Alois Steindl on
Arjan <arjan.van.dijk(a)rivm.nl> writes:

> I compiled my code with ifort 11.0 under linux.
> All goes well when I use the following parameters at compilation to
> get a debuggable program:
> -g -debug -C -traceback -assume byterecl
> The same run crashes when I use optimization:
> -fast -assume byterecl
> To narrow down to the problem, I added some write-statements.
> The crash vanished...
>
> What to do to get non-crashing, optimized code?
>
> Arjan
Hello,
you will have to debug your code very carefully; turn all warning
messages and checks on, when you compile the code.
Another option would be to also try a different compiler.

Good luck
Alois
From: mecej4 on
Arjan wrote:

> I compiled my code with ifort 11.0 under linux.
> All goes well when I use the following parameters at compilation to
> get a debuggable program:
> -g -debug -C -traceback -assume byterecl
> The same run crashes when I use optimization:
> -fast -assume byterecl
> To narrow down to the problem, I added some write-statements.
> The crash vanished...
>
> What to do to get non-crashing, optimized code?
>
> Arjan
The symptoms described indicate one more possibility: a bug in the optimizer
pass of your compiler. I ran into one such bug, which was related to loops
in which elements of a vector were calculated by a recurrence relation.

http://software.intel.com/en-us/forums/showthread.php?t=74516

Alois Steindl's recommendation of trying a different compiler is worth
pursuing.

-- mecej4
From: AnotherSquid on
On Jun 2, 7:29 am, Arjan <arjan.van.d...(a)rivm.nl> wrote:

> I compiled my code with ifort 11.0 under linux.
> All goes well when I use the following parameters at compilation to
> get a debuggable program:
> -g -debug -C -traceback -assume byterecl

I would also add the "-fpe0" compile option to trap floating point
exceptions.

Andy
From: AnotherSquid on
On Jun 2, 7:29 am, Arjan <arjan.van.d...(a)rivm.nl> wrote:

> The same run crashes when I use optimization:
> -fast -assume byterecl
>
> What to do to get non-crashing, optimized code?

Does it crash when you change the "-fast" option to "-O" (that's a
letter capital oh)?

Andy