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