glvis icon indicating copy to clipboard operation
glvis copied to clipboard

build with intel fails

Open jcwright77 opened this issue 2 years ago • 14 comments

lib/gltf.hpp(109): error: the generated default constructor for "glTF_Builder::struct_pbrMetallicRoughness" cannot be used in an initializer for its own data member { false, "pbrMetallicRoughness", {} }; ^ detected during implicit generation of "glTF_Builder::struct_texture_info::struct_texture_info()" at line 10222

jcwright77 avatar Sep 07 '22 13:09 jcwright77

Hi @jcwright77,

What was the platform and the version of icc?

Tzanio

tzanio avatar Sep 07 '22 14:09 tzanio

2020 . The constructor args seem right, so not sure why it is choking platform is centos7, and release 4.2 in a tar.gz file

jcwright77 avatar Sep 07 '22 14:09 jcwright77

Bump, any ideas on this? We could use the new glvis soon.

jcwright77 avatar Sep 09 '22 18:09 jcwright77

Hi @jcwright77,

This error looks strange, and I can't reproduce it.

I just build the following with ICC 2021.6.0 20220226 without any issues:

  • mfem:master (with make CXX=icc-2022.2 config)
  • glew and SDL2 following the instruction here, with an additional CC=icc-2022.2 flag
  • glvis:master (with just make)

All of these worked fine for me.

Any chance you can use a newer icc and/or rebuild all of the above from scratch?

tzanio avatar Sep 09 '22 22:09 tzanio

In @tzanio's instructions above there is an incorrect make flag: the MFEM GNU make build system does not use CC (which is typically the C compiler) but CXX which is typically the C++ compiler. Second, the Intel C++ compiler is icpc, whereas the C compiler is icc. The new OneAPI Intel compilers use icx and icpx for the C and the C++ compilers, respectively.

Thus, the compiler line for MFEM should be:

make serial CXX=icpc -j 16

The GLVis GNU make build system uses by default the compiler used for building MFEM, so there is no need to explicitly set that, unless one wants to use a different compiler.

That said, I tried building MFEM+GLVis with Intel 19.0.4.227 and 2021.2.0 (on Livermore machines I do not see 2020 version of the Intel compiler for some reason) and both versions worked fine.

For a parallel build, the MFEM GNU make build system expects one to set the MPI compiler wrapper through the variable MPICXX (default value is mpicxx), e.g.

make parallel MPICXX=mpic++ -j 16

With a parallel MFEM build, the GLVis build system will also pickup and use the MPI compiler used by MFEM, so again one does not need to specify a compiler explicitly.

v-dobrev avatar Sep 10 '22 01:09 v-dobrev

I will try building again. I cannot really update to the latest intel very quickly. I will try the parallel build of mfem with the parallel flag in the glvis make. I will use mpiicpc .

jcwright77 avatar Sep 10 '22 01:09 jcwright77

By the way, if the problem is in building GLVis with Intel then you can probably just use g++ to build a serial MFEM version just for use with GLVis that is also built with g++. Such a build of GLVis should still work fine with apps build with parallel MFEM builds with Intel compiler. The only requirement is that if you enable MFEM_USE_GNUTLS=YES in the parallel build, you should also enable it in the serial build.

v-dobrev avatar Sep 10 '22 01:09 v-dobrev

Thanks I may try that. Most of our software stack is built with intel so if any of that is used the final link has to be with intel.

jcwright77 avatar Sep 10 '22 02:09 jcwright77

Sorry, copy+paste error -- it is indeed CXX for mfem (and CC for glew/SDL2).

tzanio avatar Sep 10 '22 06:09 tzanio

I might try that. Of course glvis now has a few dependencies as well.

-john

On Sep 9, 2022, at 9:43 PM, Veselin Dobrev @.***> wrote:

 By the way, if the problem is in building GLVis with Intel then you can probably just use g++ to build a serial MFEM version just for use with GLVis that is also built with g++. Such a build of GLVis should still work fine with apps build with parallel MFEM builds with Intel compiler. The only requirement is that if you enable MFEM_USE_GNUTLS=YES in the parallel build, you should also enable it in the serial build.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

jcwright77 avatar Sep 10 '22 16:09 jcwright77

@jcwright77, were you able to resolve this?

tzanio avatar Sep 18 '22 15:09 tzanio

Trying to get back to it. With each build taking to so it’s taking a while.

-john

On Sep 18, 2022, at 11:24 AM, Tzanio Kolev @.***> wrote:

 @jcwright77, were you able to resolve this?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

jcwright77 avatar Sep 18 '22 18:09 jcwright77

building plain serial mfem with g++ and glvis on top of that worked. May be a compiler bug in intel 2020.

jcwright77 avatar Sep 19 '22 01:09 jcwright77

when I have time I'll try a few build with inte 2021

jcwright77 avatar Sep 19 '22 01:09 jcwright77