Young programmers rubbish

Hey hey, its been a while.

Hell, its been a while since I logged at my blog as admin. I almost forgot that it even exists 🙂 This is my effort to bring it back from the forgotten.

There isn’t any particular thing I’d like to talk about. There are couple of thing I’ve been doing lately, which might be interesting… to finish 😀

First, its socket programming in C. More precisely, I’m making some coding examples, while learning about sockets in C, and while learning I’m trying to implement very very simple application protocol. It might be a good starting point for newbies. Real usefulness of this protocol would exist, if there was need for it. And there isn’t. Doing it for fun, learning and enthusiasm.

Second, since I’m at last year of my studies, I have a finishing project. At finishing year as a bachelor, students have some practical, every day, problem to solve. As a student of master studies, students have more scientific approach, so problem is little bit more science oriented. For example, my work is based on fortran90 MPI parallelization. While I’m at this one, I’d like to point to one funny site. Its about hacker names for your business card. So, related to that, I’d be something between multicore general and parallelista B-) Nice! Now, back to the science. For now, its all about computing positions of gas particles in cylindrical chamber, and one processor is doing calculation for one particle at the time. Nothing very special. Next is doing statistical based model parallelization, which should be more interesting.

Aaaand, in the mean time, while trying to take some time to rest, I’m reading books. Sci-fi ones 🙂 Last book that I’ve finished is Revelation Space, by Alastair Reynolds. Really nice one. The book I started to read recently is Ready Player One, by Ernest Cline. This one is really cool, and I’m not even at one third of the book 🙂 Guys who like games, would like this one.

So, thats it. Have a good time gaming, reading, programming, listening… Bye!

Advertisements

Parallel programing with MPI and OpenMP

Hey hey ppl!

In past couple of hours I have been writing some seminar about parallel programing. It would be correct to say dozen of hours, but I don’t know if that is grammatically correct? 😐 To be precise, I have been working on source codes couple of days, and it was very strong impression. Unforgettable! How could I forget it when I had just a little sleep 🙂 I’m afraid I’m getting hyperactive and very tired at the same time, so don’t mind if I write nonsense every now and then. Yey 😀 Let’s get to business, or sort of business :S

I wont bug you with the history of parallel programming… It’s just a yatty yatty bla bla big companies having a lot of money to spend on distributed computing research… And so, bla bla they developed tools for making programs execute at the same time on more than one processor… Yatty yatty there were a lot of different implementations with the almost same idea, and they had a deal to make some standards. MPI and OpenMP are well known. Boom, you think we are starting real job now! Wouw! Anyway, different tech for different purposes. MPI is Message Passing Interface. Programmers use it for parallel computing on distributed multicomputers. Distributed multicomputers!!! Now, I’m a smart guy? No, it is just a techy name for… lets say cluster! Wtf is cluster man? 🙂 Ok, lets say you have couple of computers and very fast interconnection between them. At that point you are on good way to have a cluster! All you need is right OSes, and very powerful processors on those computers. Yeah, not to forget a lot of RAM, if you are going to run some serious computations which are RAM expensive. On the other side, there is OpenMP. It is Open Multi Processing. Programmers use it to parallelize program codes on centralized processing machines. SMP if you like it! With it you have the power to fully utilize both processors of your computer, or how many you have them. Cool, I’ll try and run it on GPU. Not! I’m afraid you wont be able, coz OpenMP doesn’t run on GPU processors. Either way, you can make a practical use of it. I just can’t remember any right now. These examples which I’ll talk about are some of use, but not very practical. Hey, who needs to calculate list of prime numbers using Eratosthenes sieve on daily basis?? Not me! Lets explain ideas behind those examples.

So, I did some research on Eratosthenes sieve and sequential program codes, and I’m not nuclear physicist, but I did found some really useless things in some implementations found on net. Gosh, today everyone with Internet connection can write something and publish! Haha, me too! 😀 Tell me I’m goood. Pleaseee??!! Ah, forget it. Back to the subject. I did some research on OpenMP and I decided to try and parallelize Eratosthenes sieve with OpenMP, having already parallelized code with MPI. It was good thing to let programs calculate list and compare needed times for both of them. Since I’m going to give you link to archive containing all source code, I’m not going to get all dirty explaining code. Buuut! I’m going to share with you the results of testing. Those are:

OMP v1 and OMP v2 are two versions of OpenMP parallelized code. Word ukupno means time needed for whole program to finish. As you can see, OpenMP is little bit better in compare to MPI. Of course, MPI has some implicit barriers in collective communications and that is what is keeping it from working as fast as OpenMP.

Anyway, you can download source here, and you will find instructions for running programs.

Have a nice day! Bye!

Wot is Clementine?

Hey hey hey!

It’s been while since my last post, and that is because I had a one month break… Ok, it was officially brake, but I can’t stop researching.

Since last time, many new things happened, like new Spor 018 podcast (Yeah, I ❤ DNB). There was a SimLab seminar on parallel programming and numerical simulations in Belgrade, which I have attended. New version of Clementine (0.5) player is out, having some really cool stuff added (sync with removable media like usb, queue manager and other).

You must be saying, wow! does these things have something in common. No! I just wrote it without making any order.

This would be all from me, for now! Bye!

(mmm what about clementine???)

Huh yeah 🙂 Clementine!

The story goes like this. There was Amarok. Great music player based on qt libraries. It was made for KDE desktop eviroment, but ppl could use it on gnome too. Everyone can recall how Amarok 1.4 was kicking the ass. The BEST. Then, ppl making Amarok made some “improvements” (at least that is how I look at them), and there you got Amarok 2.0. For someone who was new to Amarok, and started with a Amarok 2.0, that version was not bad. But for users of good old Amarok 1.4, new version was crappy, or for most of them (and me!). As time passed by, new distributions of Linux went out, and there was no support for Amarok 1.4. Some ppl continued to share manually compiled versions for new distributions, so we could enjoy best Amarok ever made, but this will end soon. That was the reason why some Amarok 1.4 fans started making new player based on Amarok 1.4 look. They named it Clementine! Yey. It is very new project, and doesn’t have some of Amarok 1.4 functionalities, but they keep building new versions and as I can see, Clementine is going to be very similar to Amarok 1.4 in near future. As I said, there is new 0.5 version of Clementine, and I recommend you to try it.

That’s is ppl, see you soon!