"no such instruction: 'vzeroupper' Compiler Error

I’m nearing the end of my trial license for PGI FORTRAN/C/C++ Accelerator Workstation, and I’m still not able to get even the “Hello World” simple program to compile. I’m able to get the GNU FORTRAN to work on simple things, but I’m trying to evaluate the speed enhancement for an atmospheric code. Here is the latest Terminal output for the simple program:
PROGRAM TEST
print , “Successful IO” (or in other versions: write(,*) ‘Successful IO’)
END PROGRAM


Last login: Tue Sep 20 16:54:33 on ttys001
tds-macbook-pro:~ Thurmon$ setenv PATH /opt/pgi/osx86-64/2011/bin:/opt/pgi/osx86-64/2011/mpi/openmpi/bin:$PATH;export PATH=/opt/pgi/osx86-64/2011/bin:/opt/pgi/osx86-64/2011/mpi/openmpi/bin:$PATH; clear
-bash: setenv: command not found



tds-macbook-pro:~ Thurmon$ pgfortran -V x.f

pgfortran 11.8-0 64-bit target on Apple OS/X -tp sandybridge
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2011, STMicroelectronics, Inc. All Rights Reserved.
PGF90/x86-64 OSX 11.8-0
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2011, STMicroelectronics, Inc. All Rights Reserved.
PGF90-F-0002-Unable to open source input file: x.f
PGF90/x86-64 OSX 11.8-0: compilation aborted
tds-macbook-pro:~ Thurmon$ $ PGI=/opt/pgi; export PGI
-bash: $: command not found
tds-macbook-pro:~ Thurmon$ $ MANPATH=$MANPATH:$PGI/osx86-64/11.8/man; export MANPATH
-bash: $: command not found
tds-macbook-pro:~ Thurmon$ $ LM_LICENSE_FILE=$PGI/license.dat; export LM_LICENSE_FILE-bash: $: command not found
tds-macbook-pro:~ Thurmon$ $ PATH=$PGI/osx86-64/11.8/bin:$PATH; export PATH
-bash: $: command not found
tds-macbook-pro:~ Thurmon$ pgfortran -o /Users/Thurmon/Desktop/TestP /Users/Thurmon/Desktop/HELCAP/Test-IO.f
NOTE: your trial license will expire in 8 days, 4.47 hours.
NOTE: your trial license will expire in 8 days, 4.47 hours.
Test-IO.f:76:no such instruction: vzeroupper' Test-IO.f:85:no such instruction: vzeroupper’
Test-IO.f:92:no such instruction: vzeroupper' Test-IO.f:99:no such instruction: vzeroupper’
Test-IO.f:103:no such instruction: vzeroupper' Test-IO.f:109:no such instruction: vzeroupper’
Test-IO.f:240:no such instruction: `vzeroupper’

Any help would be greatly appreciated.

Hi TDeloney,

Try targeting an older processor (such as -tp px-64, or -tp core2-64). What’s happening is that compiler has detected that your processor is a Sandybridge so includes new the instructions instructions. However, your system utilies (Xcode) don’t recognized them. You’ll need to target an older processor or update your Xcode version.

Let me check as to the Xcode version you need.

  • Mat

Hey, I also have this issue.

I’m using CentOS with some AMD Opteron 12 core processors, PGI workstation 11.10

Is there any way to get this working? Either by installing some packages/kernel modules that support this processor, or with some flags?

Or will I have to target a lower instruction set like the previous reply suggests?

With -tp=amd64 or -tp=amd64e the code will compile. Is this a good solution? Or is this flag using a lower instruction set than optimal?

Hi khea_actua1,

Since you’re using Linux, the best thing to do is update your binutils (Index of /gnu/binutils). The problem is your assembler is old and doesn’t recognize the latest AVX/FMA instructions found on AMD’s “Bulldozer” micro-architecture. Updating the binutils will fix this.

The other option is to target the previous generation chip, “-tp=istanbul-64”, but you’ll not be able to fully utilize your new hardware. FYI, -tp=amd64 targets a much older K8 processor.

On a side note, MacOSX hasn’t updated their Xcode yet to support AVX instructions found on Intel Sandy-Bridge chips. Hence, the only work around is to target an older processor such as “-tp=nehalem-64”.

Hope this helps,
Mat

At first I thought it worked, after upgrading to binutils 2.2 (in my home directory) I’ve now been able to compile.

I can’t seem to run anything though:

matt@sahand:tmp$ rm -f a.out; pgfortran -V test.f90 ; ./a.out

pgfortran 11.10-0 64-bit target on x86-64 Linux -tp bulldozer 
Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
Copyright 2000-2011, STMicroelectronics, Inc.  All Rights Reserved.
PGF90/x86-64 Linux 11.10-0

Illegal instruction
matt@sahand:tmp$

where test.f90 is simply a print hello world.

I’ve ever re-run the makelocalrc while specifying with my version of gcc can be found, to ensure it’s using 4.6

Hi khea_actua1,

I wonder if your version of CentOS doesn’t support AVX/FMA yet. What version are you using?

I didn’t see anything on the CentOS website indicating if they do or don’t support AVX. The best I could find is the following post on http://old.nabble.com/Strange-error-td31749507.html from June 11, 2011:

We have confirmed that AVX code won’t run on CentOS 5.6. As Red Hat 6.1
(recently finalized) is meant to have full support for AVX, we
anticipate availability of CentOS 6.1. I guess 5.8 may have a degree of
AVX support.

I can’t confirm the validity of the post, but if you have an older CentOS, it could be the cause of the error.

  • Mat