I certainly don't consider myself an expert on computers; this page contains issues that I encountered and how I overcome them, I wouldn't be surprised that some may find it useful and some not. I have gained a lot thanks to the generousity of many in sharing their knowledge and therefore I would like to carry forward by sharing. This will soon be written in Wordpress as part of this website (when the database on the server is ready!).


Updates (04/2015):

I am slowly adapting to Wordpress, visit My Computing Blog for the most recent notes.


Installation

I have spent numerous hours trying to install several astronomical packages: GILDAS, and CASA on my machine (Mac Mountain Lion). For unknown reasons, most colleagues of mine have installed these packages with ease on their Macs. Nonetheless, I will address the issues I encountered and how I resolved them. First of all, I use Homebrew to manage most dependecies. I have tried Macports, and never tried Fink as of today.


GILDAS

There were a number of conflicts between libraries on my machine and the library paths GILDAS 'make' looks for. I never figured out why the conflicts were not resolved using explicit form of exporting library paths. I rememeber there was one related to PKG_CONFIG and GTK+, which were both installed using Homebrew. Later it was resolved serendipitously as I fixed some stuff to install CASA, and re-install MIRIAD.


MIRIAD

I broke my GNU make standard library while fixing the warnings from 'brew doctor'. As a result, the installed and working propoerly MIRIAD was destroyed. The fastest way to fix this without dwelling into the library files is to download the latest archive of the GNU compilers from HPC. I reinstalled MIRIAD and it worked.


CASA

My first attempt to install CASA 4.2.2 was using the .dmg provided on CASA official website, but it kept saying I had numpy API 6 and refused to install as it requires API 9. Turns out even my default python is Anaconda (which is what I have been using), CASA looks into my outdated Apple factory-installed numpy. 'easy_install -U' didn't work for me, I 'hard'-copied my API 9 numpy from the anaconda library to replace this numpy. CASA installed properly.


UVMCMCFIT

A few subtleties on running this packge: If you run uvmcmcmfit by typing "import uvmcmcfit" inside python console, it will not run on multi threads regardless of the setup in the configuration files; run "python <path to uvmcmcfit code>" in terminal instead to support multi-processing. Currently, convergence under the module "visualize" will save empty convergence.png if your matplotlib version is above 1.4.0.


Homebrew

At first I was very glad that Homebrew has 'brew doctor' that tells you what might be wrong on your system files. I trusted 100% what it says and followed several suggestions I found on github and stackoverflow to delete the libraries Homebrew dislikes. Later, these turn out to be important libraries that other installed scientific packages use. Lesson learned: Homebrew serves its purpose in installing packages (besides GNU compilers), I will not run brew doctor and delete anything it dislikes.


ssh + screen + display

Screen sessions allow having an actual term or shell session stay alive, often the case when using IPython and matplotlib, eog, evince, etc. The problem is that the $DISPLAY environment variable may change, so that later when you log into the machine later, screen thinks the present $DISPLAY will no longer be current, and throws an error.

Solution:

  • add the following to ~/.bash_profile (which gets read when log in via ssh):

    echo "export DISPLAY=$DISPLAY" > .display.`whoami`.`hostname`

  • and the following to ~/.bashrc:

    ## set the PROMPT_COMMAND to read the .display file

    export PROMPT_COMMAND=". ~/.display.`whoami`.`hostname`"


  • Now, a file .display will be created (updated) in $HOME with $DISPLAY variable, specific to the user and hostname every time you log (back) in (trigger ~/.bash_profile). $PROMPT_COMMAND will read that file when you return to a shell session. This should allow X-display windows forwarding to your client machine.



    Tools

    Sublime Text

    Before I spent my time learning the ultimate tricks you can do with this powerful editor, I was impressed by the color and snippets it has. As I started, I just wanted an editor with non-exaggerated color, and automatic word wrapping. Later to my suprise, sublime is extremely powerful and flexible. I installed SFTP package which allows me to sync my html and css scripts as I am writing this webiste, I can as well look into the files on the remote server inside sublime.


    LaTex

    Astronomical citation style reference is very resourceful on bibliography formatting in LaTex for astronomical papers.

    TeXWorks and TeXShop do not have dictionaries installed or activated to check spelling as you type. The work around is to install dictionaries in the corresponding directory.

    One can always add templates to their LaTex softwares: I use TeXShop on my Mountain Lion. The path for me is : ~/Library/TeXShop/Templates

    Remember to do texhash after adding style, templates, dictionaries, etc to path.