Installing CEA on an Intel Mac

Similar documents
Installing CEA on an Intel Mac

Manual Eclipse CDT Mac OS Snow Leopard

Introduction to Linux. Fundamentals of Computer Science

COPYRIGHTED MATERIAL. Installing Xcode. The Xcode Installer

CS CS Tutorial 2 2 Winter 2018

Chapter-3. Introduction to Unix: Fundamental Commands

Introduction in Unix. Linus Torvalds Ken Thompson & Dennis Ritchie

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

PROGRAMMAZIONE I A.A. 2015/2016

CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 1

ENCM 339 Fall 2017: Editing and Running Programs in the Lab

15-122: Principles of Imperative Computation

REV SCHEDULER for UNIX/LINUX

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Introduction of Linux

1 Installation (briefly)

Unix and C Program Development SEEM

CS Fundamentals of Programming II Fall Very Basic UNIX

Programming Project 1: Introduction to the BLITZ Tools

Basic Unix Commands. CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang

IOL INTACT Installation Guide

LAB #7 Linux Tutorial

Running MESA on Amazon EC2 Instances: A Guide

More Raspian. An editor Configuration files Shell scripts Shell variables System admin

Intermediate Programming, Spring Misha Kazhdan

Using the Unix system. UNIX Introduction

Using Eclipse for C Programming

Linux at the Command Line Don Johnson of BU IS&T

EE516: Embedded Software Project 1. Setting Up Environment for Projects

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

CS/CIS 249 SP18 - Intro to Information Security

Introduction to Unix: Fundamental Commands

CS 261 Recitation 1 Compiling C on UNIX

CSC209. Software Tools and Systems Programming.

COP 3014: Spring 2018 A Guide to Using CLion

Linux/Cygwin Practice Computer Architecture

Linux Systems Administration Getting Started with Linux

If you had a freshly generated image from an LCI instructor, make sure to set the hostnames again:

The build2 Toolchain Installation and Upgrade

CISC 220 fall 2011, set 1: Linux basics

GUT. GUT Installation Guide

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

Lab Working with Linux Command Line

CSE 303 Lecture 4. users/groups; permissions; intro to shell scripting. read Linux Pocket Guide pp , 25-27, 61-65, , 176

cgatools Installation Guide

Linux Essentials Objectives Topics:

Introduction to Cygwin Operating Environment

Practical Session 0 Introduction to Linux

Mac OS X 10.6 Snow Leopard Installation and Setup Guide

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

24 Writing Your First Script

Unix Workshop Aug 2014

Boot Camp Installation & Setup Guide

INF322 Operating Systems

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016

Exploring UNIX: Session 3

Exercise 1: Basic Tools

Everything about Linux User- and Filemanagement

USB-MIDI Driver installation and settings...1 Windows XP users... 1

Basic Shell Commands

Introduction to Unix - Lab Exercise 0

Initial setting up of VPN Java version.

eftp Application User Guide

Introduction. SSH Secure Shell Client 1

Running Java Programs

Masternode Setup Guide

When you first log in, you will be placed in your home directory. To see what this directory is named, type:

Running Sentaurus on the DOE Network

Introduction to UNIX. SURF Research Boot Camp April Jeroen Engelberts Consultant Supercomputing

Introduction to Linux

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

AMS 200: Working on Linux/Unix Machines

CS370 Operating Systems

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Chap2: Operating-System Structures

Introduction to the UNIX command line

Week 2 Lecture 3. Unix

CS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi

Cloud Computing and Unix: An Introduction. Dr. Sophie Shaw University of Aberdeen, UK

Race Condition Vulnerability Lab

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

Cloud Computing and Unix: An Introduction. Dr. Sophie Shaw University of Aberdeen, UK

a. puppet should point to master (i.e., append puppet to line with master in it. Use a text editor like Vim.

CENG 334 Computer Networks. Laboratory I Linux Tutorial

CMSC 201 Spring 2018 Lab 01 Hello World

INSTALLATION GUIDE. CalculiX Graphical Pre- and Postprocessor cgx 2.9 on Mac OS X El Capitan. 1 B. Graf

A Tutorial on using Code::Blocks with Catalina 3.0.3

A Brief Introduction to the Linux Shell for Data Science

Lab 1 Introduction to UNIX and C

CS197U: A Hands on Introduction to Unix

acmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs;

L.A.M.P. Stack Part I

Getting Started With UNIX Lab Exercises

Lecture 1. A. Sahu and S. V. Rao. Indian Institute of Technology Guwahati

CS354 gdb Tutorial Written by Chris Feilbach

Transcription:

Installing CEA on an Intel Mac Jonah Zimmerman April 20, 2012 1 Introduction Chemical Equilibrium with Applications (CEA) is a computer program published by NASA Glenn with the purpose of calculating chemical equilibrium product concentrations from any set of reactants and determining thermodynamic and transport properties for the product mixture [1]. The reason that you re reading this document is that you d like to install CEA on an Intelbased Macintosh computer, which is an unfortunately complicated procedure. The process presented in this document was compiled from the notes of Professor Brian Cantwell, Siina Haapanen, Minna Chao, Ashley Chandler, from the help of Matthew Giarra, and from references [2] and [3]. It has been tested in OS X 10.6.4 (Snow Leopard) by the author, and in OS X 10.5 (Leopard) by Rosalind Beckwith. 2 Dramatis Personae The characters involved in this play include: CEA - a Fortran program coupled with a Java user interface gfortran - GNU compiler for Fortran programs (free alternative to UNIX s f77) gcc - GNU compiler collection - a set of compilers for various programming languages terminal - OS X s porthole to the UNIX command line XCode Tools - a set of tools for developing software on OS X root - the super-user on a UNIX machine emacs - a UNIX text editing program 3 Terminal There are many ways of getting to the UNIX command line which is buried under the shiny beautiful surface that is the OS X user interface. One of the simpler, no-frills methods is using the program Terminal which is located in the utilities folder inside of the applications folder. Graduate Student, Stanford University, jonah.e.zimmerman@gmail.com 1

This opens the bash shell by default, and if it s not you can switch back through Terminal s preferences menu (if it s running bash already, it will say so at the top of the window): Open Terminal preferences, and find the option under startup that will automatically enter a command each time Terminal is opened. Make this command /bin/bash. Alternatively, for a single window you can just type the command bash to change it for that window only. 4 XCode Tools You will need to install XCode Tools to obtain the gcc. While XCode Tools comes with OS X, it is not installed by default. This can be done by popping the OS X DVD into your computer, navigating to Optional Installs and starting the XCode Tools installer. It can also be obtained online via Apple s website: http://developer.apple.com/tools/xcode/ To download it from the site, Apple does require that you sign up for an Apple Developer Connection account, but it s free and is comparable to the hassle of finding your OS X install DVD anyway. You can also log in using a normal Apple ID if you have one, and they ll only ask you a few more probing questions. 5 gfortran To make CEA function, you need to recompile some of the Fortran programs. To do that, you of course need some way of compiling Fortran programs! With XCode Tools, you ve installed gcc, a compiler for a wide range of programming languages that by default doesn t include Fortran. To obtain a Fortran compiler, gfortran, you must head to http://hpc.sourceforge.net/ Where you can find under the heading GCC 4.6 (auto-vectorizing gcc with openmp) the links for downloading the gfortran files, specific to either Leopard or Snow Leopard. Make sure you just download the gfortran package, and not the whole gcc package. Once you ve downloaded the gfortran package, you ll need to move it to somewhere useful, unzip it, and install it. Depending on the setup of your computer and user profile, you may need to switch to the root user of your system in order to complete some of the following commands. To switch to root, simply type in the terminal window su root, and then enter the appropriate password. If you are not the owner of your computer, you should probably contact the owner before trying to continue. If you are the owner of the computer and you don t know the root password, first try your own user s password. If that doesn t work, the root password may never have been set. You can set it using the command sudo passwd root. Then enter your own password, and set the root password to whatever you d like. Continuing with the installation, first you ll need to make a directory in which to put gfortran: mkdir /usr/local/src/gfortran 2

However, if /usr/local/src doesn t exist (you ll get an error when you try to type the above command), you ll first have to make it: mkdir /usr/local/src Then to move the downloaded file to the target directory, first navigate to the location where it was downloaded, and then use the following commands (these commands are for the Snow Leopard file, if you re using Leopard, just replace snwleo with leopard): cp gfortran-snwleo-intel-bin.tar /usr/local/src/gfortran Now move the working directory to that folder: cd /usr/local/src/gfortran and then to install it: tar -xvf gfortran-snwleo-intel-bin.tar -C / to test if it installed correctly, simply type gfortran -v. to: If it returns something similar Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin10/4.6.0/lto-wrapper Target: x86_64-apple-darwin10 Configured with:../gcc-4.6-20100703/configure --enable-languages=fortran --host=x86_64-apple Thread model: posix gcc version 4.6.0 20100703 (experimental) (GCC) then you re all set (some of it will be different depending on your computer and version of OS X). If it returns command not found, then something s wrong. One possible reason is that the installed directory isn t in the normal search path, so your computer isn t seeing it. To see if this is the case, type: echo $PATH, and look at the list of directories that it outputs. If /usr/local/bin was not one of the directories, then you need to add it to the path. This can be done by typing echo export PATH=/usr/local/bin:$PATH /.profile (be very careful with the spaces - there s only one after the ) and then closing your terminal window, quitting the program, and then restarting terminal with a new window. Type echo $PATH to make sure it worked. If this also didn t work, see the notes at the end of the next section about the alternate method for updating the PATH variable. If for whatever reason you decide to uninstall gfortran, go to the directory that you installed it from (ie cd /usr/local/src/gfortran/ ) and run this code: tar -tf gfortranfile sort -r (cd /; xargs -t -n 1 rm -d) 3

6 CEA Files To download the CEA files themselves, go to the following page on NASA Glenn s site: http://www.grc.nasa.gov/www/ceaweb/ceaguidownload-unix.htm From here, download the following three files: CEAgui JAR (CEAgui-jar.tar.Z) CEA+Fortran Package (CEA+Fortran.tar.Z) CEAexec Package (CEAexec-mac.tar.Z) Make a new directory and save all of these files in it This will be where CEA is installed, so place it wherever you d like the final program to be. Then, open a terminal window and navigate to the folder where the files are, and use the following commands to uncompress the files (do not use a program like Stuffit Expander): zcat CEA+Fortran.tar.Z tar xvf - zcat CEAexec-mac.tar.Z tar xvf - zcat CEAgui-jar.tar.Z tar xvf - When you re finished, you should have the following six files in this folder: CEAgui.jar, thermo.lib, trans.lib, syntax, b1b2b3, FCEA2. If not all six are present, check that you have correctly downloaded and unpacked all three packages. Now, the permissions of several files have to be changed. This can be done using the following commands: chmod a+x b1b2b3 chmod a+x syntax chmod a+x FCEA2 chmod a+x runcea.sh Finally the environment variable PATH must be changed to include the CEA installation directory. Do this by typing: echo export PATH=/directory/where/CEA/is:$PATH /.profile And then quitting and restarting terminal (make sure you replace /directory/where/cea/is with the actual directory!). Type echo $PATH and make sure that your CEA installation directory is on the list. For some people this method of updating PATH does not work, and while I have been unable to determine the reason, there is another way to do it. It involves opening a text document that contains a list of directories, and then adding the CEA directory to that list. The text editor of choice is emacs, and opening the file into it can be done by typing (note that you will need to be logged in as root for this step): emacs /etc/paths Now, navigate to the bottom of the file with the arrow keys, and then add on the next line the 4

directory where CEA is installed. For example, once I added the directory to my PATH file, it looked like this: /usr/bin /bin/ /usr/sbin /sbin /usr/local/bin /jez/school/stanford/cea stuff/cea To exit emacs hit ctrl-x and then ctrl-c. When it asks you if you want to save the file, type y. 7 Update CEA Files Now, some of the CEA Fortran files need to be recompiled. To do that, move to the CEA installation directory and type the following code: gfortran cea2.f mv a.out FCEA2 gfortran b1b2b3.f mv a.out b1b2b3 gfortran syntax.f mv a.out syntax If during this process you get a long string of warning messages about feature deleted: goto... it s bogus and safe to ignore. Now you should have new executable files, but you ll still need to get new library files. To do that, type: FCEA2 trans FCEA2 thermo FCEA2 cea2 Note that each time you type FCEA2 you should get a statement asking for the input filename. You should now be all set. To try it out, type./runcea.sh in the CEA installation directory, and try loading an example file and executing it. 8 Troubleshooting This section is still in progress. If you have any problems, let me know and I ll add it here. There are many ways to go wrong installing this software, so here is a list of common errors and what they mean: File not found! Runtime.getRuntime().exec(b1b2b3) not complete due to the missing thermo.lib or trans.lib or BAD data! This means that you didn t update the CEA files correctly. Make sure that you didn t get any error messages when completing that part of the installation. 5

ERROR: Missing Fortran Executable File: FCEA2.exe or FCEA2! Please Exit! This means that the PATH environment variable doesn t include the CEA installation directory. as: assembler (/usr/bin/../libexec/gcc/darwin/x86_64/as or /usr/bin/../local/libexec/gcc/darwin/x86_64/as) for architecture x86_64 not installed as: no assemblers installed I don t entirely know the details behind this error, but it seems to be related to the installation of the gcc. Reinstalling XCode Tools and then proceeding with the installation from there has solved this error in the past. References [1] http://www.grc.nasa.gov/www/ceaweb/ceawhat.htm [2] http://hpc.sourceforge.net/ [3] http://www.webmo.net/support/fortran osx.html 6