Dropbox is a fabulous application which is really valuable for you to have a try. I tried and truly want to share it with you by inviting you to Dropbox.
By clicking the link below you will get another 250 MB of bonus space (plus the basic 2 GB space) after you sign up and use Dropbox. Hope you are interested.
https://www.getdropbox.com/referrals/NTE1MzQ5NTI5
Thursday, 5 November 2009
Sunday, 16 August 2009
Installation of Code_Saturne 2.0.0 on Ubuntu 9.04
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-utilsDownload 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-pdfAfter 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
Labels:
CFD,
Code_Saturne,
Linux,
Ubuntu
Sunday, 9 August 2009
Linux/Ubuntu on a Lenovo ThinkPad
I installed Ubuntu 9.04 onto my ThinkPad T61. ThinkPad series is famous to be Linux friendly, and also because the big improvement of Linux/Ubuntu, after I finished the installation, I found most hardware drivers are installed and ready to use, even including the Fn keys. It is a shame that I still have more than 569 MB ThinkPad driver files for Windows XP stored on my harddisk.
* CPU Temperature and the Cooling Fans
A very useful tool GNOME Sensors Applet can indicate CPU, harddisk and GPU temperatures as well as cooling fan speed. Use apt-get to install the applet and monitor what you want.
Although it is BIOS's responsibility to optimize the cooling fan speed in order to limit the temperatures, another tool ThinkPad Fan Control (tp-fan) allow you to control the fan speed manually. To install tp-fan, enable its PPA source, and then use apt-get
However, it is not recommended to use tp-fan to adjust the temperature thresholds controlling the fan running level.
Actually, by looking up proc files under /proc/acpi/ibm ThinkPad runtime status can be obtained, including the cooling fan. Then it is known that the fan has 0-7 eight levels to be running at.
* FingerPrint Reader
Install ThinkFinger to use the FingerPrint Reader device.
Its usage is detailedly described on "Install ThinkFinger on Ubuntu".
* Harddisk Active Protection System (APS)
First of all, it is necessary to download these packages. You have to compile them manually except the third one, the script. Actually, the first one is already available in the system, and the second one can be easily installed by using apt-get; however, these binary versions cannot work as expected.
Please refer to Reference 1.
2. Use typical "./configure --prefix=/usr/ && make && sudo make install" to build hdapsd. hdapsd will be installed into /usr/sbin/. hdaps-gl, in package hdaps-utils, can be used to test hdaps. Refer to Reference 2.
3. Make the hdapsd script executable, copy it into /etc/init.d/, and then run it.
4. Build the GNOME hdaps applet and install it. Then add the applet onto a GNOME panel. The applet is an indicator to show whether the magnetic head of the harddisk is parked.
5. Refering to Reference 2, smartctl can be used to look up the park times of the magnetic head of harddisks. Among the smartctl output, the last number of the line, which contains "Load_Cycle", is the park times.
This park times has a limitation in an alive harddisk. It implies frequently parking the head is not a good idea either. Therefore, default value for the parameter "SENSITIVITY", 15, is too low. We can make it higher, for example, to 50, by modifying /etc/default/hdapsd.
Actually, on Windows I guess it is also necessary to adjust the 'shock detection sensitivity' lower to 'medium'.

References:
1. Enabling Active Protection System on a ThinkPad T61
2. X200下的HDAPS妖魔鬼怪
* CPU Temperature and the Cooling Fans
A very useful tool GNOME Sensors Applet can indicate CPU, harddisk and GPU temperatures as well as cooling fan speed. Use apt-get to install the applet and monitor what you want.
:/$ sudo apt-get install sensors-applet
Although it is BIOS's responsibility to optimize the cooling fan speed in order to limit the temperatures, another tool ThinkPad Fan Control (tp-fan) allow you to control the fan speed manually. To install tp-fan, enable its PPA source, and then use apt-get
:/$ sudo apt-get install tpfand
However, it is not recommended to use tp-fan to adjust the temperature thresholds controlling the fan running level.
Actually, by looking up proc files under /proc/acpi/ibm ThinkPad runtime status can be obtained, including the cooling fan. Then it is known that the fan has 0-7 eight levels to be running at.
:/$ cat /proc/acpi/ibm/fan
* FingerPrint Reader
Install ThinkFinger to use the FingerPrint Reader device.
:/$ sudo apt-get install thinkfinger-tools
Its usage is detailedly described on "Install ThinkFinger on Ubuntu".
* Harddisk Active Protection System (APS)
First of all, it is necessary to download these packages. You have to compile them manually except the third one, the script. Actually, the first one is already available in the system, and the second one can be easily installed by using apt-get; however, these binary versions cannot work as expected.
- Driver package: tp_smapi-0.40.tgz
- The daemon program: hdapsd-20090401.tar.gz
- Automatic management script: hdapsd
- Applet for the GNOME panel: gnome-hdaps-applet-20081204.tar.gz
:/$ sudo modprobe thinkpad_ec tp_smapi hdaps
Please refer to Reference 1.
2. Use typical "./configure --prefix=/usr/ && make && sudo make install" to build hdapsd. hdapsd will be installed into /usr/sbin/. hdaps-gl, in package hdaps-utils, can be used to test hdaps. Refer to Reference 2.
3. Make the hdapsd script executable, copy it into /etc/init.d/, and then run it.
:/$ chmod +x hdapsd :/$ sudo cp hdapsd /etc/init.d/ :/$ sudo /etc/init.d/hdapsd start
4. Build the GNOME hdaps applet and install it. Then add the applet onto a GNOME panel. The applet is an indicator to show whether the magnetic head of the harddisk is parked.
:/$ sudo apt-get install libpanel-applet2-dev :/$ cd ~/gnome-hdaps-applet-20081204 :/$ gcc $(pkg-config --cflags --libs libpanelapplet-2.0) -o gnome-hdaps-applet gnome-hdaps-applet.c :/$ sudo cp gnome-hdaps-applet /usr/bin/ :/$ sudo mkdir /usr/share/pixmaps/gnome-hdaps-applet/ :/$ sudo cp *.png /usr/share/pixmaps/gnome-hdaps-applet/ :/$ sudo cp GNOME_HDAPS_StatusApplet.server /usr/lib/bonobo/servers/
5. Refering to Reference 2, smartctl can be used to look up the park times of the magnetic head of harddisks. Among the smartctl output, the last number of the line, which contains "Load_Cycle", is the park times.
:/$ sudo apt-get install smartmontools :/$ sudo smartctl -a /dev/sda | grep Load_Cycle
This park times has a limitation in an alive harddisk. It implies frequently parking the head is not a good idea either. Therefore, default value for the parameter "SENSITIVITY", 15, is too low. We can make it higher, for example, to 50, by modifying /etc/default/hdapsd.
# sensitivity SENSITIVITY=50
Actually, on Windows I guess it is also necessary to adjust the 'shock detection sensitivity' lower to 'medium'.
References:
1. Enabling Active Protection System on a ThinkPad T61
2. X200下的HDAPS妖魔鬼怪
Friday, 24 July 2009
Installation of Code_Saturne 1.4.0 on Ubuntu 9.04
CS 1.4.0 is in beta stage.
A newly introduced feature is the rewritten GUI code, which is based on PyQt4. Therefore, we have to install PyQt4 module rather than tk/tix for CS 1.3.3.
The compiling process of 1.4.0 is quite similar to 1.3.3. You can even use the same instruction I wrote to compile the code and then use it.
Another very useful tutorial on installation of Code_Saturne 1.4b on Ubuntu 8.04 can be found from the CAE Linux wiki, although it is a bit outdated.
It is also worth mentioning that if you already have a compiled version of CS 1.3.3, you can reuse all the existing libraries in "src". Just specify them in the "setup" configuration file and you do not need to compile them again.
Ps, I couldn't make the parallel computing in CS 1.4.0 work yet. I found if I use more than one CPUs, they will be endlessly running all the time. I am still looking for the probably existing errors. Please give hints if you already solved it. Many thanks in advance.
A newly introduced feature is the rewritten GUI code, which is based on PyQt4. Therefore, we have to install PyQt4 module rather than tk/tix for CS 1.3.3.
:/$ sudo apt-get install python-qt4
The compiling process of 1.4.0 is quite similar to 1.3.3. You can even use the same instruction I wrote to compile the code and then use it.
Another very useful tutorial on installation of Code_Saturne 1.4b on Ubuntu 8.04 can be found from the CAE Linux wiki, although it is a bit outdated.
It is also worth mentioning that if you already have a compiled version of CS 1.3.3, you can reuse all the existing libraries in "src". Just specify them in the "setup" configuration file and you do not need to compile them again.
Ps, I couldn't make the parallel computing in CS 1.4.0 work yet. I found if I use more than one CPUs, they will be endlessly running all the time. I am still looking for the probably existing errors. Please give hints if you already solved it. Many thanks in advance.
Labels:
CFD,
Code_Saturne,
Linux,
Ubuntu
Installation of ParaView 3.6.1 on Ubuntu 9.04
Actually you can install ParaView with apt-get on Ubuntu 9.04 (should also be true for older versions than 9.04). However, probably this ParaView isn't the latest version.
If we want to use the latest version, please fetch the binary package from here. Up to now the latest version is 3.6.1. In terms of the Linux version, 3.6.1, 157 MB, is much bigger than the previous 3.4.0, 44.5 MB. The Windows version is smaller.
After you obtain the package paraview-3.6.1-Linux32-x86.tar.gz please just unpack it into any directory you prefer. Ship into paraview-3.6.1-Linux32-x86/bin/ and execute "paraview" to run the software.
An easier way is add paraview-3.6.1-Linux32-x86/bin/ to your $PATH variable, and then you can run paraview from anywhere.
By the way, as previously mentioned, ParaView is a cross-platform application, i.e. it is also possible to install ParaView on Windows and Macintosh OS. It would be beneficial if you are using a remote UNIX computer to do the calculation work and prefer to show and analyse the calculation results obtained on your Windows desktop.
:/$ sudo apt-get install paraview
If we want to use the latest version, please fetch the binary package from here. Up to now the latest version is 3.6.1. In terms of the Linux version, 3.6.1, 157 MB, is much bigger than the previous 3.4.0, 44.5 MB. The Windows version is smaller.
After you obtain the package paraview-3.6.1-Linux32-x86.tar.gz please just unpack it into any directory you prefer. Ship into paraview-3.6.1-Linux32-x86/bin/ and execute "paraview" to run the software.
An easier way is add paraview-3.6.1-Linux32-x86/bin/ to your $PATH variable, and then you can run paraview from anywhere.
By the way, as previously mentioned, ParaView is a cross-platform application, i.e. it is also possible to install ParaView on Windows and Macintosh OS. It would be beneficial if you are using a remote UNIX computer to do the calculation work and prefer to show and analyse the calculation results obtained on your Windows desktop.
Polishing GUI of older SALOME versions
I was using SALOME 4.1.4 before. Not like SALOME 5.1.1, the GUI in 4.1.4 is written based on QT 3. If you found the appearance of this GUI is not elegant as you expect, maybe a method can be borrowed to polish it.

Matter of fact, a tool named qt3-qtconfig can be used to adjust the QT 3 program appearance. The modification will be applied onto all QT 3 programs in the system. Use apt-get to install the tool.
I suggest the theme "polymer" for QT 3. Use apt-get to install the theme.
After they are installed, run "qtconfig-qt3" to apply the "polymer" theme. Actually, with the tool it is also possible to specify Font Family used for QT 3 programs. I prefer 'Bitstream Vera Sans' size 9. You can choose whatever you like.
I have turned to SALOME 5.1.1 already. It is therefore a pity that I cannot take screenshots to show the effect. Please try to see if you are interested.
Matter of fact, a tool named qt3-qtconfig can be used to adjust the QT 3 program appearance. The modification will be applied onto all QT 3 programs in the system. Use apt-get to install the tool.
:/$ sudo apt-get install qt3-qtconfig
I suggest the theme "polymer" for QT 3. Use apt-get to install the theme.
:/$ sudo apt-get install polymer
After they are installed, run "qtconfig-qt3" to apply the "polymer" theme. Actually, with the tool it is also possible to specify Font Family used for QT 3 programs. I prefer 'Bitstream Vera Sans' size 9. You can choose whatever you like.
I have turned to SALOME 5.1.1 already. It is therefore a pity that I cannot take screenshots to show the effect. Please try to see if you are interested.
Subscribe to:
Posts (Atom)