Re: [petsc-dev] 32 bit compilers and PETSc
Not really bad compilers. Just 32 bit compilers. 640k is all anyone will ever need.
On Mar 4, 2021, at 10:13 AM, Scott Kruger <[email protected]> wrote:
On 2021-03-04 08:58, Satish Balay via petsc-dev did write:
On Wed, 3 Mar 2021, Barry Smith wrote:
Can we make ./configure ban 32 bit compilers unless a special flag is used? And just have one CI test that uses 32 bit where we turn off examples that overflow 32 bits?
We could add another linux test where 32bit part is more obvious.
And we have "requires: defined(FLAG)" but not sure if we can check for "PETSC_SIZEOF_VOID_P 8" this way. Perhaps we can add to configure:
requires: defined(PETSC_USING_64BIT_PTR) or requires: !defined(PETSC_USING_32BIT_PTR)
This sounds like a lot of work just to figure out which tests overflow, and then clutter up the tests just to fix bad compilers. For example, does the "medium" test matrix cause overflow? Perhaps we could just turn off any external file reading?
Scott
Satish
--- diff --git a/config/BuildSystem/config/types.py b/config/BuildSystem/config/types.py index 39eda33099..d35adae503 100644 --- a/config/BuildSystem/config/types.py +++ b/config/BuildSystem/config/types.py @@ -268,6 +268,8 @@ char petsc_max_path_len[] = xstr(PETSC_MAX_PATH_LEN); 'enum': (4, 8), 'size_t': (8, 4)}.items(): self.executeTest(self.checkSizeof, args=[t, sizes]) + if self.sizes['void-p'] == 8: + self.addDefine('USING_64BIT_PTR',1) self.executeTest(self.checkVisibility) self.executeTest(self.checkMaxPathLen) return
./configure CFLAGS=-m32 CXXFLAGS=-m32 FFLAGS=-m32 --with-mpi=0 && make && make check
-- Scott Kruger Tech-X Corporation [email protected] 5621 Arapahoe Ave, Suite A Phone: (720) 466-3196 Boulder, CO 80303 Fax: (303) 448-7756
participants (1)
-
Barry Smith