About AVX support

Dear colleagues. In connection with the retake of my session, there was a need to install on Ubuntu “NVIDIA HPC SDK” to work with the optimization of my program code on the GPU.
I reread some guides on how to install everything and everything seems to work. But when I run the compiled file, I get an error with an Emergency stop due to the lack of AVX support on the processor. In the vastness of the Internet they write that it should be built into the processor itself. Can you please tell me how to check and make sure that I definitely do not have this support. And is there an opportunity to bypass this support and run the code, say, in some remote machine where this support is already available. I am collecting the source file, compiling it, but I can’t run it. ps. as for the remote machine, can you please attach links to them so that you can at least debug my projects there. Thanks in advance)

AVX was added as an instruction set extension to Intel and AMD x86-64 CPUs a long time ago. If your computer dates to 2012 or earlier it may not have a CPU with AVX support. Whether it is possible to get the software to work without AVX support in the CPU I do not know, but I note that requiring AVX support is quite reasonable at this time when the Steam Hardware & Software Survey indicates that about 96% of CPUs currently in use support it.

Under Linux, you can use cat /proc/cpuinfo and look for avx in the flags section.

Under Windows, I am not aware of any built-in utility that displays the CPU feature flags. Personally, I use a free utility program called CPUID CPU-Z, which displays the supported instruction set extensions at the Instructions item on the CPU tab. There are other such hardware information programs, but I have used CPU-Z exclusively for a decade and have no complaints about it. It runs fine on Windows 7, Windows10, and Windows 11.

Alternatively, you can identify the CPU used in your system. For example in Windows 10 this is displayed in Task Manager under the Performance tab, under Windows 7 it can be found under Control Panel | System and Security | System. For example, on my system Task Manager shows “Intel (R) Xeon(R) W-2133 CPU @ 3.60 GHz”. I can then look up the specifications for that CPU on the Intel website. In my case, that brings me to this page, where at Instruction Set Extensions it lists “Intel® SSE4.2, Intel® AVX, Intel® AVX2, Intel® AVX-512”. Presumably AMD also has the specifications for their CPUs online somewhere.

1 Like

I don’t believe the processor needs to have AVX support for the code you have shown. However, it may be a minimum requirement for the toolchain (whatever version of pgcc you are using.) Your question is probably better suited for the HPC compilers forum. If you want to specify the target processor architecture you can pick an appropriate CPU architecture using the -tp switch for pgcc.

For example, you could try adding -tp=px

(This appears to be a “work on any x86_64 CPU” option)

However, recent versions of pgcc should accept a -fast switch which compiles with an appropriate tp choice for the processor you are compiling on. That may be easiest to use, without requiring any research or trial and error.

The command line help (pgcc --help) should tell you the tp options supported by whichever version of the compiler you are using.

(As already indicated, AVX support on Intel family x86_64 server processors was introduced in the sandy bridge generation. nehalem and westmere family processors preceded sandy bridge and did not have AVX support.)

1 Like

Thanks, I’ll take note it. And I will try to use the above parameters to pgcc)

Thanks for your answer, I’ll take note it.)