COMP: scotchDecomp: floating point error checking
This commit is contained in:
parent
bc976819b4
commit
34395ddcd4
@ -129,17 +129,9 @@ extern "C"
|
||||
|
||||
// Hack: scotch generates floating point errors so need to switch of error
|
||||
// trapping!
|
||||
#if defined(linux) || defined(linuxAMD64) || defined(linuxIA64)
|
||||
# define LINUX
|
||||
#endif
|
||||
|
||||
#if defined(LINUX) && defined(__GNUC__)
|
||||
# define LINUX_GNUC
|
||||
#endif
|
||||
|
||||
#ifdef LINUX_GNUC
|
||||
# ifndef __USE_GNU
|
||||
# define __USE_GNU
|
||||
#ifdef __GLIBC__
|
||||
# ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE
|
||||
# endif
|
||||
# include <fenv.h>
|
||||
#endif
|
||||
@ -651,7 +643,7 @@ Foam::label Foam::ptscotchDecomp::decompose
|
||||
|
||||
|
||||
// Hack:switch off fpu error trapping
|
||||
# ifdef LINUX_GNUC
|
||||
# ifdef FE_NOMASK_ENV
|
||||
int oldExcepts = fedisableexcept
|
||||
(
|
||||
FE_DIVBYZERO
|
||||
@ -681,7 +673,7 @@ Foam::label Foam::ptscotchDecomp::decompose
|
||||
"SCOTCH_graphMap"
|
||||
);
|
||||
|
||||
# ifdef LINUX_GNUC
|
||||
# ifdef FE_NOMASK_ENV
|
||||
feenableexcept(oldExcepts);
|
||||
# endif
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -135,17 +135,9 @@ extern "C"
|
||||
|
||||
// Hack: scotch generates floating point errors so need to switch of error
|
||||
// trapping!
|
||||
#if defined(linux) || defined(linuxAMD64) || defined(linuxIA64)
|
||||
# define LINUX
|
||||
#endif
|
||||
|
||||
#if defined(LINUX) && defined(__GNUC__)
|
||||
# define LINUX_GNUC
|
||||
#endif
|
||||
|
||||
#ifdef LINUX_GNUC
|
||||
# ifndef __USE_GNU
|
||||
# define __USE_GNU
|
||||
#ifdef __GLIBC__
|
||||
# ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE
|
||||
# endif
|
||||
# include <fenv.h>
|
||||
#endif
|
||||
@ -503,7 +495,7 @@ Foam::label Foam::scotchDecomp::decomposeOneProc
|
||||
|
||||
|
||||
// Hack:switch off fpu error trapping
|
||||
# ifdef LINUX_GNUC
|
||||
# ifdef FE_NOMASK_ENV
|
||||
int oldExcepts = fedisableexcept
|
||||
(
|
||||
FE_DIVBYZERO
|
||||
@ -526,7 +518,7 @@ Foam::label Foam::scotchDecomp::decomposeOneProc
|
||||
"SCOTCH_graphMap"
|
||||
);
|
||||
|
||||
# ifdef LINUX_GNUC
|
||||
# ifdef FE_NOMASK_ENV
|
||||
feenableexcept(oldExcepts);
|
||||
# endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user