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

Changes time-integration scheme parameters from variable to constexpr in timestepper library #79

Merged
merged 1 commit into from
Nov 3, 2022

Conversation

uumesh
Copy link

@uumesh uumesh commented Oct 25, 2022

Parameters such as Nrk and Nstages are declared as variables in the timestepper library with values assigned in the member functions. And these variables are used to define array sizes at runtime which gives compilation errors while building with Intel compilers.

To resolve the issue, these parameters are modified and defined as static constexpr with fixed values in the timeStepper.hpp header file.

@noelchalmers
Copy link
Member

Not sure why the CI didnt trigger on this. Anyone know how to trigger it?

@nnnunnn
Copy link

nnnunnn commented Oct 26, 2022

Does the Intel compiler-in-question not implement C99 variable length arrays? (Visual C++ 2019 does not.)

@uumesh
Copy link
Author

uumesh commented Oct 26, 2022

I was trying to build and test with the icpx compiler that comes with the latest Intel oneAPI toolkit. Although, it does support the C99 VLA feature, it does not allow me to compile with this option.

For example, trying a test code, I get the following error

icpx --std=c99 test.cpp 
warning: invalid argument '--std=c99' not allowed with 'C++/ObjC++'
test.cpp:6:9: error: variable-sized object may not be initialized
  int a[N] = {1,2,3,4,5};
        ^

@nnnunnn
Copy link

nnnunnn commented Oct 26, 2022

I get the same with Visual C++. Its C compiler compiles C99 VLA's, but these are rejected by the C++ compiler. Sounds like Intel has taken the same approach?

@noelchalmers noelchalmers changed the base branch from main to staging November 3, 2022 19:21
@noelchalmers noelchalmers merged commit faf2a03 into paranumal:staging Nov 3, 2022
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

Successfully merging this pull request may close these issues.

3 participants