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

Updates for DAGMC 3.2.0 #1747

Merged
merged 4 commits into from
Jan 18, 2021
Merged

Conversation

pshriwise
Copy link
Contributor

A couple of small updates to the DAGMC metadata interface require a couple of changes in our DAGMC code here. They're reflective of some improvements toward using modern C++ by @bam241, so overall I think they're a positive change. We're having discussions about the metadata handling in DAGMC soon. Part of that discussion will have to do with insulating against future interface changes like these.

I've included a check in the CMakeLists.txt for the DAGMC version here as well to avoid build errors for older versions of DAGMC without these updates. The DAGMC files for the uwuw and refl tests have updated because the material IDs in the UWUW file are now being read in a different order. This doesn't affect transport (hence no change to the expected results), but it does change the inputs slightly. I've adjusted the DAGMC files accordingly to account for that.

The other change to the material name comparison is a fix so that names are compared in lowercase. This is a regression that was reported by @helen-brooks a while ago that I'm just getting around to.

@shimwell
Copy link
Member

Ah super, perfect timing, I just came across a build error that I think this PR will fix

[  7%] Building CXX object CMakeFiles/libopenmc.dir/src/bank.cpp.o
[  8%] Building CXX object CMakeFiles/libopenmc.dir/src/boundary_condition.cpp.o
[  9%] Building CXX object CMakeFiles/libopenmc.dir/src/bremsstrahlung.cpp.o
[ 10%] Building CXX object CMakeFiles/libopenmc.dir/src/dagmc.cpp.o
[ 11%] Building CXX object CMakeFiles/libopenmc.dir/src/cell.cpp.o
�[91m/opt/openmc/src/dagmc.cpp: In function ‘bool openmc::get_uwuw_materials_xml(std::__cxx11::string&)’:
/opt/openmc/src/dagmc.cpp:69:49: error: ‘class std::shared_ptr<pyne::Material>’ has no member named ‘openmc’
     for (auto mat : mat_lib) { ss << mat.second.openmc("atom"); }
                                                 ^~~~~~
�[0m�[91m/opt/openmc/src/dagmc.cpp: In function ‘void openmc::load_dagmc_geometry()’:
/opt/openmc/src/dagmc.cpp:242:60: error: ‘class std::shared_ptr<pyne::Material>’ has no member named ‘metadata’
           int mat_number = uwuw.material_library[uwuw_mat].metadata["mat_number"].asInt();
                                                            ^~~~~~~~
�[0m�[91mmake[2]: *** [CMakeFiles/libopenmc.dir/build.make:121: CMakeFiles/libopenmc.dir/src/dagmc.cpp.o] Error 1
�[0m�[91mmake[2]: *** Waiting for unfinished jobs....
�[0m�[91mmake[1]: *** [CMakeFiles/Makefile2:267: CMakeFiles/libopenmc.dir/all] Error 2
�[0m�[91mmake: *** [Makefile:149: all] Error 2
The command '/bin/sh -c cd /opt &&     git clone --single-branch --branch develop https://github.com/openmc-dev/openmc.git &&     cd openmc &&     mkdir build &&     cd build &&     cmake -Doptimize=on -Ddagmc=ON -DDAGMC_ROOT=$DAGMC_INSTALL_DIR -DHDF5_PREFER_PARALLEL=OFF ..  &&     make -j"$compile_cores" &&     make -j"$compile_cores" install &&     cd /opt/openmc/ &&     pip install .' returned a non-zero code: 2
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 2
�[0m

I am just retrying the build using your branch and will report back

@pshriwise
Copy link
Contributor Author

Yeah, it should hopefully take care of those. Thanks for trying it out!

@shimwell
Copy link
Member

I can confirm it builds over here

@paulromano paulromano merged commit 6aa1570 into openmc-dev:develop Jan 18, 2021
@paulromano
Copy link
Contributor

Thanks for the fix @pshriwise!

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