Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build with intel fails #240

Open
jcwright77 opened this issue Sep 7, 2022 · 14 comments
Open

build with intel fails #240

jcwright77 opened this issue Sep 7, 2022 · 14 comments
Assignees
Labels

Comments

@jcwright77
Copy link

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

@tzanio
Copy link
Member

tzanio commented Sep 7, 2022

Hi @jcwright77,

What was the platform and the version of icc?

Tzanio

@jcwright77
Copy link
Author

jcwright77 commented Sep 7, 2022

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
Copy link
Author

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

@tzanio
Copy link
Member

tzanio commented Sep 9, 2022

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?

@v-dobrev
Copy link
Member

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.

@jcwright77
Copy link
Author

jcwright77 commented Sep 10, 2022

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 .

@v-dobrev
Copy link
Member

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.

@jcwright77
Copy link
Author

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.

@tzanio
Copy link
Member

tzanio commented Sep 10, 2022

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

@jcwright77
Copy link
Author

jcwright77 commented Sep 10, 2022 via email

@tzanio
Copy link
Member

tzanio commented Sep 18, 2022

@jcwright77, were you able to resolve this?

@jcwright77
Copy link
Author

jcwright77 commented Sep 18, 2022 via email

@jcwright77
Copy link
Author

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

@jcwright77
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants