problems compiling G4 on Power9

From: Marco Baldi <marco.baldi5_at_unibo.it>
Date: Thu, 3 Dec 2020 16:23:13 +0100

Dear Gadget4 list,

I've had some troubles in compiling the code on the new Power9 cluster Marconi100 at Cineca.

When trying to compile the code with the settings of one of the example simulations (the DM-L50-N128) one gets the following compilation error:
/tmp/ccpDhXfN.s: Assembler messages:
/tmp/ccpDhXfN.s:37: Error: unrecognized opcode: `cpuid'
Apparently, this is is related to the vectorclass libraries, which are not supported for architectures different from x86_64. If I understand correctly from the Gadget4 user guide, these libraries are used only when the compilation flag EXPLICIT_VECTORIZATION is set in the Config. Nonetheless, the vectorclass directory and its contents are included in the compilation anyway, which generates the problem.

I managed to solve the problem by bracketing the reference to the vectorclass source files within an ifdef statement in the Makefile:
ifdef EXPLICIT_VECTORIZATION
SUBDIRS += vectorclass
OBJS += vectorclass/instrset_detect.o
INCL +=
endif
With this change, I could compile the code on Power9 and the test DM-L50-N128 simulation seems to be running properly.

I just wanted to ask whether this may be a safe (and reasonable) solution for this problem (in which case it may be ported into the public code version) or if it may generate other issues.

Thanks a lot,

Marco
Received on 2020-12-03 16:23:30

This archive was generated by hypermail 2.3.0 : 2023-01-10 10:01:32 CET