Updates from October, 2007 Hide threads | Keyboard Shortcuts

  • How-to: Install MCNP4C2 on Mac OS X 10.4.10 (Intel) 

    Jonathan Dann 16:09 on October 8, 2007 Permalink | Reply

    MCNP (Monte Carlo N-Particle) is a transport code that is used throughout the physics community to model how particles interact as they travel through a system. The code is quite old, and therefore requires tweaking to get it running on newer systems like Mac OS X 10.4.10. There are programs and compilers it needs to use when installing that aren’t included in Mac OS X anymore due to their age, and a few that are on the Mac OS X CD that came with your computer, but aren’t installed by default. The first things we need are:

    A FORTRAN-77 compiler and a ‘C’ compiler of the same version.
    The ‘fsplit’ program.
    X11 installed.
    The XCode tools.
    (More …)

     
    • Jack 20:29 on October 15, 2007 Permalink | Reply

      Thanks for the post, I’ve been trying to install MCNP on my machine for a few months now with no luck. I have MCNP5/MCNPX, do you know if the installation procedure is the same?

      Thanks,
      Jack

    • Jonathan Dann 21:03 on October 15, 2007 Permalink | Reply

      Jack,

      Unfortunately not, I haven’t had the pleasure of using MCNP5 or X as my hospital doesn’t have the license for them. I think 5 is on order at the moment, but could take years! From what I’ve read you might need the Absoft or IBM FORTRAN compilers, and I think both have a free trial. The g77 (FORTRAN compiler) stuff I wrote about isn’t tested with MCNP5/X, and neither is MCNP4 tested on Mac OS X, nor is the g77 normally available for Intel Macs. Took me weeks to find out how!

      I think the new ones were built with the Mac in mind though and a quick Google search came up with

      http://www.nea.fr/abs/html/ccc-0730.html

      However, it doesn’t say if it was tested on Intel, but the use of the IBM FORTRAN 90 compiler suggests it was an older G4 or G5 (PowerPC) machine.

      Keep subscribed to the post, you never know when I’ll get MCNP5 from my hospital, I’ll post a comment if I get it working. And thanks for saying thanks!

    • Jonathan Dann 21:05 on October 15, 2007 Permalink | Reply

      Also, give it a try, the key is to use the same versions of g77 and gcc (which I did above) if you get any weird log errors after trying it with those two compilers, send me the log and I’ll have a look.

    • Tad 19:10 on October 23, 2007 Permalink | Reply

      Just wondering if there was any follow-up from Jack? I’ll be trying to install MCNP5/X on an Intel Mac shortly as well and wondering if he tried it with the compilers you mentioned… Thanks too for the article–very informative!

    • Jonathan Dann 19:47 on October 23, 2007 Permalink | Reply

      Hi Tad,

      No follow-up at the moment unfortunately! Would be worth checking back here every now and then. One day I’ll get the 5/X upgrade too.

      And you’re welcome for the tutorial :)

    • xiaoyu 20:19 on October 25, 2007 Permalink | Reply

      I don’t know what any of that was about! Yay!
      But I love you.

    • Jack 22:35 on November 1, 2007 Permalink | Reply

      Hi Jonathan,

      Thanks for the help. I’ve been pretty busy at work and haven’t had any time to try to set this up. I’m hoping to get a chance within the next few weeks. As soon as I try, I’ll let you know the results.

    • Jonathan Dann 15:25 on November 14, 2007 Permalink | Reply

      Just so everyone knows, I updated this with a little fix to the fist set of terminal commands. Was a stupid mistake, if you’ve had problems, try again. Gonna try with Leopard tonight!

    • Elton 00:51 on July 14, 2008 Permalink | Reply

      MCNP4C, ola alguem pode me ajudar instalar MCNP4C no windows

    • Phil 16:10 on September 9, 2008 Permalink | Reply

      Hey Jonathan,

      Thank you for what seems to be the only tutorial online on how to install this for the Mac! I have followed your directions and have hit a snag at the install stage and would appreciate your advice. I get the following error message shown below.

      Many thanks,

      Phil

      aluminium SU >chmod a+x ./install
      aluminium SU >./install linux mcnp

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      % Time %
      % Run the SETUP program … (1-2 min.) %
      % %
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      ./install: line 41: ./mcsetup: No such file or directory

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      % %
      % SETUP ERROR OR USER ABORT. % Tue Sep 9 15:46:53 IST 2008
      % %
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    • Jonathan Dann 11:31 on September 11, 2008 Permalink | Reply

      Hi Phil,

      Yeah I struggled to find a how-to for ages until I realized that I had to work it out myself. It a bugbear of mine that the opensource/scientific community often keep the entry level too high for end-users.

      As for the problems you’re having I’d love to help but my MacBook Pro died two days ago and I’d in for repair so I can’t look at the directory structure as the install is taking place.

      Your error (forgive me if you know this already) means that mcsetp is not located in the current working directory (signified by the ./). Now it’s been a while and I can’t be sure as I can’t work through the install again at the moment but the mcsetup file is copied to your hard disk when unzipping the MCNP distribution when you begin (the part with the gunzip command).

      From your output it seems that you’re current working directory is / rather than (for example) /Applications/mcnp/mcp4c2. But as the install has begun I’m guessing that I’m wrong in thinking this.

      So first check that the folder with install also contains mcsetup. If not, then I’d start again making sure that the unzip process works properly.

      Let me know if this helps.

    • Andrew Davis 12:34 on December 8, 2008 Permalink | Reply

      Phil

      The ./install compiles a fortran program to get things rolling, it looks like either your g77 doesnt exist or you need to edit the installer script. If you have gfortran installed rather than g77, then edit the ./install and replace g77 with gfortran.

      In fact thats true throughout Johnathan’s guide. If you do the above, the installer will start, and then fail. Edit the makemcnp script and replace g77 with gfortran, also remove the “./” from fsplit.

      Run makemcnp and then you’re done.

      Hope that helps

      Andrew

    • Hywel 17:13 on August 11, 2009 Permalink | Reply

      Thanks! That recipe worked a treat! I’m now happily watching ZX Spectrum graphics of reactors in X11 on my MacBook.

    • Joel Turner 15:59 on August 18, 2009 Permalink | Reply

      Hi, thanks very much for this guide. I do have one question – when running mcnp4c2 on my Macbook, the nps and ctme cards don’t appear to work, as in the code never terminates! I’ve tried it on a couple of macs with the same result. Was just wondering if you had any ideas??

      Cheers!

    • Jonathan Dann 16:05 on August 18, 2009 Permalink | Reply

      I’m afraid not, I used to have them working fine on my MacBook Pro. To be honest its a while since I’ve done MCNP. I seem to remember such a problem once, but I think my code was just wrong :S

      Sorry.

    • Joel Turner 17:11 on August 18, 2009 Permalink | Reply

      Just realised what the issue is. It seems to need a blank line after the NPS command on Mac to be recognised. Not sure if notebook adds this automatically on windows or what!

    • Jonathan Dann 17:40 on August 18, 2009 Permalink | Reply

      That rings a bell. You have to be very careful with line endings with 4C2. Smultron and TextMate can harmonise line endings for you.

  • How-to series 

    Jonathan Dann 14:44 on October 8, 2007 Permalink | Reply
    Tags: Computing, How-to, Mac

    The next few posts I think will be a little more obscure than the others.  As a scientist, I frequently have to work out how to install random science-y programs on my computer, and how to do the odd geeky thing.

     Occasionally I get asked how to do these things, and the things I need to do are frequently undocumented, or badly documented at best.  I hope someof you find these things useful.  If not, at least they’ll exist for when someone asks me how.

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
esc
cancel