Giter VIP home page Giter VIP logo

altarinstall_osx's Introduction

Installing AlTar in MacOS >= High Sierra

Instructions for setting up AlTar inversion software via macports.

Macports

  1. Make sure you have XCode. If you haven't installed it yet, get it from the App Store.

  2. Install command line tools from within XCode.

    $ sudo xcode-select --install
    
  3. Agree to the terms of license.

    $ sudo xcodebuild -license
    
  4. Download and install Macports based on your OSX version.

  5. Restart the terminal.

Installing the Necessary Ports for AlTar

IMPORTANT! Pick a consistent version for installing your ports. Keep in mind that gcc, python and postgresql always evolve in time. I would also recommend to create and/or manage your environment/privatemodules such that you will only load appropriate environment variables and paths. Dumping everything in the ~/.bash_profile is a recipe for disaster. For setting up your privatemodule, you can refer to this link:

For AlTar, I recommend that you stick with the versions listed here as these were already tested to work atleast both in High Sierra and Mojave OSX.

  1. Before installing the ports run the following script to get the updated macport version:

    $ sudo port selfupdate
    
  2. And then to install the necessary ports, simply do the following in your terminal for each of those ports:

    $ sudo port install <portname> [+optionalvariant]
    

    (e.g. sudo port install python37 +readline)

  3. Alternatively, you can just clone/download the ports.requested file, cd to the location of the file and enter the following in your terminal:

    $ sudo $SHELL
    $ port -Nu install $(cat ports.requested)
    
  4. Once all the ports are installed. Type $ port select --summary. If you are installing AlTar from scratch, you will notice that the column name, Selected, is just filled with none entries. To replace them, you have to manually port select from the Options column. Or, to make it easier, I wrote a script to do this automatically. Just clone/download run_portselect.sh and do the following in your terminal (assuming you are still in a super user mode, otherwise you have to type sudo $SHELL first):

    $ chmod +x run_portselect.sh
    $ ./run_portselect.sh
    

Note: Check if ports are properly selected via $ port select --summary.

  1. Add the following in the privatemodule file that you specifically created for AlTar:

    prepend-path PATH /opt/local/bin:/opt/local/sbin
    
  2. Otherwise if you did not setup your privatemodule, the messy way of doing this (not recommended) is adding the following line in your ~/.bash_profile:

    export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
    

Getting the AlTar Package

  1. Run the following in the terminal:

    $ mkdir ~/Documents/AlTar
    $ cd ~/Documents/AlTar
    $ git clone https://github.com/pyre/pyre.git
    $ git clone https://github.com/aivazis/mm.git
    $ git clone https://github.com/altarframework/altar.git 
    

Compiling AlTar

  1. Make sure you have a folder named tools in your home directory (otherwise, you can create using $ mkdir ~/tools).

  2. Copy the config.mm file for mm and mm.pfg for pyre in their respective folders. Do the following in your terminal:

    $ mkdir ~/.mm ~/.pyre
    $ mv config.mm ~/.mm
    $ mv mm.pfg ~/.pyre
    
  3. Edit your privatemodule file for Altar:

    set DV_DIR ${HOME}/Documents/AlTar
    set-alias mm "python3 ${DV_DIR}/mm/mm.py"
    set-alias mm.env "mm --env=sh"
    set-alias mm.show "mm --show --dry"
    
  4. OR your ~/.bash_profile:

    # mm configuration
    export DV_DIR=${HOME}/Documents/AlTar
    alias mm='python3 ${DV_DIR}/mm/mm.py'
    alias mm.env='mm --env=sh'
    alias mm.show='mm --show --dry'
    # end of mm
    
  5. Add the following in the ~/.bash_profile in order to call mm.paths in your terminal:

    mm.paths() {
      eval $(python3 ${DV_DIR}/mm/mm.py --quiet --paths=sh $*)
      
    }
    
  6. You are ready to compile! Restart the terminal and type the following,

    $ cd ~/Documents/AlTar/pyre
    $ mm.paths
    $ mm
    
  7. To test a simple geodetic inversion using a point-pressure source model (i.e. Mogi model), see this link.

altarinstall_osx's People

Contributors

gracebato avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.