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

OpenFoam v1706 compilation issues with gcc 11.2.0/openMPI 4.1.2 #143

Open
Johnxia1 opened this issue Jul 7, 2023 · 3 comments
Open

OpenFoam v1706 compilation issues with gcc 11.2.0/openMPI 4.1.2 #143

Johnxia1 opened this issue Jul 7, 2023 · 3 comments

Comments

@Johnxia1
Copy link

Johnxia1 commented Jul 7, 2023

I have been able to compile OF V1706 and hyStrath with gcc/7.1.0 and openmpi/1.10.7 but not with newer versions of gcc/openmpi. This makes it difficult to use hy2Foam on clusters that do not support older version of gcc/openmpi. Is there a fix to the problem? Is there a newer version of OF that hyStrath works with?

I am trying to compile OF with the command

./Allwmake >& log&

and the bottom portion of my log file where the error occurs looks like

.....
/home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/LList.H:302:50: warning: implicitly-declared ‘constexpr Foam::SLListBase::const_iterator::const_iterator(
const Foam::SLListBase::const_iterator&)’ is deprecated [-Wdeprecated-copy]
302 | LListBase_const_iterator(baseIter)
| ^
In file included from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/SLListBase.H:262,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/SLList.H:36,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/UListIO.C:29,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/UList.C:310,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/UList.H:467,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/List.H:43,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/HashTable.C:30,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/HashTable.H:857,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/NamedEnum.H:39,
from fileMonitor.H:46,
from fileMonitor.C:26:
/home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/SLListBaseI.H:283:13: note: because ‘Foam::SLListBase::const_iterator’ has user-provided ‘void Foam::SLLi
stBase::const_iterator::operator=(const Foam::SLListBase::const_iterator&)’
283 | inline void Foam::SLListBase::const_iterator::operator=
| ^~~~
make: *** [/home/johnxia/OpenFOAM/OpenFOAM-v1706/wmake/rules/General/transform:28: /home/johnxia/OpenFOAM/OpenFOAM-v1706/build/linux64GccDPInt32Opt/src/OS
specific/POSIX/fileMonitor.o] Error 1
make: *** Waiting for unfinished jobs....
POSIX.C: In function ‘int Foam::system(const Foam::UListFoam::string&)’:
POSIX.C:1260:15: warning: variable ‘argc’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
1260 | const int argc = command.size();

@gargtarang
Copy link

Try with different compiler like Intel or Clang.

@John-Xial
Copy link

Changing compilers did not help. Have you gotten the compilation to work with more recent compilers?

@gargtarang
Copy link

I have used Intel 2019. Try using flags like c++89

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