Install VisIt 2.2.1 on a mac 32bits with Snow Leopard 10.6.6

Some of you might have experienced some problems when trying to install the last version of VisIt (2.2.1) on their “old” mac intel. I have an macbook pro (first generation I think, 2006) with an intel core duo CPU, thus 32bits. My OS is mac OS 10.6.6, namely Snow Leopard. The visit website proposes a binary for 10.6, but it should rather be emphasized that it is a 64 bits binary. Yes, only 10.6 will run it, but not all of them. Mine, which is installed on a 32bits machine, won’t accept this VisIt version for example.

So for those who have a core duo CPU and mac OS 10.6, download the “10.5″ visit binary, which is a 32bits version. Then problems begin… When you try to install it., by executing the visit-install script.

./visit-install 2.2.1 darwin-i386 ~/visit

Here is what you get :

find: /Users/username/visit/2.2.1+/darwin-i386/bin//Users/username/visit/2.2.1+/darwin-i386/bin/gui.app/Contents/MacOS:
No such file or directory

find: /Users/username/visit/2.2.1+/darwin-i386/bin//Users/username/visit/2.2.1+/darwin-i386/bin/mcurvit.app/Contents/MacOS:
No such file or directory

find: /Users/username/visit/2.2.1+/darwin-i386/bin//Users/username/visit/2.2.1+/darwin-i386/bin/viewer.app/Contents/MacOS:
No such file or directory

find: /Users/username/visit/2.2.1+/darwin-i386/bin//Users/username/visit/2.2.1+/darwin-i386/bin/xmledit.app/Contents/MacOS:
No such file or directory

visit-install done

Note that “/Users/username/visit/2.2.1+/darwin-i386/bin” has been written twice in the command. This comes from a bug in the visit-install script. open the file in an editor and find this :

if [ "$os" = "darwin" ]; then
    for arch in `ls "$dir"/$version+`; do
        if [ "$arch" != "bin" ]; then
            for app in `find "$dir"/$version+/$arch/bin -name "*.app"
-print`; do
                find "$dir"/$version+/$arch/bin/$app/Contents/MacOS
-exec chmod $dir_permission {} \;
            done
        fi
    done
fi
if [ "$os" = "darwin" ]; then
    for arch in `ls "$dir"/$version`; do
        if [ "$arch" != "bin" ]; then
           for app in `find "$dir"/$version/$arch/bin -name "*.app" -print`; do
               find $app/Contents/MacOS -exec chmod $dir_permission {} \;
           done
        fi
    done
fi

and errors disappears…

Then comes the second issue, when trying to run you 32 bits version of VisIt. Once your $PATH modified, you just want to type “visit” in a terminal, and wait for it to be launched. Unfortunatly you get this :

[~/visit/bin]$ ./visit
Version 2.2.1 of 'gui' does not exist for
the architecture 'darwin-x86_64'.
VisIt located binaries for the following architectures:
        darwin-i386

This problem comes from some kind of misunderstanding… the “visit” script actually calls another script, named “internallauncher”, which tries to identify the OS you have. And the trick is… when it finds out that you have 10.6 or higher, it tells VisIt to launch the 64 bits binary !!!

However, because you have an old 32bits CPU… you have (of course) downloaded the 32bits version… So, how can you tell visit that even if you have 10.6, you want to launch the 32bits binary ?

You have to modify the “internallauncher” script, find the following lines :

if ($mach =~ /i386/) {
                # For MacOS X 10.6 and above, use x86_64.
                chomp( $darwinver = `uname -r`);
                my @darwinversions = split('\.', $darwinver);
                if ($darwinversions[0] >= 10) {
                    push @supportedarchs, "darwin-x86_64";
                }
                else {
                    push @supportedarchs, "darwin-i386";
                }
            }

you see the comment ? If you 10.6 is detected, then the @supportedarchs variable gets the “darwin-x86_64″ value… just replace it by “darwin-i386″. So to sum up, replace :

push @supportedarchs, "darwin-x86_64";

with :

push @supportedarchs, "darwin-i386";

then type visit in your teminal, VisIt gui and viewer apps should launch normally. Let’s have fun now :-)

VisIt : Visualize It !

La simulation numérique permet de comprendre beaucoup de chose sur différents phénomènes physique. En particulier en astrophysique, où bien souvent on ne peut faire d’expériences en laboratoire pour voir comment le système d’étude se comporte. Le calcul parallèle sur des ordinateurs toujours plus puissants permet maintenant de faire des simulations toujours plus réalistes. Les codes de simulations deviennent réellement compliqués à élaborer, mais ils ne sont pas les seuls. Inévitablement, ces grosses simulations enregistrent sur les disques dur des données de nature toujours plus complexe et en quantité toujours plus importante. Se pose alors inexorablement le problème de la visualisation de ces données.

Pendant les quelques dernières années, j’ai utilisé IDL (Interactive Data Langage) pour faire mes visualisations. Ce langage propriétaires (ITT) est un langage interprété de haut niveau dont les fonctions standard permettent d’écrire du code de traitement de données numérique relativement simplement. Il permet également de faire de la visualisation graphique de ces données. Malheureusement si le code est de haut niveau pour ce qui est du graphique par rapport au langage C par exemple, je reste très frustré lorsque je veux juste “regarder” ce qui se passe dans ma simulation. IDL reste relativement bas niveau pour faire de la visu.

L’an passé, un ami m’a parlé de VisIt (pour Visualize It). Il s’agit d’un logiciel développé par le LLNL (Lawrence Livermore National Laboratory) et distribué gratuitement. Je vous laisse regarder le site si vous voulez des détails. Le soft permet la visualisation de haut niveau, parallèle, sans beaucoup d’efforts. Scriptable en Python (également gratuit), il permet de faire de la visu 1D, 2D, 3D pour vraiment “voir” ce qui se passe dans votre boite de simulation sans passer tout votre temps à écrire du code pour des choses aussi bas niveau que l’affichage des pixels sur la fenêtre…