Is -tp istanbul-64 on AMD Shanghai Opterons safe to use?

We have the source code of an application which was delivered with a prepared Makefile. Although we are using AMD Opterons 2384 (which belong to the Shanghai series), the Makefile detects them as Istanbul type and appends the flag in the subject. According to the information of the vendor, -tp istanbul-64 will only activate SSE4 support and it’s safe to use with Shanghai type processors.

Somehow I wonder, why would then a flag -tp shanghai-64 exist? Therefore I would like an official statement, whether -tp shanghai-64 and -tp istanbul-64 are interchangeable synonyms for one and the same flag, or whether it would be better to replace the preset value with -tp shanghai-64.

(The compilation is for local execution, no cross-compiling in the game.)

Hi Reuti,

Somehow I wonder, why would then a flag -tp shanghai-64 exist?

They are separate AMD models and have distinct cpuid information. (See the output of the pgcpuid utility). The cpuid information is used to enable features (such as SSE4a) and account for various cache sizes. It happens that the same features and cache size occur for both a “Shanghai” and “Istanbul”. It’s my understanding that the micro-architecture is the same for both, with the main difference being the number of cores (4 versus 6) and the addition of HT assist.

Therefore I would like an official statement, whether -tp shanghai-64 and -tp istanbul-64 are interchangeable synonyms for one and the same flag, or whether it would be better to replace the preset value with -tp shanghai-64.

I can not make a specific recommendation and must defer to your vendor’s recommended settings. There may be other factors besides the compiler generated code so if you are unsure, it would be best to contact them.

  • Mat