Project

General

Profile

Bug #919

Investigate report of problem with floating point exception control service.

Added by Christopher Green almost 9 years ago. Updated over 6 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Infrastructure
Target version:
-
Start date:
02/01/2011
Due date:
% Done:

0%

Estimated time:
Occurs In:
Scope:
Experiment:
SSI Package:
Duration:

Description

Under IA32 apparently FPEs cannot be disabled.

See subsequent comments for correspondence on CMS EDM Hypernews. Information and unit tests should be ported to art.


Related issues

Related to art - Bug #4318: Floating point exception service likely to be only partially workingClosed02/02/2015

History

#1 Updated by Christopher Green almost 9 years ago

For full details see https://hypernews.cern.ch/HyperNews/CMS/get/edmFramework/2653.html (permission required).

Thread details published as subsequent comments for a permanent record.

#2 Updated by Christopher Green almost 9 years ago

Forum: Framework and Edm Development
Date: Dec 20, 15:57
From: Matti Kortelainen <Matti Kortelainen>

Hi,

I suspect the EnableFloatingPointExceptions doesn't work as it should at the
moment (tested in 3_11_0_pre1 in slc5_ia32_gcc434 and slc5_amd64_gcc434). What
seems to happen is that the service only enables the various FPE bits, but
never disables them (i.e. it looks like feenableexcept(mask) only enables the
bits with value 1 in the mask, but it doesn't disable the 0 bits).

I tested what happens if I add 'fedisableexcept(FE_ALL_EXCEPT)' call before
each feenableexcept() and for amd64 it seems to make the problem to go away,
but for ia32 then fegetexcept() seems to signal the exception if FPE was
signaled while they were disabled. I don't know if there are any other
(undesirable) side effects.

I have a configuration demonstrating the behaviour here (it works at least in
lxplus)
/afs/cern.ch/user/m/mkortela/public/fpe_step2_RAW2DIGI_L1Reco_RECO_DQM.py

Here I tried to enable only the DivByZero for 'ecalGlobalUncalibRecHit' and
only the Invalid for the others (via 'default'), but in the end both DivByZero
and Invalid appear to be enabled for all modules.

Cheers,
Matti

#3 Updated by Christopher Green almost 9 years ago

Forum: Framework and Edm Development
Re: None EnableFloatingPointExceptions in 311X (Matti Kortelainen)
Date: Dec 22, 18:23
From: William David Dagenhart <William David Dagenhart>

Hi Matti,

I checked in a fix to the bug you reported. Thanks for
finding and reporting this problem. Let us know if
you notice any more.

I tested this on ia32 and amd64. It would be nice if
someone could test on an Apple (and any other
platforms that are being used). What goes on in that service
is platform dependent. Manipulating the bits controlling
the exceptions in not supported in the standard C library.
We are using a glibc extension for linux and some functions
that hack around in data structures that are not really supposed
to be modified for Apple (although it probably works) ...
There is a good unit test in FWCore/Services.

At each transition where the exception behavior changes
the code will clear the status bits, get the bits that control
the exception behavior, enable only the bits that need to
be enabled and disable only the bits that need to be disabled.

I did not want to add the step clearing the status bits, but
without it I get FPE crashes when disabling or getting the
bits. If someone knows a better alternative, I would be willing
to implement it.

I also extended the unit tests to cover this case.

The fixes are all in FWCore/Services on the head. I expect
Bill will submit them for the 3_11_X IB soon.

Regards
David Dagenhart

#4 Updated by Christopher Green almost 9 years ago

Forum: Framework and Edm Development
Re: None EnableFloatingPointExceptions in 311X (Matti Kortelainen)
Re: None Re: EnableFloatingPointExceptions in 311X (William David Dagenhart)
Date: Dec 28, 08:57
From: Matti Kortelainen <Matti Kortelainen>

Hi David,

thanks for the fix! Now the service appears to work as (at least I) expected
(in amd64).

Cheers,
Matti

#5 Updated by Christopher Green over 8 years ago

  • Subject changed from Investogate eport of problem with floating point exception control service. to Investigate report of problem with floating point exception control service.
  • Status changed from New to Assigned
  • Assignee set to Christopher Green

#6 Updated by Walter E Brown almost 8 years ago

  • Status changed from Assigned to Accepted
  • Assignee deleted (Christopher Green)

#7 Updated by Christopher Green over 6 years ago

  • Status changed from Accepted to Rejected

Rejected as superseded by issue #4318.



Also available in: Atom PDF