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

Cannot build Cantera with GNU compilers #1440

Closed
RemiLacroix-IDRIS opened this issue Feb 23, 2023 · 4 comments
Closed

Cannot build Cantera with GNU compilers #1440

RemiLacroix-IDRIS opened this issue Feb 23, 2023 · 4 comments

Comments

@RemiLacroix-IDRIS
Copy link

Problem description

I was able to build Cantera with Intel compilers without any issues but I cannot seem to be able to compile with the GNU compilers.

The problem occurs at the very beginning of the build script. For some reason, I get a warning about the Intel compilers and then Scons cannot compile .cpp files.

Steps to reproduce

Just run scons build CC=gcc CXX=g++ FORTRAN=gfortran.

Behavior

scons: Reading SConscript files ...
INFO: SCons 4.3.0 is using the following Python interpreter:
/.../bin/python3.7 (Python 3.7)

scons: warning: Can't find Intel compiler top dir for version='None', abi='x86_64'
File "/.../cantera/SConstruct", line 747, in <module>
INFO: Configuration variables read from 'cantera.conf' and command line:
    CC = 'gcc'
    CXX = 'g++'
    FORTRAN = 'gfortran'

Checking for C++ header file cmath... 
scons: *** While building `['.sconf_temp/conftest_4501b9bf892a8ba32d6185db437667f6_0SConfActionsContentDummyTarget']' from `['.sconf_temp/conftest_4501b9bf892a8ba32d6185db437667f6_0.cpp']': Don't know how to build from a source file with suffix `.cpp'.  Expected a suffix in this list: ['.c', '.m', '.f', '.for', '.ftn', '.fpp', '.FPP', '.F', '.FOR', '.FTN', '.f77', '.F77', '.f90', '.F90', '.f95', '.F95', '.f03', '.F03', '.f08', '.F08', '.s', '.asm', '.ASM', '.spp', '.SPP', '.sx', '.S', '.d'].
File "/.../cantera/SConstruct", line 1053, in <module>

System information

  • Cantera version: 2.6.0
  • OS: Linux RedHat 8.6
  • Python/MATLAB/other software versions: Python 3.7
@speth
Copy link
Member

speth commented Feb 23, 2023

This isn't a generic problem with using the GNU compilers, but something peculiar to your system. Cantera is built using g++ all the time, as you can see from looking at the CI jobs run using GitHub Actions.

This warning seems to be key:

scons: warning: Can't find Intel compiler top dir for version='None', abi='x86_64'

There seems to be something that is giving SCons the idea to use the Intel compilers. Are you running this in a shell where you've run the activation scripts for the Intel compilers? Can you try without doing that?

Can you provide the output of the commands:

  • g++ --version
  • gfortran --version
  • env
  • scons dump

(These latter two will generate a lot of output, so please save them to a file and include as attachments).

@RemiLacroix-IDRIS
Copy link
Author

This isn't a generic problem with using the GNU compilers, but something peculiar to your system.

Yeah it must be, I'm not familiar with Scons unfortunately.

There seems to be something that is giving SCons the idea to use the Intel compilers. Are you running this in a shell where you've run the activation scripts for the Intel compilers? Can you try without doing that?

The two things I can think of are Intel MPI (but it's configured to use GNU compilers as a backend) and Intel MKL.

I am going to do more tests tomorrow and answer your questions.

@RemiLacroix-IDRIS
Copy link
Author

RemiLacroix-IDRIS commented Feb 24, 2023

Ok, that was my fault, I had somehow corrupted my environment. Sorry for the noise!

Unrelated question before closing this, does Cantera support the int64 version of SUNDIALS and does it require the LAPACK-based solvers of SUNDIALS?

@ischoegl
Copy link
Member

ischoegl commented Feb 25, 2023

Closing. For general unrelated questions, please use the user forum. Thanks!

PS: the discussion in #1419 may be relevant for this question.

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

No branches or pull requests

3 participants