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

Compilation error #35

Open
leeczway opened this issue Dec 24, 2022 · 9 comments · May be fixed by #36
Open

Compilation error #35

leeczway opened this issue Dec 24, 2022 · 9 comments · May be fixed by #36
Assignees

Comments

@leeczway
Copy link

Hi developers,

I am trying to compile aurora on Ubuntu. MOOSE environment was installed via mamba. Then both MOOSE and OPENMC were successfully compiled with no errors under the virtual environment. But there is a c++ error while compiling AURORA.:

OpenMCExecutioner.C:734:31: error: no match for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string'} and 'openmc::FilterType')
734 | f_info.type = filter.type();

/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/type_traits:2554:11: error: no type named 'type' in 'struct std::enable_if<false, std::__cxx11::basic_string&>'
2554 | using enable_if_t = typename enable_if<_Cond, _Tp>::type;

Thanks !

Regards,
Wei

Below please see the detailed information.

lsb_release -a:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

error:
Checking if header needs updating: /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/moose/framework/include/base/MooseRevision.h...
Compiling C++ (in opt mode) /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/aurora/openmc/build/unity_src/executioners_Unity.C...
In file included from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/aurora/openmc/build/unity_src/executioners_Unity.C:2:
/home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/aurora/openmc/src/executioners/OpenMCExecutioner.C: In member function 'bool OpenMCExecutioner::setFilterInfo(openmc::Tally&, std::map<int, OpenMCExecutioner::FilterInfo>&, int32_t&, int32_t&)':
/home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/aurora/openmc/src/executioners/OpenMCExecutioner.C:734:31: error: no match for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string'} and 'openmc::FilterType')
734 | f_info.type = filter.type();
| ^
In file included from /home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/string:55,
from /home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/locale_classes.h:40,
from /home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/ios_base.h:41,
from /home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/ios:42,
from /home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/istream:38,
from /home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/sstream:38,
from /home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/complex:45,
from /home/ubuntu/miniconda3/envs/moopenmc/libmesh/include/libmesh/libmesh_common.h:46,
from /home/ubuntu/miniconda3/envs/moopenmc/libmesh/include/libmesh/threads.h:24,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/moose/framework/build/header_symlinks/HashMap.h:13,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/moose/framework/build/header_symlinks/MooseUtils.h:13,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/moose/framework/build/header_symlinks/InputParameters.h:13,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/moose/framework/build/header_symlinks/MooseObject.h:13,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/moose/framework/build/header_symlinks/Executioner.h:12,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/moose/framework/build/header_symlinks/Transient.h:12,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/aurora/openmc/build/header_symlinks/OpenMCExecutioner.h:5,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/aurora/openmc/src/executioners/OpenMCExecutioner.C:2,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/aurora/openmc/build/unity_src/executioners_Unity.C:2:
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/basic_string.h:678:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]'
678 | operator=(const basic_string& __str)
| ^~~~~~~~
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/basic_string.h:678:37: note: no known conversion for argument 1 from 'openmc::FilterType' to 'const std::__cxx11::basic_string&'
678 | operator=(const basic_string& __str)
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/basic_string.h:688:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]'
688 | operator=(const _CharT* __s)
| ^~~~~~~~
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/basic_string.h:688:31: note: no known conversion for argument 1 from 'openmc::FilterType' to 'const char*'
688 | operator=(const _CharT* __s)
| ~~~~~~~~~~~~~~^~~
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/basic_string.h:699:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]'
699 | operator=(_CharT __c)
| ^~~~~~~~
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/basic_string.h:699:24: note: no known conversion for argument 1 from 'openmc::FilterType' to 'char'
699 | operator=(_CharT __c)
| ~~~~~~~^~~
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/basic_string.h:716:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]'
716 | operator=(basic_string&& __str)
| ^~~~~~~~
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/basic_string.h:716:32: note: no known conversion for argument 1 from 'openmc::FilterType' to 'std::__cxx11::basic_string&&'
716 | operator=(basic_string&& __str)
| ~~~~~~~~~~~~~~~^~~~~
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/basic_string.h:779:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]'
779 | operator=(initializer_list<_CharT> __l)
| ^~~~~~~~
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/basic_string.h:779:42: note: no known conversion for argument 1 from 'openmc::FilterType' to 'std::initializer_list'
779 | operator=(initializer_list<_CharT> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/basic_string.h:793:8: note: candidate: 'template std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _Tp&) [with _Tp = _Tp; _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]'
793 | operator=(const _Tp& __svt)
| ^~~~~~~~
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/basic_string.h:793:8: note: template argument deduction/substitution failed:
In file included from /home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/move.h:57,
from /home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/stl_pair.h:59,
from /home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/stl_algobase.h:64,
from /home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/specfun.h:45,
from /home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/cmath:1935,
from /home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/complex:44,
from /home/ubuntu/miniconda3/envs/moopenmc/libmesh/include/libmesh/libmesh_common.h:46,
from /home/ubuntu/miniconda3/envs/moopenmc/libmesh/include/libmesh/threads.h:24,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/moose/framework/build/header_symlinks/HashMap.h:13,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/moose/framework/build/header_symlinks/MooseUtils.h:13,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/moose/framework/build/header_symlinks/InputParameters.h:13,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/moose/framework/build/header_symlinks/MooseObject.h:13,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/moose/framework/build/header_symlinks/Executioner.h:12,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/moose/framework/build/header_symlinks/Transient.h:12,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/aurora/openmc/build/header_symlinks/OpenMCExecutioner.h:5,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/aurora/openmc/src/executioners/OpenMCExecutioner.C:2,
from /home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/aurora/openmc/build/unity_src/executioners_Unity.C:2:
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/type_traits: In substitution of 'template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = std::__cxx11::basic_string&]':
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/basic_string.h:125:8: required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using _If_sv = std::enable_if_t<std::_and<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::_not<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>> >, std::_not<std::is_convertible<const _Tp&, const _CharT> > >::value, _Res> [with _Tp = openmc::FilterType; _Res = std::__cxx11::basic_string&; _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]'
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/basic_string.h:793:8: required by substitution of 'template std::__cxx11::basic_string::_If_sv<_Tp, std::__cxx11::basic_string&> std::__cxx11::basic_string::operator=<_Tp>(const _Tp&) [with _Tp = openmc::FilterType]'
/home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/aurora/openmc/src/executioners/OpenMCExecutioner.C:734:31: required from here
/home/ubuntu/miniconda3/envs/moopenmc/x86_64-conda-linux-gnu/include/c++/10.4.0/type_traits:2554:11: error: no type named 'type' in 'struct std::enable_if<false, std::__cxx11::basic_string&>'
2554 | using enable_if_t = typename enable_if<_Cond, _Tp>::type;
| ^~~~~~~~~~~
make: *** [/home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/moose/framework/build.mk:145:/home/ubuntu/miniconda3/envs/moopenmc/openmc_packages/aurora/openmc/build/unity_src/executioners_Unity.x86_64-conda-linux-gnu.opt.lo] 错误 1

@helen-brooks
Copy link
Contributor

Hello, thank you for opening your first issue with us!
This is a new one for me, I'll try and take a look.

@leeczway
Copy link
Author

leeczway commented Jan 3, 2023

Hi Brooks, thanks for your reply. Looking forward to a solution!

@helen-brooks
Copy link
Contributor

Could you please provide me with the git sha for the versions of OpenMC and MOOSE?

@leeczway
Copy link
Author

leeczway commented Jan 5, 2023

for MOOSE:
git rev-parse HEAD:
959b97cbc802e4ffc7bcbadefdc9dce9cf34c32f

for OpenMC:
4e49f69f02c8efa5822b66834a28f3e156204836

Thanks!

@helen-brooks helen-brooks self-assigned this Jan 5, 2023
@helen-brooks
Copy link
Contributor

OK, I've managed to reproduce those errors with those versions. It appears to be coming from a breaking change in OpenMC, where the type of a public method was changed from a std::string to an enum. I'm working on a patch.

@helen-brooks
Copy link
Contributor

helen-brooks commented Jan 5, 2023

Patch is in progress at the branch 35_openmc_filter_type_patch ; some tests fail for unrelated reasons, but it should build at least, which might get you unblocked.

@leeczway
Copy link
Author

leeczway commented Jan 6, 2023

With this branch the build process is OK now. Thanks a lot for your help!

@leeczway leeczway closed this as completed Jan 6, 2023
@helen-brooks helen-brooks reopened this Jan 6, 2023
@helen-brooks
Copy link
Contributor

Glad it works to your satisfaction, however please don't close the issue - I'll do that when the patch is merged into main.

@leeczway
Copy link
Author

leeczway commented Jan 6, 2023

Sure, I am not so familar with Git, :)

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 a pull request may close this issue.

2 participants