Bug 77897 - Compile error with KNL & -O3 for GTC code
Summary: Compile error with KNL & -O3 for GTC code
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-07 19:17 UTC by Bill Long
Modified: 2020-01-18 03:04 UTC (History)
0 users

See Also:
Host:
Target: x86_64-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2016-10-10 00:00:00


Attachments
Source files module.F90 and pushe.f90 (in bug.tar) (8.87 KB, application/x-tar)
2016-10-07 19:17 UTC, Bill Long
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Long 2016-10-07 19:17:00 UTC
Created attachment 39767 [details]
Source files module.F90 and pushe.f90 (in bug.tar)

As a basic sanity check:

> ftn -c module.F90
> ftn -c pushe.f90 
> module swap PrgEnv-cray PrgEnv-gnu
> ftn -c module.F90
> ftn -c pushe.f90 
> ftn -c -O3 module.F90
> ftn -c -O3 pushe.f90 
> 
> module list
Currently Loaded Modulefiles:
...
 12) gcc/6.2.0
 13) craype-network-aries
 14) craype-sandybridge


Now checking KNL target:

> module swap craype-sandybridge craype-mic-knl
> ftn -c -O3 module.F90
> ftn -c -O3 pushe.f90 
/tmp/cc4TRnzd.s: Assembler messages:
/tmp/cc4TRnzd.s:61: Error: bad register name `%xmm24'
/tmp/cc4TRnzd.s:63: Error: bad register name `%xmm24'
/tmp/cc4TRnzd.s:65: Error: bad register name `%xmm16'
...
[many more lines of messages]
Comment 1 Bill Long 2016-10-07 19:20:14 UTC
Compiling these files appears to have a problem when the target is set to Intel KNL.  The compiler appears to be generating incorrect register and instruction names, leading to assembler messages.  See with gfortran 6.2.

Compiles OK with any of these changes:

1) Change target to Sandybridge
2) Remove the -O3 option
3) Use a different vendor compiler (Cray)
Comment 2 Richard Biener 2016-10-10 08:34:00 UTC
You need recent enough assembler to support the extra registers available with KNL.  What is your binutils version?
Comment 3 Bill Long 2016-10-16 17:50:16 UTC
It would appear the customer system has

> /usr/bin/as --version
GNU assembler (GNU Binutils; SUSE Linux Enterprise 12) 2.25.0
Comment 4 Bill Long 2016-10-19 14:29:54 UTC
Confirmation from the customer system:

GNU assembler (GNU Binutils; SUSE Linux Enterprise 12) 2.25.0
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
Comment 5 Andrew Pinski 2020-01-18 03:04:58 UTC
Closing as invalid as you really need a newer binutils.