Hi,
I haven’t compiled a new version of OpenMC for a while and I noticed you have switched to cmake so my old config files don’t help me. Anyways, I attempted to build it with MPI and PETSc and I’m running into some issues. I have set an environmental variable by
`
export FC=/opt/mpich-shared/bin/mpif90
`
and then run
`
cmake -Dpetsc=on .
`
in the source folder. However, when I follow it by make, I run into
`
[ 55%] Building Fortran object CMakeFiles/openmc.dir/error.F90.o
Warning: Nonexistent include directory “/include”
/home/kaur/openmc/builds/openmc-15-09-14/src/error.F90:8.6:
use mpi
1
Fatal Error: Cannot read module file ‘mpi.mod’ opened at (1), because it was created by a different version of GNU Fortran
make[3]: *** [CMakeFiles/openmc.dir/error.F90.o] Error 1
make[2]: *** [CMakeFiles/openmc.dir/error.F90.o.provides] Error 2
make[1]: *** [CMakeFiles/openmc.dir/all] Error 2
make: *** [all] Error 2
`
I don’t really know what to make of it. Any suggestions?
PS. I was looking at some source code and saw something about hexagonal lattices. Are they available now? I don’t see any reference to them in the current docs.
Cheers,
Kaur
Hi, Kaur,
I’m not familiar with this error, but it it looks like you are trying to compile OpenMC with a different version of gfortran than your mpich was compiled with. Check your mpif90 and gfortran with --version. Do the version numbers match?
Hexagonal lattices are not available in version 0.6.0. We are hoping to include them in version 0.7.0. That said, I have an implementation with hexagonal lattices in my repository. If you really want to model with hexagonal lattices, you can use my code with the understanding that they are not officially supported yet. In fact, it would be kind of nice from my standpoint to have a beta-tester.
Sterling
Hi,
It seems that they are matching
kaur@Yellow-Eyed:~$ gfortran --version
GNU Fortran (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
Copyright © 2013 Free Software Foundation, Inc.
…
kaur@Yellow-Eyed:~$ /opt/mpich-shared/bin/mpif90 --version
GNU Fortran (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
Copyright © 2013 Free Software Foundation, Inc.
…
Regarding the other topic, I would be interested in trying your version with hexagonal lattices. I’ve got to run a model anyway so I could give you some input about how it works out. I still have to figure out how to build new versions though.
Kaur
Is there any chance that build files from old compilations of OpenMC are hanging around? You can clean out any build files by running these commands (starting in the /src directory):
rm -r build
git checkout – .
git clean -f -d
cd xml/fox
git checkout – .
git clean -f -d
Run those and try compiling it again.
Sterling
Kaur,
I believe the error you are getting is related to the fact that a different compiler was used to make the MPI build. Assuming you are in a linux environment, every gcc .mod file contains a version number. Not all (if any?) version numbers are compatible. You can see what version number was used for a particular .mod file by using the command
head -n 1 mpi.mod
or
zcat mpi.mod | head -n 1
if the .mod file is compressed.
Check the module version number for mpi.mod located in your mpi directory under /include directory of your mpi build. Then check the module version number of a file in your openmc build/include directory. My guess is that your openmc .mod version will be greater (newer) than your mpi .mod version. If they are different, you must rebuild your mpi libraries.
I am not an expert in compiling issues like this, but hopefully this helps. Let me know how it turns out.
Cheers,
Matt
Hi,
Thanks! There was indeed a version mismatch in the mod files. In the end I had to recompile both mpich and petsc, but now I managed to build openmc as well.
Cheers,
Kaur