-
Notifications
You must be signed in to change notification settings - Fork 396
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
Fix when Compiling with non-standard CMake Configurations #8378
Conversation
…lds to test LINK_WITH_PYTHON=ON/OFF and USE_PSYCHROMETRICS_CACHING=ON/OFF
Thanks, @JasonGlazer. This PR is adding CI runs to the GitHub actions workflows to build with LINK_WITH_PYTHON=ON/OFF and USE_PSYCHROMETRIC_CACHING=ON/OFF, so this should address #8377. Are there other macros like this we need to catch? |
I don't know, I presume so but I'm not sure. |
Here are some other macros in EnergyPlus that we may want to also consider:
|
@mitchute looks like there is indeed still some issue here, but this will be a really great addition. I don't know exactly how many of those definition conditionals we want to check...our list of possible builds could become monstrous. We surely don't need to build special versions of these on every single commit:
I'd be interested in what happens if we toggle the other 4. We could consider adding some special builds of more obscure build configurations to each tag rather than each commit. That way CI will only do those builds when we do package building. |
OK, I'm not sure what the problem is currently. I haven't seen any build problems locally on Mac and Linux, but I'll investigate more. |
@Myoldmopar @mitchute I'm honestly not sure if you're trolling me now, but please remove SKYLINE_MATRIX_REMOVE_ZERO_COLUMNS from the list. It isn't the flag you're looking for. |
Wouldn't that be fun... I just straight up did a search of the code for all of the preprocessor macros and listed them. No trolling intended. 😄 |
@Myoldmopar This is looking like NREL CI may need to run CMake again to catch these new flags. If you take a look at the GitHub builds for USE_PSYCHROMETRICS_CACHING=OFF, you will see that they are failing with the same errors as the NREL CI machines which should have caching turned on. |
…us into fix_nocache_psychrometrics
…rmating and warnings cleanup
Currently, we have the following build matrix enabled on this branch.
I'm not sure if we want to run them all on every push, but this should at least demonstrate that they are now all working. |
@Myoldmopar @mjwitte this is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mitchute The c++ changes all look ok to me. I'll yield to @Myoldmopar regarding the cmake and actions changes.
@@ -1343,4 +1376,4 @@ namespace Psychrometrics { | |||
|
|||
} // namespace EnergyPlus | |||
|
|||
#endif | |||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file needs an endline at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll probably just add this to one of my upcoming globals branches and not spend more CI cycles on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
[[maybe_unused]] std::string const &CalledFrom = blank_string, // routine this function was called from (error messages) | ||
[[maybe_unused]] bool const SuppressWarnings = false // if calling function is calculating an intermediate state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to question adding maybe_unused
to these arguments when they have defaults, but I see now that certain arguments do truly become unused based on the state of the ifdef
s. That makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problems here, this will definitely keep Github Action instances busy for us 👍
- name: Build EnergyPlus | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
shell: bash | ||
run: cmake --build . --target energyplus -j 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic!
mark_as_advanced(USE_PSYCHROMETRICS_CACHING) | ||
mark_as_advanced(USE_GLYCOL_CACHING) | ||
mark_as_advanced(USE_PSYCH_STATS) | ||
mark_as_advanced(USE_PSYCH_ERRORS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's really great having some new CMake (advanced) variables for turning compiler settings on and off.
@@ -1328,7 +1328,7 @@ namespace PluginManagement { | |||
} | |||
} | |||
#else | |||
void PluginManager::setGlobalVariableValue([[maybe_unused]] EnergyPlusData &state, int EP_UNUSED(handle), Real64 EP_UNUSED(value)) | |||
void PluginManager::setGlobalVariableValue([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] int handle, [[maybe_unused]] Real64 value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay for fixed syntax errors!
constexpr int iPsyRhFnTdbRhovLBnd0C = 13; | ||
constexpr int iPsyTwbFnTdbWPb_cache = 18; | ||
constexpr int iPsyPsatFnTemp_cache = 19; | ||
constexpr int NumPsychMonitors = 19; // Parameterization of Number of psychrometric routines that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes.
#endif | ||
#ifdef EP_cache_PsyTsatFnHPb | ||
extern Array1D<cached_tsat_h_pb> cached_Tsat_HPb; // DIMENSION(0:tsat_hbp_cache_size) | ||
inline Array1D<cached_tsat_h_pb> cached_Tsat_HPb; // DIMENSION(0:tsat_hbp_cache_size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I thought I had merged this...well I am now. Thanks so much for this @mitchute, this will make sure all these conditional code paths are building all the time now! |
Pull request overview
EP_nocache_Psychrometrics
EP_cache_GlycolSpecificHeat
LINK_WITH_PYTHON=OFF
LINK_WITH_PYTHON=OFF
USE_PSYCHROMETRICS_CACHING=OFF
USE_GLYCOL_CACHING=OFF
USE_PSYCH_STATS=ON
USE_PSYCH_ERRORS=OFF
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.