Jump to: navigation, search

Original Proposal

ASCEND4 Install

Ascend4 install for MAC OS X 10.7. Download here.

Mac ASCEND4 Installer screenshot.


Ascend4 is an interesting project for simulation. It has a development that has managed to harmonize various development platforms like C, Fortran, cpp, perl and python.

Installation Process

Base System

They use a Mac OS 10.7, the core features are:

osxs-Mac-Pro:gtk osx$ uname -a

Darwin osxs-Mac-Pro.local 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr  9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64
Error creating thumbnail: File missing
Mac screenshot

Initial environment variables are:

osxs-Mac-Pro:gtk osx$ env

Configuring Process Installation

Here is how a few extra steps to the explanation given in Porting to Mac.

Update 10.7.x Mac Osx

The default version of the MacBook Air purchased in December 2011 contains a version of the operating system on which you can install Xcode version used for this development. You need to do a system update. Downloading components are about 1.5 Gb

No development has tested the version of MAC OSX 10.8 Lion Mountain.

Installing Xcode

After updating the Mac OSX 10.7.3, install the Xcode that complement the Mac OSX packages like GCC GIT and LLV among others, should not make a binary copy of a system to the other because corrupts files development.

XCODE version is used for development:

Installing GTK and PyGTK

This installation process is similar to GTK Porting to Mac, the crucial difference to enhance direct Ascden4 packaging is that if you follow the same process source files and PYTGTK GTK installation will be in / Users / YOURUSER / gtk / inst and libraries in / Users / YOURUSER / gtk / inst / lib and when generating installer packages would be needed to place the files in those folders option ige-mac -bundler is not the best because the dependencies have many ramifications and are determined by the binary files and that would mean ruining modify.

So the installer was modified in its variables jhbuild 'HOME' to place PWD and installing the binaries and libraries took place in / opt / gtk, similar to the installation directory of PyGTK.

He has trouble pycairo library to install MAC OSX 10.7 and the problem apparently is reported AND FORMAL no solution but a problem of architecture and has to be solved by hand. This is the [bug].

Being in compiling jhbuild must hand to finish as follows:

$sudo ./waf configure --prefix=/opt/gtk --libdir=/opt/gtk/lib

They should try to modify the file architecture eliminating standing on the Mac folder ascend the.

$sudo ./waf build
$sudo ./waf install

Failure to correct the problem would have to copy the Mac PyGTK port as a last resort

Installing Numpy, scipy, ipython matplopt and

Inside the folder / opt / gtk

sudo easy_install pip
sudo pip install virtualenv
sudo pip install virtualenvwrapper
sudo pip install numpy
sudo pip install -e git+
sudo pip install -e git+
sudo pip install ipython
sudo sh
python install
import matplotlib

Surely with this installation matploptlib not compile correctly it is best to enter the folder and compile it that way. Previously make.osx must configure the system with version and version of python

$cd /opt/gtk/src/matplopt 
$sudo make -f make.osx PREFIX=/opt/lib PYVERSION=2.7 fetch deps mpl_install_std

For added security to test with a sample code.

Error creating thumbnail: File missing
Matploptlib test

Installing Scons

Was installed Scons version 2.20 can be downloaded from [here].

One problem is that installers note several binary dependencies are stored in / usr / local / bin

But can not be used directly as: $ scons. You need to do the following:

ln -s /usr/local/bin/scons /bin/

Installing PCRE

SWIG has a unit called PCRE or PCRE - Perl Compatible Regular Expressions, can be downloaded from [here] and also in / opt / gtk

The compilation result should look something like this:

sudo make install
pcre-8.31 configuration summary:

    Install prefix .................. : /usr/local
    C preprocessor .................. : gcc -E
    C compiler ...................... : gcc
    C++ preprocessor ................ : g++ -E
    C++ compiler .................... : g++
    Linker .......................... : /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
    C preprocessor flags ............ : 
    C compiler flags ................ : -O2
    C++ compiler flags .............. : -O2
    Linker flags .................... : 
    Extra libraries ................. : 

    Build 8 bit pcre library ........ : yes
    Build 16 bit pcre library ....... : no
    Build C++ library ............... : yes
    Enable JIT compiling support .... : no
    Enable UTF-8/16 support ......... : no
    Unicode properties .............. : no
    Newline char/sequence ........... : lf
    \R matches only ANYCRLF ......... : no
    EBCDIC coding ................... : no
    Rebuild char tables ............. : no
    Use stack recursion ............. : yes
    POSIX mem threshold ............. : 10
    Internal link size .............. : 2
    Match limit ..................... : 10000000
    Match limit recursion ........... : MATCH_LIMIT
    Build shared libs ............... : yes
    Build static libs ............... : yes
    Use JIT in pcregrep ............. : no
    Buffer size for pcregrep ........ : 20480
    Link pcregrep with libz ......... : no
    Link pcregrep with libbz2 ....... : no
    Link pcretest with libedit ...... : no
    Link pcretest with libreadline .. : no

Also make symlink to bin:

osxs-Mac-Pro:swig-2.0.8 osx$ sudo ln -s /usr/local/bin/pcre-config /bin/

Installing SWIG

SWIG is used with gtk and python Ascend. You must download [here] if not compiled SWIG does not generate the graphical environment ascend4.

sudo make install

osxs-Mac-Pro:Ascend osx$ sudo ln -s /usr/local/bin/swig /bin/

Installing Sundails

Download and install [sundails] for solutions Solvers.

ASCEND4 Compiling

Download ascend4 of:

osxs-Mac-<Pro:Ascend osx$svn co svn:// ascend

Use the following command:

osxs-Mac-Pro:Ascend osx$scons --config=force

Alternatively the configuration files and CONOPT IPOPT


It has some posix outputs due to MAC

osxs-Mac-Pro:Ascend osx$ ./pygtk/ascdev models/johnpye/
CREATED ASCENDLIBRARY=/opt/ascend/models
CREATED ASCENDSOLVERS=/opt/ascend/solvers/cmslv:/opt/ascend/solvers/conopt:/opt/ascend/solvers/dopri5:/opt/ascend/solvers/ida:/opt/ascend/solvers/ipopt:/opt/ascend/solvers/lrslv:/opt/ascend/solvers/lsode:/opt/ascend/solvers/qrslv
CREATED DYLD_LIBRARY_PATH=/opt/ascend:/opt/ascend/pygtk
CREATED PYTHONPATH=/opt/ascend/ascxx

Restarting with...
   export ASCENDLIBRARY=/opt/ascend/models
   export ASCENDSOLVERS=/opt/ascend/solvers/cmslv:/opt/ascend/solvers/conopt:/opt/ascend/solvers/dopri5:/opt/ascend/solvers/ida:/opt/ascend/solvers/ipopt:/opt/ascend/solvers/lrslv:/opt/ascend/solvers/lsode:/opt/ascend/solvers/qrslv
   export DYLD_LIBRARY_PATH=/opt/ascend:/opt/ascend/pygtk
   export PYTHONPATH=/opt/ascend/ascxx
PYTHON...  ./pygtk/ascdev
ascdev: posix_spawn: /opt/ascend/pygtk/ascdev2.7: No such file or directory

The solution is to create a copy of ascdev to the folder ascdev pygtk

osxs-Mac-Pro:Ascend osx$ cp -r pygtk/ascdev pygtk/ascdev2.7
osxs-Mac-Pro:Ascend osx$ ./pygtk/ascdev models/johnpye/

Some screenshot more [here] Installer Creation


To create ASCEND4 compiled files are copied to ascend as follows:

osxs-Mac-Pro:Ascend osx$ mkdir  -r
osxs-Mac-Pro:Ascend osx$ cp -r ascend
osxs-Mac-Pro:Ascend osx$ cp -r ascend/mac/Info.plist
osxs-Mac-Pro:Ascend osx$ cp -r ascend/mac/ascend.icns
osxs-Mac-Pro:Ascend osx$ cd
osxs-Mac-Pro:Ascend osx$ ln -s  Resources/ascend/ascdev ascend 
osxs-Mac-Pro:Ascend osx$ ln -s  Resources/ascend/ascdev2.7 ascend2.7

Creating PKG and DMG

For creating PackageMaker installer used both tools and DistUtilities MAC environment.

DMG disk creation

First you create a disk is placed ASCEND name with a space of 500 MB when you have closed within the Resource folder and

Creation of PKG is used to place inside the PKG. The files within the can see [here]

List of Files dependencies

This [list] Dependency Resources is part of that anger within ASCEND.dmg file

Installers Compiled and tested for no Official installer

These packages are installed directly in the Downloads folder, which is not correct, it is best to also install in / opt / gtk because files are then linked to in the scons and may suffer breakout pass to the installer, not included in the final installer but if sl [ASCEND-t.dmg].

Official Installer for MAC OS X 10.7.x [ASCEND.dmg]

    • NOTE The installer create folder /opt/gtk and /opt/Ascend

Installing Ipopt

To install the Ipopt was taken as reference in installer ASCEND [# Ipopt Gentoo].

Installing graphviz

For tree diagrams GraphViz is installed, it also in / opt / gtk. Use sources [here].

I need scons to compile these files:

-rwxr-xr-x  1 lucialoyola  staff   31304 Aug 18 15:18 libcdt.5.dylib
-rwxr-xr-x  1 lucialoyola  staff   86216 Aug 18 15:16 libcgraph.6.dylib
-rwxr-xr-x  1 lucialoyola  staff   56100 Aug 18 15:15 libgraph.5.dylib
-rwxr-xr-x  1 lucialoyola  staff  485020 Aug 18 15:15 libgvc.6.dylib

Installing c-unit

Package was installed c-unit.

Lyx installation

There was no test

NOTE ***: It is expected to make a new installer with these packages.

Problems Found

Among the main problems migrate or make an installer for MAC OSX are:

1. - MAC has not GTK. You must use the jhbuild.

2. - Problems with configuring jhbuild PyGTK installed by default.

3. - Sundails dependencies, pcre, etc..

4. - IPOPT dependencies, when compiling graphviz.

5. - Using Virtual Environments for testing installers.

6. - Differences between using correct python syntax.

7. - The use of non-MAC OSX libraries to include in Ascend4.

8. - The time to compile everything you need to make an installer from a Clean MACOS is 26 hours with a 200kb connection.

Unsolved problems

  • Integrating and packaging facility for MACOSX ASCEND4 in Scons.
  • Add events to ASCEND4 MacOSX
  • Integrate IPOPT packages, graphviz.
  • Bug Fix GraphViz you have a problem in converting whole chain.
  • Fix ASCEND IPython console.
  • Do not rely on PackageMaker and DiskUtilities

Gsoc Student

Carlos Mauro Cárdenas Fernández