# OpenMC compilation

**URL:** https://openmc.discourse.group/t/openmc-compilation/227
**Category:** User Support
**Created:** [July 21, 2016, 6:05am UTC](https://openmc.discourse.group/t/openmc-compilation/227 "2016-07-21T06:05:13Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Laurent\_Chabert](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@Laurent\_Chabert](https://openmc.discourse.group/u/Laurent_Chabert)
#### Post date: [July 21, 2016, 6:05am UTC](https://openmc.discourse.group/t/openmc-compilation/227/1 "2016-07-21T06:05:13Z")

</div>

Hi,

I’m very interesting for assessing openMC in R&D nuclear physics action, but I have some difficulties to compile openMC.

I’m trying to do such on a linux 64 bits station **not conected to web** (so i retrieved the fox package needed for the compilation as far I understand).

I downloaded the openMC-master package and fox-master associated to (from the mit-crpg page) .

I have a gcc 4.8.2 and hdf5 1.8.15 compile with.

I assume to do the step of compilation till the make (cf join file debug.openmc) and (for information debug.fox seems ok).

At final, I think I have a fortran error but as I’m not a specialist and I don’t have any ideas about the issue :

CMakeFiles/openmc.dir/src/xml/openmc\_fox.F90.o  
/home/users/openmc-master/src/xml/openmc\_fox.F90:39.21:

type(NodeListPtr), pointer :: nll(:), temp\_nll(🙂  
1  
Error: Derived type ‘nodelistptr’ at (1) is being used before it is defined

Maybe could you help as I’m a novice in openMC ?

Sorry for the trouble.

Regards

Laurent Chabert  
Areva Technicatome

Nuclear Physics Expert

[debug.fox](https://openmc.discourse.group/uploads/short-url/jBDzKloxqZqxhhvTnK2wlRoS5Pl.fox) (16.9 KB)

[debug.openmc](https://openmc.discourse.group/uploads/short-url/a6FTIIu9ELHZvA9RCGN0wtACdQg.openmc) (13.2 KB)

---

<div class="post-metadata">

### Author: ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)
#### Post date: [July 21, 2016, 11:21am UTC](https://openmc.discourse.group/t/openmc-compilation/227/2 "2016-07-21T11:21:03Z")

</div>

Hi Laurent,

I believe the problem is that you need to download our fork of the FoX repository with changes made for OpenMC, rather than the main FoX repository. Our fork can be found here:

[https://github.com/mit-crpg/fox](https://github.com/mit-crpg/fox)

After downloading and unpacking in openmc/src/xml/fox, note that you don’t need to run cmake/make from within that directory – it will automatically get pulled in when you run cmake for openmc.

Let us know if you run into any more troubles.

Best regards,  
Paul

---

<div class="post-metadata">

### Author: ![Laurent\_Chabert](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@Laurent\_Chabert](https://openmc.discourse.group/u/Laurent_Chabert)
#### Post date: [July 21, 2016, 12:03pm UTC](https://openmc.discourse.group/t/openmc-compilation/227/3 "2016-07-21T12:03:56Z")

</div>

Hi Paul,  
First of all, thank you for your answer.  
I do as you said, but i’ve the same error a bit farther [68%]…

ps : I recompile gcc with all option.

---

<div class="post-metadata">

### Author: ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)
#### Post date: [July 21, 2016, 12:09pm UTC](https://openmc.discourse.group/t/openmc-compilation/227/4 "2016-07-21T12:09:46Z")

</div>

Did you make sure to clear out your build directory and then re-run cmake?

---

<div class="post-metadata">

### Author: ![Laurent\_Chabert](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@Laurent\_Chabert](https://openmc.discourse.group/u/Laurent_Chabert)
#### Post date: [July 21, 2016, 2:05pm UTC](https://openmc.discourse.group/t/openmc-compilation/227/5 "2016-07-21T14:05:18Z")

</div>

Yes i do. I still have the fortran error.

---

<div class="post-metadata">

### Author: ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)
#### Post date: [July 22, 2016, 11:12am UTC](https://openmc.discourse.group/t/openmc-compilation/227/6 "2016-07-22T11:12:37Z")

</div>

I have to apologize – I may have misled you before. You’ll actually need to download the ‘openmc’ branch from the mit-crpg/fox repository which you can find here:

[https://github.com/mit-crpg/fox/tree/openmc](https://github.com/mit-crpg/fox/tree/openmc)

Once you download that branch and unpack it into src/xml/fox, I’m fairly certain it should fix the problem you’re seeing.

Best,  
Paul
