Happy Pi Day

Yes, it is March 14, 3.14. Oh, really, it is Pi approximately. Pi has been calculated to over one trillion digits past the decimal with computers, according to PiDay.org.

There are some interesting stuff about Pi.

Poetry based on Pi: Not a wake: A dream embodying (pi)’s digits fully for 10000 decimals

Also you could find more books about Pi.

Pi music: please visit http://www.educationalrap.com/music/pi-day

Would you like a Pi’s pie? Just Imaging!

Use TORQUE Resource Manager on Fedora 12

TORQUE is an open source resource manager providing control over batch jobs and distributed compute nodes. It is a community effort based on the original *PBS project and, with more than 1,200 patches, has incorporated significant advances in the areas of scalability, fault tolerance, and feature extensions contributed by NCSA, OSC, USC , the U.S. Dept of Energy, Sandia, PNNL, U of Buffalo, TeraGrid, and many other leading edge HPC organizations.[1]

1. Install TORQUE packages

$sudo yum install torque* libtorque

Configure TORQUE on the server

$cd /usr/share/doc/torque-2.1.10/
$sudo vi torque.setup

change the lines

qmgr -c 'create queue batch'
qmgr -c 'set queue batch queue_type = execution'
qmgr -c 'set queue batch started = true'
qmgr -c 'set queue batch enabled = true'
qmgr -c 'set queue batch resources_default.walltime = 1:00:00'
qmgr -c 'set queue batch resources_default.nodes = 1'

qmgr -c 'set server default_queue = batch'

as

qmgr -c 'create queue batch'
qmgr -c 'set queue batch queue_type = execution'
qmgr -c 'set queue batch started = true'
qmgr -c 'set queue batch enabled = true'

qmgr -c 'set queue batch resources_default.walltime = 72:00:00'
# walltime = 72:00:00 means that every job has 72 hours to execute as default

qmgr -c 'set queue batch resources_default.nodes = 1'

qmgr -c 'set queue batch max_running = 2'
# max_running = 2 means there are two jobs running at any time

qmgr -c 'set queue batch max_user_run = 5'
# max_user_run meas there are five jobs in the queue

qmgr -c 'set server default_queue = batch'

then execute it as

$sudo ./torque.setup root

for root as the administrator.

3. setting the server nodes
the default TORQUE configuration folder on Fedora 12 is /var/torque
make a file server_priv/nodes like this

node01 np=2

node01 is your hostname, np=2 means 2 processors on the node

4. Initialize/Configure TORQUE on Each Compute Node
make a file mom_priv/torque.cfg like this

$pbsserver localhost # note: hostname running pbs_server
$logevent 255 # bitmap of which events to log

5. Start the daemon service

$sudo chkconfig pbs_mom on
$sudo chkconfig pbs_sched on
$sudo chkconfig pbs_server on

6. Test service configuration
verify all nodes are correctly reporting

$pbsnodes -a

view additional service configuration

$qmgr -c 'p s'

Finally, you finish the settings so that you want to work on it. Submitting a job in the queue is to use command qsub

$qsub batchjob

the batchjob is a file containing some settings and command lines.

However, this is a simple configuration to use TORQUE on Fedora 12. A detailed configuration is on the site clusterresources.com

References
[1] http://www.clusterresources.com/products/torque-resource-manager.php
[2] ClusterResources. TORQUE Administrator’s Guide. v2.3

Dynamic Characteristics Analysis of Side-Branch Resonant Hydraulic Pulsation Dampers

Title: Dynamic Characteristics Analysis of Side-Branch Resonant Hydraulic Pulsation Dampers (in Chinese)
Author: DU Run, KE Jian, YU Lanying

Abstract: Transient state of side-branch resonant hydraulic pulsation dampers computed with a CFD (Computational Fluid Dynamics) code was presented to analyze relationship between dynamic characteristics of dampers and their cavity. Under laminar condition, using M-sequence pressure signal to simulate pressure wave acting as a kind of boundary and considering compressibility of fluid to simulate transient state of pulsation dampers. Frequency response is given via FFT (Fast Fourier Transform) of transient pressure sequences. Frequency responses and insert loss are compared among pulsation dampers with same cavity volume but different diameter and length. Using step pressure to simulate pressure impact, flow field is showed. And, pulsation dampers with same frequency response but different cavity volume were designed,and their performance were presented. Relationship between base frequency of dampers and diameter-length ratio was given via distributed-parameter model. The result shows: dampers’ dynamic characteristics is related to cavity’s diameter-length ratio in a certain degree, when the ratio is less than 1 and decreases, base frequency of damper is getting smaller; when it is larger than 1 and increases, base frequency of damper increase little, in this case, it has little relation with this ratio. The analysis provides optimization direction of side-branch resonant hydraulic pulsation dampers.

For Preview

Connect ADSL Automatically and Email You Network Information

It’s time to enjoy winter holidays. However, teachers will be working for another two weeks. I’d like to use the computers in the lab when I am at home. I need to create an automatic job to do this work. The job works on Linux systems (Fedora 12 and Redhat EL 5) with pppoe, sendmail, cron. Here is the steps.

1. create an ADSL account, name it as adsl

2. make a new file adsl.up,

$vi adsl.up

commands in the file as

ifup adsl
ifconfig ppp0 | mail -s IPaddress yourmail@mail.com

the 1st line is to connect ADSL with adsl profile
the 2nd line is to get the ADSL (ppp0) connection infomation and to email you

A more complicated commands, with if-then, which could avoid to email nothing or to run mail wrong if the connection is not successful.

ifup adsl
PPPSTATUS='ifconfig ppp0'
if $PPPSTATUS
then
  ifconfig ppp0 | mail -s IPaddress yourmail@mail.com
fi

3. change it mode to allow it executable

$chmod +x adsl.up

4. add the following line to the end of /etc/crontab file:

00 21 * * * user PATH/adsl.up

this line means the machine will run adsl.up at 21:00 everyday.

5. for saving the time of online, make a disconnecting file adsl.down
and make it executable

ifdown adsl

add the following line to the end of /etc/crontab file:

00 01 * * * user PATH/adsl.down

this line means the machine will run adsl.down at 01:00 everyday.

Ok, it’s alright, but the sendmail configuration need detail
1. edit /etc/mail/sendmail.mc

$vi /etc/mail/sendmail.mc

find the following line

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

and change 127.0.0.1 to 0.0.0.0, 0.0.0.0 means to find the domain on the internet.

2. Senmail SMTP authorizing

$vi /etc/mail/sendmail.mc

find the lines

dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl
dnl define(`confAUTH_MECHANISMS’, `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl

delete the dnl in the begining of the lines, since dnl means comment this line in sendmail configuration file. Deleting it can make the line work.

3. add adequate nameservers

$vi  /etc/resolv.conf

add 8.8.8.8 and 8.8.4.4 as your nameservers

    ; generated by /sbin/dhclient-script
    nameserver 8.8.8.8
    nameserver 8.8.4.4

4. restart the sendmail service

$service sendmail restart

Finally, it works. I can use the lab computers in the winter holidays.

Happy New Year

I hope you had a wonderful 2009.

In the beginning of 2010, I wish you have a brilliant year.

Happy New Year!

Review of My 2009

When 2010 is around the corner, I want to share you my 2009, what has been finished, what has not started?

What has been finished?

  • Two papers were submitted, one of them was accepted. I have finished three papers up to now with a paper submitted in 2008 being accepted in 2009.

What I have done in 2009?

  • Study for three months, June to August, in Japan.
  • Travel in Hokkaido in the summer holidays, in Japan.

What has not been finished?

  • PhD thesis is half the way. I have written half of my thesis, there is still half to write in 2010, I will finish the draft before winter holidays.
  • There is still an article to write. However, I have an idea and data, it’s time to write.
  • English articles about my research have not been written.
  • TOEFL test.

This is my review about my 2009.



Get Adobe Flash playerPlugin by wpburn.com wordpress themes