Configure NS-2 with Eclipse in Linux

For most users of NS2, it would be easier if they can use a popular IDE to work with the files.
Here are the step by step instructions I followed to set up NS-2.34 with Eclipse 3.5 in Ubuntu Linux.

In older versions of Eclipse, the settings might be slightly different.

I have compiled the following steps after running into various problems and errors with the setup, and solving them all. So I hope the setup will be smooth for you.

Setting up Eclipse:

  1. Download Eclipse SDK
  2. Extract the SDK to a folder
  3. Open Eclipse
  4. Go to Help -> Install New Software. In the Work With bar type this:
    http://download.eclipse.org/tools/cdt/releases/galileo
  5. Choose CDT Main Features and CDT Optional Features. Install them.
    CDT stands for “C/C++ Development Tooling”
  6. If you do not have a working internet connection in the system you have installed Eclipse, instead of steps 4 and 5, download the CDT from the above mentioned site. Then move to Install New Software (see step 4) -> Add and add the archive downloaded.

Installing NS-2

  1. Download NS-2
  2. Extract NS-2 to a folder, i.e. /home/username/ns-allinone-2.34
  3. Edit Makefile:
    • Open “…/ns-allinone-2.34/ns-2.34/Makefile.in”and
    • Add those lines anywhere near the top of the file:
        CCOPT = -g
        DEFINE = -DNDEBUG
        DEFINE = -DDEBUG
    • Navigate to …/ns-allinone-2.34/ns-2.34 and run “./configure”
  4. Navigate to the NS-2 folder using terminal and type ./install
  5. Also, follow the instructions are displayed at the end of a successful installation. These instructions are to modify the PATH variable and other environment variables as needed.

Adding NS-2 as a Project in Eclipse

  1. Open Eclipse
  2. Set the workspace as the ns installation path( /home/username/ns-allinone-2.34 ) by selecting File -> Switch Workspace
  3. Choose File -> New -> Project -> C++ Project
  4. Select Project Type as Makefile Project -> Empty C++ Project.
    Toolchains: Linux GCC
  5. Enter Project Name as ns-2.34
  6. Uncheck “Use default location” then browse to the directory NS-2 source directory ( …/ns-allione-2.34/ns-2.34 )
  7. Select “Next” and “Finish.
  8. From the workspace, Selecting the NS-2 Project and choosing Project -> Build All should not give Error.
  9. Running the project must open the console with the NS-2 prompt, %

Setting Debug Configuration:

  1. Select Run -> Debug Configurations
  2. Choose C/C++ Application. Type in any name.
  3. Under the Main tab, Choose the following:
    Project as ns-2.34.
    C/C++ Application as ns. (Search Project and Choose this)
  4. Under the Debugger tab, choose GDB Debugger. Uncheck the “Stop on startup at” option.
  5. Apply and Debug.
  • Share/Bookmark

Tags: ,

Unnai Pol Oruvan – not exactly

Having read quite a few reviews and after watching the movie twice, I feel the movie is a very good one, but a little below perfection. I am mentioning the points which I noticed in this movie, and not the ones I noticed in the original movie, ‘A Wednesday’.

PROS and CONS:

DIRECTION: Chakri Toleti

  • The movie is well directed, right from the starting scenes where each character is introduced one after the other. The scenes provide a very good character sketch of every person.
  • There are quite a few mistakes in direction. The most important one which I noticed was that the clocks in the WAR room wall were not working. For every scene, they were just reset to an appropriate time. The second hand of the clocks were not moving. This probably shows that there had been retakes, and the clocks therefore were kept at a constant time.
  • When Inspector Arif arrives at Commissioner’s office, two constables wish him “Good Morning”. Sometime later, the reporter says that she received the call from the unknown person (Kamal Haasan) at 12 noon. Arif comes only after this incident happens. Which means, the constables must have wished him”Good Afternoon”.
  • To diffuse the bomb, Kamal Gives the instructions in the following order: Join the blue and red wires and then cut the green wire. But while Mohan Lal conveys the same instruction to the Bomb Squad personnel, he tells it in the reverse order. But the personnel acts according to the original order. While dealing with bombs, the order might probably matter.
  • As far as I know, there is no train that goes from Chennai to Madurai corresponding to the time mentioned in the movie. Probably it was some special train.
  • The TV’s in the WAR room wall show the same video over and over again.
  • The reporter is shown to be a smoker. She is shown holding the cigarette, lighting it, and taking it away from the mouth, in three different scenes. She is never shown ‘really’ smoking. A good one.
  • Instead of bringing in the CM as is the case in the original, here, the CM’s voice has been used, which has turned out to be a really good idea. And also showing the Chief Secretary moving out of the CM’s house is a very good thought, because, the shot has been taken at CM’s residence in Chennai (or probably a replica of the residence,but still, a good idea).
  • Portraying the Chief Secretary as a timid person but trying to hide her fear is really good.
  • It is a bold move to make a movie in Tamil without any songs that break the continuity of the narration.
  • I feel the direction was a bit better in the original hindi movie, ‘A Wednesday’.

MUSIC:

The background score by Shruti Hassan is a let-down. The music starts and ends abruptly, at random places. Music plays a huge role in movies of this genre. they influence the mindset of the audience. From this perspective, the movie lacked a good background score.

STORY:

  • Not much deviation from the original.
  • The incident which Kamal Haasan narrates as the one which affected him, is a bit too gruesome than the incident narrated in the original movie. I feel it was not required.

DIALOGUES:

  • Kamal Haasan has delivered his dialogues very well. But the highlights are areas where he speaks through his actions, without a word spoken.
  • When Mohan Lal becomes too serious about what he is talking, he shifts to Malayalam, and that is very realistic and natural.
  • The reporter mixes pure tamil with colloquial tamil very often. Sometimes, it sounds too odd.
  • Some dialogues, which were very prominent and unique in the original. failed to impress in the tamil version. Sometimes this has been because of the background score. Two such dialogues that come to my mind are: “that(dropout) was by choice” by the hacker, and “I guessed so” by Mohan Lal, when Kamal Haasan says that there are no bombs placed elsewhere.

Overall, a few questions still linger in my mind:

Did the audience get the feel that Kamal Haasan was a common man? In other words, was Kamal Haasan suited for this role? This question needs an answer because, in Tamil Nadu, where Kamal Haasan is worshipped as a hero, it is really tough to find a place in the heart of the audience as a common man. I’d say, Kamal Haasan did justice to his role, but he was just not suited for it. Nazeeruddin Shah was more appealing as a common man, in the original movie (I have this feeling probably because that is the only movie of Nazeeruddin Shah that I’ve seen).

When a movie of such importance is made, with great actors and a greater story, perfection is expected. The better the quality of the movie is, the more the trivial mistakes matter…

  • Share/Bookmark

Tags: , ,

SFD @ NIT Trichy – Cloud Computing Workshop

It was Software Freedom Day Celebrations at NIT Trichy. And how better could the day have been!! For the first time, Sun Club of NIT Trichy and GLUG-T, The Linux User Group joined hands to conduct the event. We had organized a workshop on cloud computing and Linux/Opensolaris Install Festival.

The way we publicized the event requires a special mention. The hall was confirmed only on the penultimate day, and so we could not put up posters earlier. I designed a poster in a hurry and asked my friends to put them up at strategic places inside the college. And then we sent an SMS to more than 200 students – to all those who had attended our earlier workshops. I had asked the students to register by sending a reply to my number, providing their names and roll numbers, just to have an approximate idea about how many students might be attending the event. This proved to be really effective, and I received about 40 replies in the next two hours. We had a participation of more than 60 students, with participants from B. Tech, M. Tech and CA branches. The hall was nearly full. More importantly, it was full of energy and enthusiasm.

I had to do a night-out to prepare the slides and learn as much as I could about Cloud Computing. And in the end, the presentation came out well, even though most of the information was taken from various sites, videos and other sources.

We asked the students to register at the registration desk and gave them OpenSolaris CD’s, data sheets and Linux Mint CD’s. We then went ahead with discussion on Cloud Computing. I talked about various concepts related to cloud computing. Aswin also chipped in a few important points in between. We also discussed about virtualization and Project Kenai. We kept the students busy and interested by occasionally asking questions and giving away gifts to those who answered.

After the discussion, we went ahead with Linux / Opensolaris Install Fest where we provided installation advice. We also provided the participants VirtualBox installation files, for those who were interested to try out the operating systems but did not want to really install on the hard disk. Special Thanks to Jithin and his GLUG-T team for guiding the students regarding the Linux Installation. Some students had various problems with their Linux/opensolaris installations. A few of them we solved on the spot, whereas the others, we had promised to look into and inform the solutions as soon as possible.

To summarize, it was a great event, an awesome audience and a lot of take-backs for the participants and the organizers. Software Freedom Day was a great success. Looking forward to organizing more such events.

  • Share/Bookmark

Tags: , , , , ,

retrospects

மனிதர்கள் சிலநேரம் நிறம் மாறலாம்
மனங்களும் அவர் குணங்களும் தடம் மாறலாம்

இலக்கணம் சில நேரம் பிழை ஆகலாம்
எழுதிய அன்பு இலக்கியம் தவறாகலாம்

விரல்களைத் தாண்டி வளர்ந்ததைக் கண்டு
நகங்களை நாமும் நறுக்குவதுண்டு

இதில் என்ன பாவம்
எதற்கிந்த சோகம்

கிளியே …

Heard the song “நலம் வாழ எந்நாளும்” while travelling in a bus… The above lines are excerpts from the lyrics of that song. And the lines just made me sit back and think….

  • Share/Bookmark

Tags:

Kadri Gopalnath on Sax @ Festember 09

There could not have been a better start for Festember ’09, The National Level Cultural Festival of NIT Trichy. The mind-blowing performance on the saxophone by Dr. Kadri Gopalnath left the audience speechless and craving for more. He was accompanied on the violin by A. Kanyakumari and on the Mridangam by Harikumar. We also had on stage Sriram on keyboard, Raj Ganesh on Ganjeera and Raja Sekhar on the Moursing.

The evening was greeted by heavy showers. Incidentally, the first song was Sarasiruho Janani, set to ragam Amruthavarshini – The ragam that brings rain. With a short but kalpanaswaram, it was a testimony to the fact that the artiste was no ordinary person, and that we all have loads to learn from such stalwarts. The next song was Raghuvamsa Sudha, a refreshing piece meant for instrumentalists. The song was presented brilliantly, with an unbelievable co-ordination between sax and violin.

The main song was “Enna Thavam”, set to ragam Kapi. A brief raga elaboration was followed by the song, which brought out the emotions of the perfectly. And then was the thaniaavarthanam, which was so brilliant, the likes of which most of the audience have never heard of. The audience were tapping their feet and clapping their hands till the thaniaavarthanam ended. Anyone who had heard the rendition would have forgotten all their worldly worries and plunged into the divine world of music.

Then there were a series of light-classical songs, the first among them was “Anjali Anjali”, a song which is very famous, especially among the students of NIT Trichy. Then he performed “Kurai Ondrum Illai”, composed by Rajaji. The audience had requested him to play the theme music of the movie ‘Duet’, which he rendered immediately after. And then came the famous Tamil cine song, “Kaatrinile Varum Geetham”, which was followed by “Alaipayudhey”, set to ragam Kaanada. Then came another audience request, “Brahmamokate” in Bowli ragam. Then he performed the ragam Punnagavaraali, on which the snake tune is based. The concert came to an end with “Muthai Thiru”, a Tiruppugazh.

To summarize, it was a roller-coaster ride for all of us. A musical journey which transported all of us to an entirely different world. A world where music was eternal.

  • Share/Bookmark

Tags: , , ,

google teaches you recursion

Ever tried to search for the term “recursion” in Google Search??? Well, it is worth a try !!

When you search for a term having a typographical error, Google intelligently asks you, “Did you mean: … “. But on searching for “recursion“, Google asks you back, “Did you mean:recursion”, even though you’d have typed the correct spelling.

Google is really intelligent. It not only gives us links on recursion … It literally teaches us what recursion is !!!

  • Share/Bookmark

Tags: ,

Sun Club Inductions 2009

We organized the Inductions for Sun Club of NIT Trichy recently.  The induction procedure was a two-level one, an online test followed by personal interviews.

We conducted the online test on 24th August. The response for the inductions was overwhelming. I expected a turnaround of about 40 students, but we had about 100 students in the lab. In fact, we could not accommodate all of them, and we had to make special arrangements. The students were tested on their logical and analytical skills, computer knowledge, basics of programming and Java.

We faced various technical challenges before the start of the test. We were trying out the quiz module of the Pragyan CMS for the first time. We had no clue about how it actually functioned, whether the cookies would time out before the students submitted their test and whether the database would be properly updated with the correct scores.

Many students did not know their login passwords, and we had to modify their passwords and activate their accounts manually – and we had to do this really fast, since we had very less time. But my friends helped me out in getting things done in time.

Here are some of the questions asked in the online test:

  1. What is the first program that executes after you power on your computer?
  2. main() { int *a, *s, i; s = a = (int *) malloc( 4 * sizeof(int)); for (i=0; i<4; i++) *(a+i) = i * 10; printf(“%d\n”, *s++); printf(“%d\n”, (*s)++); printf(“%d\n”, *s); printf(“%d\n”, *++s); printf(“%d\n”, ++*s); }
    What is the output?
  3. Pavi wrote a program Test.java. It compiled successfully. All it does is read a file and print its contents. During execution, where does the program reside?
  4. What is the name of Google’s operating system?
  5. What is the biggest threat to Free and Open Source Software aka FOSS?

About 30 students were shortlisted based on the online test and interviews were held in the weekend. After two days of interview sessions, 8 students were finally selected as members of the Sun Club.

It was a great experience for me too. Going ahead with organizing an online test, hoping that everything goes on smooth and making sure that the most enthusiastic minds find the doors open to the Sun Club was a mammoth task. And it all ended well ….

  • Share/Bookmark

Tags: ,

Peace and Prosperity with Ragas – Part VI

[This series of six posts are excerpts from my Guru, violin maestro (late) Dr. Kunnakudi Vaidyanathan's interview with 'The Hindu'. The therapeutic effect of music has been elucidated ]

MOHANAM

Mohanam is present where beauty and love coexist. Mohanam is a mellifluous ragam. It filters out the ill-effects of Kamam, Krodham and Moham bestowing immense benefits on the seeker. ‘Rama ninnu nammina’ by Tyagaraja, ‘Gopika manoharam nagalingam namami’ by Muthuswamy Dikshitar, ‘Mayil Vahana’, ‘Kapali’ by Papanasam Sivan and ‘Ramanai Kannara Kandena’ by Arunachala Kavirayar are some of the melodious compositions often heard.

In cinema, ‘Giridhara Gopala’ in “Meera” sung by M.S., ‘Aaga Inba Nilavinile’ in “Mayabazar”, ‘Thillayambala Nataraja’ in “Sowbagyavathi”, ‘Malargal nanaindana paniyale’ in “Idhayakamalam”, ‘Ninnu Kori Varnam’ in “Agni Nakshatram”, ‘Andanal mudal indanal varai’ in “Pavamannippu”, ‘Pazhaga theriya venum’ in “Missiyamma” and ‘Thiruchendoorin kadalorathil’ in “Deivam” are some of the super hit songs set in Mohanam.

MAYAMALAVA GOWLAI

‘Maya Malava Gowlai’ counters pollution. It can be called the gateway to Carnatic music. Sarali varisai, Jantai varisai, Keezh sthayi varisai, Melsthayi varisai, Alankaram, Geetham, Varnam, Keerthanam, Ragam, Thanam, Pallavi, Kalpanaswarangal and Neraval form the base of Carnatic music learning. The history of Carnatic music says that the system of Mayamalava Gowlai was introduced by the blessed musician, Purandaradasar. This raga has the potency to neutralise the toxins in our body. Practising this raga in the early hours of the morning, in the midst of nature, will enhance the strength of the vocal chords. Music composers of the south have used this raga to sweet effect. ‘Madura marikozhundhu vasam’ is a popular village folk song in Mayamalava Gowlai.

« Part 5

  • Share/Bookmark

Tags: , , ,

cricket and internet – a comparison

Sounds weird? Probably. I was thinking about cricket. Then my mind forayed into various aspects of internet, God knows why!. And when both these threads of thoughts got entwined in my little brain, I got a new theory. This weird comparison.

There were these olden times, when the red kookaburra balls bounced off the ground for five days before they went to rest. Yes, the test matches, which put the batsmanship and the bowling skills to grueling tests. Cricket lovers had to wait five long days to find out which team won. But it had its own charm. Grab a cup of coffee. Sit down. Watch the match. Repeat the previous steps for five days.

And there was this new technology, called email, which made the normal form of mails to be aptly nicknamed as snail-mails. Fascinating it was. Very fast. Extremely convenient. Easy to convey your feelings. But then the wait for a response  was sometimes annoying. And soon came another trend – personal websites. It took quite some time to create them, and much more time to publicize.

But then, in this fast-paced world, one cannot spend five days watching batsmen playing just too many defensive shots, scoring at under 4 per over. The focus shifted to ODIs. Just one full day. We get to know the results after just 100 overs. Interesting. And more innovation. The ground has become colourful. Teams were recognized by the colour they wear. “Men in blue”. “Men with the black caps”… More following. More money. A single packet of popcorn. But the ball turned white .. !

And then people thought. “I remember there was one guy sitting in the farthest corner of the classroom, when I was in fifth. I guess what his name was…”. A sudden sense of bonding develops between these two persons, who apparently might be in two corners of the world right now. emails are good. But not good enough. Thus came social networking. Orkut. Facebook. Hi5… Find friends. Sometimes it gets so weird that the websites help us to find our long-forgotten friends. But yes, this was much faster. Response time was lesser. And along with it emerged the blogging fashion. A few hundred words helped people to give vent to all their feelings. Quick and efficient. And the whole world was there to read it. But, privacy was hugely compromised .. !

And now to the present. People have only enough time to manage a short movie during office breaks. How can we afford to spend a whole day to watch cricket, where people just hit at about 6 an over with the ball occasionally going over the fence. Cricket got further shortened… From mega to mini to micro. 40 overs. A little above three hours. Fireworks all around. Fiery hitting. Music, Drums and Cheerleaders. A perfect commercial movie. Or a sitcom. No more time to have a full packet of popcorn. Just grab a bite, a glance at the television and off we go…

And no time to edit a blog either. Now we have twitter. After extensive research, someone has discovered that 160 characters [160 - the length of an sms too. twitter offers 140] are more than sufficient to express our feelings to this world. And along with it came all these short forms too… LOL, OMG, ROFLMAO, IMO, G2G, NVM, TTYL… Txtng s gr8. Characters are precious. Cannot afford to waste. Affectionately called micro-blogging. “I had a cup of coffee this morning at 6 am, and guess what, I made it myself”. As if the world cares… Why should i write a whole blog trying to convey that I am sad? Just “:-(” is sufficient enough. So now, twitter rocks. Not because it is good, but because people do not have time to write long emails to friends or to sit and type blogs, and twitter has come to the rescue. And this can be very easy if you put your mobile phones to appropriate use too.

Time is nearing for cricket to be made a sitcom screened during the prime-time, competing with Himym and Heroes for viewership. And time is also nearing for single-character blogging. A – I just woke up. B – I had coffee. H – I am happy. L – I love u.

Test matches have almost become vintage classics. So do emails and personal websites. Sorry, we just do not have time…

In this age of timelessness, if you really did read through this entire article of mine, you deserve special appreciation. Kudos.

  • Share/Bookmark

Tags: ,

the bing effect

The world of search engines needs a change. More features. More colour. More user-friendly. And Bing has it all.

bing

Sometimes, I sit back and think.. Doesn’t Google have competition? Is PageRank one of the best algorithms? Has search become synonymous with Google? Microsoft has come up with its own replies to these questions. Bing.

Microsoft has done its homework. Bing has given a new dimension to search. More meaning to it. And really more splash. Truly speaking, the name is really cool. Bing. Bing.

Probably we still love the Google home page, the simple elegant one. And it might take some time for Google users to get used to the colourful interface that Bing provides and the rich image on the home page. But those days are not far away.

One great challenge lies ahead for Bing. It has been etched in user’s hearts that Google is the best. Bing has to change this statement. That will be the first step towards winning the race. But it has already captivated me.

From now on, I think I might “Bing” a word rather than “Google” it. And for all the egosurfers out there!! Try out Bing.

  • Share/Bookmark

Tags: ,

Get Adobe Flash playerPlugin by wpburn.com wordpress themes