Updates from October, 2007 Toggle Comment Threads | Keyboard Shortcuts

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

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

    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.

    • David 16:20 on February 8, 2011 Permalink | Reply

      Hi,
      I am currently trying to install it on Ubuntu and manged to get until the fsplit command is executed. It splits the file into compile.000 to compile.007 but there are no *.f files so the next step fails:

      g77 -c *.f
      g77: *.f: No such file or directory
      g77: no input files

      Any ideas on that? I would really appreciate some tipps.

    • Endang 02:47 on April 19, 2011 Permalink | Reply

      I want to install Mac os on my intel laptop. thanks

    • ali 20:26 on April 24, 2011 Permalink | Reply

      hi
      An idiotic question… Can i use mcnp on Ipad?

    • Kyle 02:57 on December 12, 2011 Permalink | Reply

      So I know jack about MCNP but am playing with it for school. Just installed it on 10.6.8 OS X. It is MCNPX, received it a few weeks ago. I am not a coder beyond Matlab, which isn’t really real coding. X11 was already installed, I added Xcode just because. Apparently MCNP uses them, I did nothing with them. I opened the MCNP Mac read-me. I only used Terminal, it is Apples command-prompt. Just search for it, you’ll find it. It’s in Applications. This is what I had to do:

      -Copy the Mac MCNP read-me to desktop. Mine was called “README_mac-linux-cygwin.txt”
      -Click on the read-me on your desktop, then command-i for info on the file. Go to the bottom and check permissions. It should have BOTH read and write. If thats the case, you’re legit.
      -Open Terminal, type “ls -l README_mac-linux-cygwin.txt” (note that the read-me’s name is in the command, yours MAY BE DIFFERENT!) The output on terminal SHOULD start with “-rwxr” and then some other code stuffs. If it doesn’t there is a problem according to the MCNP read-me. I didn’t have a problem.
      -Then type “./README_mac-linux-cygwin.txt” (like said, your read-me MAY BE DIFFERENT!). This executes the file.

      Now you get some sweet early 90′s Mac voice reading off what is going on, it also spits out some text. Took my computer about 10 minutes to install before saying ‘Done.’ Note that you go not get a typical installation bar or anything. You just have a command window that occasionally updates and talks to you. So turn your sound on.

      Last note, like said I know nothing on real coding or command-prompt use. I am just aware that it exists. ALSO, the read-me had a file name error. On the first line you type it had the right file name, the name of the read-me on the MCNP disc. The second line you type that executes it had some other file name that didn’t exist on my computer or the DVD (searched for it). I figured it -should- be the same name as the one I copied to the desktop as they referenced you had to execute it. So I used the read-me’s real file name (same name used on the first line) and it worked. I am guessing the developers did a update and changed the read-me’s file name but missed changing the file name in some places in the read-me. THat or they wanted to filter the idiots. Or the first but figured the second was a stepping stone for the programming-challenged.

      Now time to drive up your bills running server-spec codes!

    • http://greencoffeeadvanceblog.com 02:31 on April 21, 2013 Permalink | Reply

      I am sure this post has touched all the internet
      viewers, its really really nice piece of writing on building up new
      weblog.

    • Dan 00:29 on August 8, 2011 Permalink | Reply

      It appears WordPress made some changes on me. Everywhere you see a //, pretend your home folder name is there.

      For example, export DATAPATH=”/Users//LANL/MCNP_DATA” should be

      export DATAPATH=”/Users/Home-Folder-Name/LANL/MCNP_DATA”

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

    How-to series 

    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
shift + esc
cancel
Follow

Get every new post delivered to your Inbox.