Re: problems compiling G4 on Power9

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

Thanks a lot Volker!

Cheers,

M

> On 3. Dec 2020, at 18:30, Volker Springel <vspringel_at_MPA-Garching.MPG.DE> wrote:
>
>
> Hi Marco,
>
> Ah, Power9 - fancy!
>
> Thanks for pointing out this problem. Indeed, when EXPLICIT_VECTORIZATION is not set, there is no need to compile in vectorclass/instrset_detect.o, and then things should work with Power9.
>
> Your change to the Makefile is basically fine, except that you need to use the more complicated expression
>
> ifeq (EXPLICIT_VECTORIZATION,$(findstring EXPLICIT_VECTORIZATION,$(CONFIGVARS)))
>
> instead of
>
> ifdef EXPLICIT_VECTORIZATION
>
> The reason is that the latter checks whether EXPLICIT_VECTORIZATION is defined in your general environment variables, but Gadget's configuration options don't actually appear independently as such variables. They can however be probed as part of the environment variable CONFIGVARS which enumerates them.
>
> Things worked for your solution because you anyway wanted that
> OBJS += vectorclass/instrset_detect.o
> is not executed. However if you would activate EXPLICIT_VECTORIZATION in Config.sh, it would not not properly compile any more on a x86 platform.
>
> I have made the corresponding change in the Makefile.
>
> Cheers,
> Volker
>
>
>> On 3. Dec 2020, at 16:23, Marco Baldi <marco.baldi5_at_unibo.it> wrote:
>>
>>
>>
>> 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
>>
>>
>>
>>
>> -----------------------------------------------------------
>>
>> If you wish to unsubscribe from this mailing, send mail to
>> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe gadget-list
>> A web-archive of this mailing list is available here:
>> http://www.mpa-garching.mpg.de/gadget/gadget-list
>
>
>
>
> -----------------------------------------------------------
>
> If you wish to unsubscribe from this mailing, send mail to
> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe gadget-list
> A web-archive of this mailing list is available here:
> http://www.mpa-garching.mpg.de/gadget/gadget-list
Received on 2020-12-03 19:14:26

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