Skip to content

add -fdefault-double-8 to r8 toolchain compiler option for GCC (to be consistent with Intel)#4121

Merged
jfgrimm merged 5 commits intoeasybuilders:developfrom
hattom:patch-1
Nov 5, 2022
Merged

add -fdefault-double-8 to r8 toolchain compiler option for GCC (to be consistent with Intel)#4121
jfgrimm merged 5 commits intoeasybuilders:developfrom
hattom:patch-1

Conversation

@hattom
Copy link
Copy Markdown
Contributor

@hattom hattom commented Nov 4, 2022

-r8 for intel promotes reals => 64bit, but leaves doubles as 64bit.
-fdefault-real-8 for gfotran promotes reals => 64bit and promotes doubles to 128bit.
-fdefault-real-8 -fdefault-double-8 yields the same effect as intel's -r8

#4120 contains examples.

-r8 for intel promotes reals => 64bit, but leaves doubles as 64bit.
-fdefault-real-8 for gfotran promotes reals => 64bit and promotes doubles to 128bit.
-fdefault-real-8 -fdefault-double-8 yields the same effect as intel's -r8
@hattom hattom changed the title r8 for GCC (#4120) r8 for GCC Nov 4, 2022
@hattom hattom changed the title r8 for GCC Fix r8 for GCC (to be consistent with Intel) Nov 4, 2022
@jfgrimm jfgrimm added the bug fix label Nov 4, 2022
@jfgrimm jfgrimm added this to the 4.x milestone Nov 4, 2022
@jfgrimm jfgrimm linked an issue Nov 4, 2022 that may be closed by this pull request
@hattom
Copy link
Copy Markdown
Contributor Author

hattom commented Nov 4, 2022

https://github.com/easybuilders/easybuild-framework/blob/develop/test/framework/toolchain.py#L870

the toochain r8 test is failing. Not completely sure I can easily see exactly what's being tested there.

@jfgrimm
Copy link
Copy Markdown
Member

jfgrimm commented Nov 4, 2022

@hattom I think it's assuming it will be a string, and is tripping up because it's now a list

AssertionError: False is not true : r8: True means -['fdefault-real-8', 'fdefault-double-8'] in -O2 -ftree-vectorize -march=native -fno-math-errno -fdefault-real-8 -fdefault-double-8

specifically, https://github.com/easybuilders/easybuild-framework/blob/develop/test/framework/toolchain.py#L875

@hattom
Copy link
Copy Markdown
Contributor Author

hattom commented Nov 4, 2022

Slightly further down in the same file there's

        for prec in precs:
            prec_flags[prec] = ' '.join('-%s' % x for x in Gcc.COMPILER_UNIQUE_OPTION_MAP[prec])

Should the above r8 test be changed to support also: ' '.join('-%s' % x for x) ?

@jfgrimm
Copy link
Copy Markdown
Member

jfgrimm commented Nov 4, 2022

Slightly further down in the same file there's

        for prec in precs:
            prec_flags[prec] = ' '.join('-%s' % x for x in Gcc.COMPILER_UNIQUE_OPTION_MAP[prec])

Should the above r8 test be changed to support also: ' '.join('-%s' % x for x) ?

@hattom yes that should work

Comment thread easybuild/toolchains/compiler/gcc.py
@jfgrimm
Copy link
Copy Markdown
Member

jfgrimm commented Nov 4, 2022

hmm, that's not quite right 😄

AssertionError: False is not true : i8: True means -f -d -e -f -a -u -l -t -- -i -n -t -e -g -e -r -- -8 in -O2 -ftree-vectorize -march=native -fno-math-errno -fdefault-integer-8

Comment thread test/framework/toolchain.py Outdated
@hattom
Copy link
Copy Markdown
Contributor Author

hattom commented Nov 4, 2022

hmm, that's not quite right 😄

AssertionError: False is not true : i8: True means -f -d -e -f -a -u -l -t -- -i -n -t -e -g -e -r -- -8 in -O2 -ftree-vectorize -march=native -fno-math-errno -fdefault-integer-8

The good news is that I tested this already locally.
The bad news is that I tested it with 1 character strings 🤦

@hattom
Copy link
Copy Markdown
Contributor Author

hattom commented Nov 4, 2022

Is this sort of error normal?

== fetching files...
== ... (took 13 secs)
== FAILED: Installation ended unsuccessfully (build directory: /scratch/build/binutils/2.37/system-system): build failed (first 300 chars): Unexpected error occurred when trying to download https://ftpmirror.gnu.org/gnu/binutils/binutils-2.37.tar.gz to /scratch/sources/b/binutils/binutils-2.37.tar.gz: 'Failed to write to /scratch/sources/b/binutils/binutils-2.37.tar.gz: The read operation timed out' (took 13 secs)
== Results of the build can be found in the log file(s) /scratch/tmp/eb-rt_hozr7/easybuild-binutils-2.37-20221104.141736.CKNar.log
FATAL:   While performing build: while running engine: exit status 1
Error: Process completed with exit code 1.

@branfosj
Copy link
Copy Markdown
Member

branfosj commented Nov 4, 2022

We do see odd errors from time to time. I've kicked the failed tests to run again.

@jfgrimm jfgrimm added the change label Nov 5, 2022
@jfgrimm jfgrimm changed the title Fix r8 for GCC (to be consistent with Intel) add fdefault-double-8 to r8 toolchain compiler option for GCC (to be consistent with Intel) Nov 5, 2022
Copy link
Copy Markdown
Member

@jfgrimm jfgrimm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jfgrimm
Copy link
Copy Markdown
Member

jfgrimm commented Nov 5, 2022

Going in, thanks @hattom!

@jfgrimm jfgrimm merged commit 636eace into easybuilders:develop Nov 5, 2022
@jfgrimm jfgrimm modified the milestones: 4.x, next release (4.6.3?) Nov 5, 2022
@boegel boegel changed the title add fdefault-double-8 to r8 toolchain compiler option for GCC (to be consistent with Intel) add -fdefault-double-8 to r8 toolchain compiler option for GCC (to be consistent with Intel) Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

r8 options different for GCC and Intel

4 participants