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

OSHA1stream functionality of RapidCFD needs to be updated to C++11 or many simulations don't run #114

Open
klausbu opened this issue May 15, 2024 · 1 comment

Comments

@klausbu
Copy link

klausbu commented May 15, 2024

The OSHA1stream functionality of RapidCFD needs to be updated to C++11 as this is required by more recent compilers or most simulations don't run!

This was first encountered related to OpenFOAM in 2022 and I ran into the same problem today after installing RapidCFD with AMD GPU support (available here: https://github.com/wtkaczewski/RapidCFD-dev) using ROCm 6.1 (If you are interested in the AMD support, Note: in the bashrc change Clang to hipcc and rename the folder $HOME/RapidCFD/RapidCFD-dev/wmake/rules/linux64Clang/ to $HOME/RapidCFD/RapidCFD-dev/wmake/rules/linux64hipcc/).

When running the tests found here: https://github.com/TonkomoLLC/RapidCFD-Tests, only the icoFoam test works, the others cause the following error:

--> FOAM FATAL IO ERROR: 
error in IOstream "OSHA1stream.sinkFile_" for operation Ostream& operator<<(Ostream&, const word&)

file: OSHA1stream.sinkFile_ at line 0.

    From function IOstream::check(const char*) const
    in file db/IOstreams/IOstreams/IOstream.C at line 99.

This is caused by the OSHA1stream functionality which needs to be updated to C++11.

The fix for OpenFOAM has been provided here: OpenFOAM/OpenFOAM-9@b0c15be but I lack the skills to implement it in RapidCFD.

@klausbu
Copy link
Author

klausbu commented May 16, 2024

The solution is to use the implementation from OpenFOAM 11, just copy-paste / replace the file OSHA1stream.H which resides in /RapidCFD/RapidCFD-dev/src/OpenFOAM/db/IOstreams/hashes/OSHA1stream.H:

https://cpp.openfoam.org/v11/OSHA1stream_8H_source.html

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

1 participant