NEW - A post "Installation of Code_Saturne 2.0-rc1 on Ubuntu 10.04 (64 bit)" was recently published and recommended if you have already updated to Ubuntu 10.04.
Code_Saturne version 2.0.0-beta2 was released at the beginning of this August. Since the user routines were changed into FORTRAN95 (.f90 extension) free format, it is suggested to update onto this version.
Code_Saturne 2.0.0 changed its installation onto "autoconf". Therefore, its compilation can be completed by using a typical procedure "configure && make && make install". If you don't mention a target directory for the "configure" scripts, all code will be installed into /usr/local. With respect to the usage, sourcing of a "cs_profile" file is not needed anymore, and you can directly use a unique "cs" script under /usr/local/bin.
The following is an instruction on how to compile Code_Saturne 2.0.0-beta2 on Ubuntu 9.04.
First of all, for CS 2.0.0, install necessary packages by using apt-get.
# for compiling source code
:/$ sudo apt-get install build-essential gfortran libxml2 libxml2-dev
# install BLAS mathematic libraries
:/$ sudo apt-get install libatlas-headers libatlas-base-dev
# for openmpi (support for parallel computing)
:/$ sudo apt-get install openmpi-bin openmpi-dev libibverbs-dev
# for ssh-server (support for parallel computing)
:/$ sudo apt-get install openssh-server
# for GUI
:/$ sudo apt-get install python-qt4
# for GUI, provide pyuic4, pyrcc4 and pylupdate4
:/$ sudo apt-get install pyqt4-dev-tools
# optional, only necessary if compile MEI
:/$ sudo apt-get install bison flex swig python-dev
# for LaTeX documents
:/$ sudo apt-get install tetex-bin tetex-base
# for LaTeX documents, provide fig2dev
:/$ sudo apt-get install transfig
# for LaTeX documents, provide epstopdf
:/$ sudo apt-get install texlive-extra-utils
Download packages bft-111, fvm-0140, ecs-200 and ncs-200 from the official website, and then together with the extra downloaded packages, metis-4.0, hdf5-1.6.9 and med-2.3.5, extract these packages into a temporary directory, in which you can "configure; make; sudo make install" them one by one.
1. Compile metis-4.0, hdf5-1.6.9, med-2.3.5 and bft-1.1.1
# ship into metis-4.0
:/$ make
:/$ cp graphchk kmetis mesh2dual mesh2nodal oemetis onmetis partdmesh partnmesh pmetis /usr/local/bin/
:/$ cp libmetis.a /usr/local/lib/
:/$ cp Lib/*.h /usr/local/include/
# ship into hdf5-1.6.9 :/$ ./configure --prefix=/usr/local :/$ make :/$ sudo make install
# ship into med-2.3.5 :/$ ./configure --with-hdf5=/usr/local :/$ make :/$ sudo make install
# ship into bft-1.1.1 :/$ ./configure :/$ make :/$ sudo make install
2. Compile fvm-0.14.0
# ship into fvm-0.14.0 :/$ ./configure --with-mpi=/usr/lib/openmpi :/$ make :/$ sudo make install
3. Compile ecs-2.0.0
# ship into ecs-2.0.0-beta2 :/$ ./configure :/$ make :/$ sudo make install
4. Compile ncs-2.0.0
# ship into ncs-2.0.0-beta2
:/$ ./configure --with-mpi=/usr/lib/openmpi --with-prepro=/usr/local LIBS=-lm
:/$ make
:/$ sudo make install
# optional, to produce and install pdf documents
:/S cp ~/fullpage.sty ~/lastpage.sty doc/style/
:/$ make pdf
:/$ sudo make install-pdf
After this is finished, use "cs config" to check the status of the newly installed Code_Saturne 2.0.0 beta2.
Ps, this instruction did not include the compilation of MEI, because I encountered an error during my trying it. I thought it is okay to ignore this error. However, after finishing the whole installation, I found the option "user law" was grey and disabled.
make[1]: Entering directory `/home/salad/Code_Saturne/src/mei-1.0.0/pytests' cp: `../pytests/mei_test.py' and `../pytests/mei_test.py' are the same file make[1]: *** [all] Error 1