Installation of OpenFOAM into MAC

Similar documents
Software Installations

Source pack installa0on of OpenFOAM. 4.0 into RHL. Open CAE Local Study Mee0ng Y. Takagi July 2, 2016

Introductory OpenFOAM Course From 2 nd to 6 th July, Joel Guerrero University of Genoa, DICAT

PL-2303 USB-to-Serial Bridge Controller Mac OS X Universal Binary Driver Installation Guide

How to get started with OpenFOAM at SHARCNET

swiftenv Documentation

Porting OpenFOAM to Mac OS X

PL-2303 USB-to-Serial Bridge Controller Mac OS X Universal Binary Driver Installation Guide (for Mac OS X 10.9, 10.10, 10.11, 10.

SortMeRNA User Manual

Installing CEA on an Intel Mac

Open Source Computational Fluid Dynamics

OpenFOAM structure: Linux environment, user environment variables, directory and file structure, units, etc.

Environment Variables

COPYRIGHTED MATERIAL. Installing Xcode. The Xcode Installer

LetItB Installation Manual. Okinawa Institute of Science and Technology Neural Computation Unit

Git Command Line Tool Is Not Installed

Installing CEA on an Intel Mac

Chapter 4. Unix Tutorial. Unix Shell

LING 408/508: Computational Techniques for Linguists. Lecture 5

Manual Update Java Mac Os X Developer Package

Linux Command Line Primer. By: Scott Marshall

manifold Documentation

Linux Kung Fu. Ross Ventresca UBNetDef, Fall 2017

Environment Variables

CS 261 Recitation 1 Compiling C on UNIX

How To Uninstall Programs On Mac Os X Snow Leopard Without Disc

Zephyr Kernel Installation & Setup Manual

Salesforce DX Setup Guide

R Mac Setup. Chong Xing 1,2 & Paul Johnson 1,3

Supercomputing environment TMA4280 Introduction to Supercomputing

USB to Serial Adapter Driver Installation Manual

ATSC595 Air Pollution Modelling HYSPLIT Model Quick Guide- OSX, Linux Feb M. Fung

Introduction to Linux

Mac Os X Single User Mode Mount Usb Drive

OpenFOAM directory organization

CS 143A. Principles of Operating Systems. Instructor : Prof. Anton Burtsev


Definition Center Installation for Linux

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

Scanner Driver for Ubuntu

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

Php Scripts If Then Else Linux Bash Shell

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala

Linux Software Installation Exercises 2 Part 1. Install PYTHON software with PIP

The distcc Utility for Remote Compiling

Zend Server Community Edition 5.1. Installation Guide. By Zend Technologies.

Install your scientific software stack easily with Spack

Printing using the wireless network macos

Using the computational resources at the GACRC

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

Installation Guide for Macintosh August 2018

Future Technology Devices International Ltd. Mac OS X Installation Guide

Using Doxygen to Create Xcode Documentation Sets

Unix. Examples: OS X and Ubuntu

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

FOR518 Laptop Setup (Pre-class)

CSE 391 Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors

Building MPI so we can run code on multiple nodes

Introduction to UNIX I: Command Line 1 / 21

Database Backup Restore

Linux Bootcamp Fall 2015

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo

Introduction to the SHARCNET Environment May-25 Pre-(summer)school webinar Speaker: Alex Razoumov University of Ontario Institute of Technology

Jabra Suite for Mac - Mass Deployment guide Revision 1 /

A Brief Introduction to Unix

coxtactoe Documentation

Notes for installing a local blast+ instance of NCBI BLAST F. J. Pineda 09/25/2017

Mac Os X Manually Mount Usb Drive Command Line

Parallel Programming Pre-Assignment. Setting up the Software Environment

Quick tutorial for almabte

How to Dual-Boot OS X and Ubuntu

Version Control with Git

Platform Migrator Technical Report TR

SGI OpenFOAM TM Quick Start Guide

Manual Java Install Mac Os X Mountain Lion From Usb On Pc

Modules and Software. Daniel Caunt Harvard FAS Research Computing

Tizen TCT User Guide

About Xcode and iphone SDK

Precursor Steps & Storage Node

Getting Started With Cpsc (Advanced) Hosted by Jarrett Spiker

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

Engineering Robust Server Software

Software Preparation for Modelling Workshop

Configure Error No Acceptable C Compiler Found In Xcode Installed

E. Annex. Rules and conventions used for the project. v The µkos package

Working with Basic Linux. Daniel Balagué

Salesforce DX Setup Guide

Linux for Beginners. Windows users should download putty or bitvise:

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

Basic UNIX commands. HORT Lab 2 Instructor: Kranthi Varala

Setting up Python 3.5, numpy, and matplotlib on your Macintosh or Linux computer

IoT with Intel Galileo Gerardo Carmona. makerobots.tk

Oracle Communication Policy Controller. Lab Environment Preparation

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

Logging In to Mac OS X Using a HyperFIDO U2F Security Key

Installing Mac OS printer driver for myprint

Unix Workshop Aug 2014

Mac Os X Terminal User Guide

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

The build2 Toolchain Installation and Upgrade

Transcription:

Installation of OpenFOAM into MAC This tutorial explains how to install OpenFOAM into MacOS operating system. It is already tested under Mac OS Yosemite version 10.10.5 and completed successfully. If you are running the Yosemite beta or DP, you cannot use the MacPorts 2.3.1 DMG file, or the "sudo port -v selfupdate" command in the terminal. Therefore, you must first install a fresh copy of Xcode and MacPorts under Yosemite. It will then also allow you to update your ports as well. You can download Xcode and Macport easily by taking Apple Developer ID. NOTE: If you installed Xcode and Macports tools before you upgraded your MAC version, you have to uninstall and clean all dependencies and then install the new versions of Xcode and Macports again according to your new upgraded MAC version. To uninstall the Macports, and port functions, first uninstall all the installed ports by running this command in the Terminal: sudo port -fp uninstall installed To remove all remaining traces of MacPorts, run the following command in the Terminal. If you have changed prefix, applications_dir or frameworks_dir from their default values, then replace /opt/local with your prefix, replace /Applications/MacPorts with your applications_dir, and/or add your frameworks_dir to the list, respectively. sudo rm -rf \ /opt/local \ /Applications/DarwinPorts \ /Applications/MacPorts \ /Library/LaunchDaemons/org.macports.* \ /Library/Receipts/DarwinPorts*.pkg \ /Library/Receipts/MacPorts*.pkg \ /Library/StartupItems/DarwinPortsStartup \ /Library/Tcl/darwinports1.0 \ /Library/Tcl/macports1.0 \ ~/.macports Prepared by Baris BICER - SoftFlow Co., Ltd. 1

1. Then, go to following page and install last version of Xcode and Macport again: https://trac.macports.org/wiki/migration After the installation of Xcode you will use the license of the software. 2. Open the a new terminal window and run sudo xcodebuild license After this, you will be asked the administrator password input I agree with the input in view license the (English). 2.1 To check first whether you installed Xcode or not: xcode-select -p You should get reply such as: /Application/Xcode.app/Contents/Developer 2.2 Which version of Xcode do you use? To check it cd /usr/bin xcodebuild -version You should get reply such as: Xcode 7.0.1 Build version 7A1001 2.3 To check the CommandLineTools whether you installed or not xcode-select install ls /Library/Developer/ You should get reply such as: xcode-select: error: command line tools are already installed, use software Update to install updates CommandLineTools 3. After installation the Macports and Third Parties to update the information of the port. Open a terminal window sudo port selfupdate Prepared by Baris BICER - SoftFlow Co., Ltd. 2

You should get following message: ---> Updating MacPorts base sources using rsync MacPorts base version 2.3.4 installed, MacPorts base version 2.3.4 downloaded. ---> Updating the ports tree ---> MacPorts base is already the latest version The ports tree has been updated. To upgrade your installed ports, you should run port upgrade outdated 4. To upgrade already installed ports sudo port upgrade outdated You should get at the end such a reply: ----> No broken files found. 5. Install dependencies one by one 5.1.A: To install gcc49 version sudo port install gcc49 If you correctly installed the gcc49, you should get at the end such a reply: Password: ---> Computing dependencies for gcc49 ---> Cleaning gcc49 ---> Scanning binaries for linking errors ---> No broken files found 5.1.B: To set the gcc49 active you can run one of the following commands: sudo port select --set gcc mp-gcc49 (or) sudo port select gcc mp-gcc-49 You should get at the end such a reply: Selecting 'mp-gcc49' for 'gcc' succeeded. 'mp-gcc49' is now active. To check the gcc version (optional): gcc --version 5.2 Then install the OpenMPI Prepared by Baris BICER - SoftFlow Co., Ltd. 3

sudo port install openmpi-gcc49 If you correctly installed the openmpi-gcc49, you should get at the end such a reply: ---> Computing dependencies for openmpi-gcc49 ---> Cleaning openmpi-gcc49 ---> Scanning binaries for linking errors ---> No broken files found. sudo port select --set mpi openmpi-gcc49-fortran (to set the openmpi like mpi) You should get at the end such a reply: Selecting'openmpi-gcc49-fortran' for 'mpi' succeeded. 'openmpi-gcc49-fortran' is now active. 5.3 Also other dependencies can be installed one by one sudo port install cgal sudo port install ccache sudo port install flex sudo port install scotch sudo port install boost +openmpi sudo port install scotch -mpich +gcc49 +openmpi sudo port install metis +gcc49 5.4 For completeness sudo port select --set llvm mp-llvm-3.5 sudo port select --set python python27 sudo port select --set db db49 5.5 Before installing to check the dependencies run: port select --summary Prepared by Baris BICER - SoftFlow Co., Ltd. 4

6. To create a volume and mount it: hdiutil create -size 8.3g -type SPARSEBUNDLE -fs HFSX -volname OpenFOAM -fsargs -s OpenFOAM.sparsebundle mkdir -p OpenFOAM hdiutil attach -mountpoint $HOME/OpenFOAM OpenFOAM.sparsebundle cd OpenFOAM git clone https://github.com/openfoam/openfoam-2.3.x cd OpenFOAM-2.3.x 6.1 To get the patch: http://sourceforge.net/p/openfoamextend/svn/head/tree/trunk/breeder_2.3/distropatches/macpatch/openfoa M-2.3.x-Mac.patch Download the above file and place it in the OpenFOAM-2.3.x directory. 6.2 To apply patch: patch -p1<openfoam-2.3.x-mac.patch 6.3 To update the OpenFOAM-2.3.x/etc/bashrc (Append these lines to the /path/to/openfoam-2.3.x/etc/bashrc (change the "/path/to" to whatever your fully qualified path would be) echo "WM_CC=mpicc" >> /path/to/openfoam-2.3.x/etc/bashrc echo "WM_CXX=mpicxx" >> /path/to/openfoam-2.3.x/etc/bashrc 7. To install OpenFOAM run: source etc/bashrc && WM_NCOMPPROCS=$(sysctl -n hw.ncpu) =>if this doesn t work just run: source etc/bashrc Prepared by Baris BICER - SoftFlow Co., Ltd. 5

./Allwmake > log.allwmake 2>&1 7.1 To update the bash profile (open a terminal window) and enter open ~/.bash_profile This will open the.bash_profile file in TextEdit(the default text editor included on your Mac). This file allows you to customize the environment your user runs in. 7.2 And add following lines into.bash_profile file: if [ -f $HOME/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc ]; then. $HOME/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc fi Force the.bash_profile to execute. This loads the values immediately without having to reboot. 7.3 To execute the bash_profile run the following command. source ~/.bash_profile This will load the openfoam bashrc file and setup your environment 7.4 You can confirm the new path by executing the following command: echo $PATH Now you will see the changes which you have made. 8. To install ParaView follow the following steps: 8.1 First install the Paraview for the Mac operation system from this page: http://www.paraview.org/download/ Prepared by Baris BICER - SoftFlow Co., Ltd. 6

8.2 Then install it in a normal way. Then, the the resulting installation will provide the paraview binary at: /Applications/paraview.app/Contents/MacOS/paraview 8.3 Create a symbolic link to ParaView into your OpenFOAM installation, by running this command (adjust accordingly to your ParaView version): ln s /Applications/paraview.app/Contents/MacOS/paraview $WM_PROJECT_DIR/bin/paraview Note: $WM_PROJECT_DIR is where OpenFOAM is installed. 9. Edit the file ~/.alias (e. g. Text Wrangler, pico or nano); for example: nano ~/.alias If this requires root entry and gives error use (sudo s nano ~/.alias) 10. And add the following lines into alias file: alias parax="touch case.foam && paraview --data=case.foam &" alias parafoam="parafoam -builtin" 11. After that open new terminal and run:. ~/.alias 12. After that it is ready to use it. Whenever you need to run parafoam, you can run either one of the following commands parax parafoam It is ready to try it in your case Good luck!!! Prepared by Baris BICER - SoftFlow Co., Ltd. 7