Bad internal unit KIND

Hello - I get the following error when I run mgxs.py

I understand that this is usually an issue with the fortran compiler. I was wondering if anyone had some advice on troubleshooting this issue.

This is what I did:

  1. installed gfortran-4.8 on Linux;
  2. export FC=/usr/bin/gfortran-4.8

Thanks,

Mohamed

Hi Mohamed,

Yes, this kind of error is usually related to the compiler. What Linux distribution/version are you using?

Best,
Paul

Hello, Dr Paul. Thank you for your reply.
Our System Configuration Linux Distro : Ubuntu 17.10 (Artful Aardvark) (64 bit)

Thanks and regards,
Mohamed

In Ubuntu 17.10, the version of gcc that is installed by default is 7.2, so there is no reason to use an older version (in your case, 4.8). You can do:

export FC=gfortran
export CC=gcc
export CXX=g++

And then run cmake/make as normal.

One thing you may want to try is to install gcc through conda (if it’s not already installed) and see if that helps: conda install gcc.

Best,
Paul

I also encountered the same issue running the pincell test case after installing on Centos 7. I used gcc/gfortran 4.8.5. Has this issue been resolved?

There is a new build of OpenMC on conda that hopefully fixes the “Bad internal unit KIND” error. Try reinstalling/upgrading OpenMC using conda and let me know if it’s working or not.

Best regards,
Paul

Dear Paul,

I installed with miniconda just two days ago. I’m afraid the issue is still there.

All the best,
Sam

Hi Sam,

The build was updated seven hours ago. Try running ‘conda update openmc’ to see if the problem you were seeing before still exists.

Thanks,
Paul

Dear Paul,

The new update worked!

Dear Nick,

Thanks for the tip. I will keep that option in mind if I encounter a similar issue in the future.