Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29277 Discussions

setting optimisation to 3 causes program to hang

jim_cox
Beginner
736 Views

My program is hanging if i set optimisation to /O3

It is a nested loop

First pass through the outer loop, the inner loop is all good

But on second pass through the outer, the inner loop hangs

Any thoughts what might cause this?

It works fine with /02

I note that one difference with /O3 is that a number of variables, including one of the loop control variables, are shown as a 'register variables' - maybe thats a hint

Thankx again for your help

Jim

=mjc=

.

0 Kudos
8 Replies
Steven_L_Intel1
Employee
736 Views
What do you mean "hang"? Does the process go CPU-bound? Does it just stall at 0% CPU usage? Can you provide a test case?
0 Kudos
IDZ_A_Intel
Employee
736 Views

Also,

Is the program multi-threaded, autoparallized, or single threaded?

And, is the loop performing a convergence? If convergence, show us how you test for convergence.

Jim Dempsey

0 Kudos
jim_cox
Beginner
736 Views

(problem with lost post - lets try this again...)

hung means hung like sitting in an infinite loop making no progress - loop counter display never goes past one on the scond iteration

taskman shows 13% cpu usage on both first and second iterations

Sorry I cant easily provide a good testcase as its one of my old monster programs :(

Its linked multi threaded

And its not parallelised yet - thats where I'm trying to go

Working build uses...

/nologo /Od /fpp /assume:nocc_omp /gen-interfaces /f77rtl /intconstant /fpscomp:ioformat /fpscomp:general /warn:interfaces /integer_size:16 /Qzero /fpe:1 /Qftz /names:uppercase /iface:cvf /module:"Release\" /object:"Release\" /traceback /libs:static /threads /4Yportlib /c

I'm think it may be to do with variable declartions : seems like something there first time is munged second time round

Any hints where to go looking or on sucessful optimsation welcomed

0 Kudos
IDZ_A_Intel
Employee
736 Views

Have you checked you code for use of uninitialized variables? Your program cannot assume a variable not used is auto-initialized to 0. Testing with run-time option to check for use of uninitialized variables will catch most offences.

Jim Dempsey

0 Kudos
jim_cox
Beginner
736 Views

Thanky Mr Dempsey - I think that answers my question.

Found a couple of examples

And I now have a build with /O3 that runs

Program run times are now a 1/4 of previous - yay :)

But when I try turning on /QParallel I get

4>(0): internal error: backend signals
4>Link: error #10014: problem during multi-file optimization compilation (code 4)
4>Link: error #10014: problem during multi-file optimization compilation (code 4)

messages

Any thoughts? What am I missing?...

A very happy Friday to all

Jim

=mjc=

.

0 Kudos
IDZ_A_Intel
Employee
736 Views

Try turning OFF Interproceedural Optimizations.

IPO may be a seperate issue.

0 Kudos
jim_cox
Beginner
736 Views

That worked to get it to link

But now I'm back to it hanging on the second pass through the loop :(

0 Kudos
Steven_L_Intel1
Employee
736 Views

Jim,

Can you provide us with the source that results in the internal error with /Qparallel? Include any INCLUDE or MODULE files it needs. Thanks.

0 Kudos
Reply