Conquering the Apple iPhone

August 19th, 2007

It really pays to work for a company that provides room for creative investigation and experimentation as a matter of corporate principle. This way we get nice toys to play around with. A few weeks back our very first Apple iPhone arrived. Okay. A lot of people were enamored by its good looks and cool user interface. Believe, even I found it cool. A good number of people were also impressed by its new application development model (all applications are web-based), multi-touch screen and many other innovations by Apple.

But, my interest is totally different. A jailbroken Apple iPhone provides one of the most powerful application development environments since the HP iPAQ with Linux was discovered. The only difference is that we get full to use the BSD-based MacOSX mobile inside. Yes. Full system shell, ability to install native tools and other neat features.

After a few weeks of waiting, the Apple iPhone has finally landed on my hands. Fortunately, by this time, there are a lot of sites documenting how to get into the innards of an Apple iPhone. Here are some of the most helpful ones. I suggest you follow these tutorial in the order I am specifying them. I re-did this process around four (4) times because it bricked the iPhone at multiple times. If you are getting an already activated iPhone I suggest you restore it first with iTunes. Not following the instructions in the order mentioned could brick the iPhone.

  1. Restore iPhone to Factory Settings. Press both the home and the power button at the same time for around 25 seconds (sometimes more). Just wait until you see the exclamation point on yellow triangle. Then plug the iPhone into your PC. Make sure you have iTunes installed. Then select the iPhone in iTunes and select the “Restore” button.
  2. Bypass AT&T Activation - HackTheIPhone Site. I used the standard DVD Jon method and it worked like a charm. This may fail if you try to do this using an already activated iPhone that got deactivated some how. This is what happened in my case. Thus, I was forced to do the entire process again.
  3. Before JailBreaking the iPhone - HackTheIPhone Site. Pretty standard preliminary stuff. Just follow it up to setup your working filesystem.
  4. JailBreaking the iPhone and Installing SSHKit and the iPhone binkit - HackTheIPhone Site. After installing SSHKit, the document will give you the option to change your password. DO NOT CHANGE YOUR PASSWORD YET. This is because you might mess up the permissions and cannot log into the system anymore. It is best you install the iphone-binkit first and complete that BEFORE you change your root password. I also suggest you edit your master.passwd file using your SFTP client instead. This way the permissions don’t get messed up. Again, I bricked the iPhone in this case. I was able to determine permissions were the problem because the iPhone filesystem stores its logs in the /var/msg file. Beware, the file is pretty big.
  5. Installing the Installer.app - HackTheIPhone Site. This tool is cool because it allows you to install application without having to resort to jailbreaking and tethering.

Other stuff that you may encounter.

  • iPhone because unactivated after installing SSHKit. This happens when you try to SSHKit an iPhone in a computer that you did not jailbreak it in. I suggest you do the entire thing again from a freshly restored iPhone.
  • Mismatched ICCID. After activating the iPhone and if you notice this after doing a jailbreak instead of seeing the iPhone status as Activated. It is ok. I seem to be managing all my hacking initiatives without having to bother with status.
  • Unable to login after changing the root password in the master.passwd file. Then unable to proceed to login even after restoring the master.passwd file. Check out the steps above. It is best to change your root password AFTER installing SSHKit and the iphone binkit. Also change the password using the built in context menu “edit” in your scp or sftp client. I suggest you do the entire thing again from a freshly restored iPhone.

There are still a lot of things for me to try out. I am trying to get a working cross compiler in Linux but the problem is that I have a lot of missing libraries. It would have been easier if I were usingMacOSX or at least Darwin x86. Maybe, I can build a Darwin x86 VM running on my PC as a VMWare instance. Pwede.

Hope my experience helps you go through a more painless iPhone hacking. Again, try at your own risk. Good luck!

The Third and Fourth Screens - The 1st JesCom Media Convention

August 18th, 2007

I just did a presentation discussing the developments in both the Internet and Mobile space. My presentation was entitled “The Third and Fourth Screens”. This conference is sponsored by the Jesuit Communications. It is called The 1st JesCom Media Convention. Here are the details.

This August, Jesuit Communications, Inc. will be holding its first media convention at its headquarters within the Ateneo de Manila University campus. Entitled Non-Profit Sharing, this conference aims to help individuals and organizations that are committed to non-profit causes by connecting them with socially oriented media practitioners. During this 4-Saturday seminar, participants will learn how to effectively communicate their causes through popular and new forms of media.

You can download my presentation here. Feel free to email me if you have questions.

Philippine Mobile TV Wars: So Many Choices!

August 12th, 2007

I have not been blogging lately due to on-going commitments, more entertaining pursuits (like writing parallel computing stuff) and numerous developments in the life. Fortunately, most of them are very positive. Friendly neighborhood tech blogger Abe just posted a note about Globe launching its own Mobile TV service and I just could not resist commenting on it. Abe describes the new services as …

The corporate website outlines the specifics of the mobile TV service:

They offer two channel lineups: LIVE and Made-for-Mobile (Looped, which means pre-recorded).
Available Channels: ABS-CBN, GMA, CNN, theHub, Sports.
Requirements: Globe Prepaid/ Postpaid Sim, 3G Video Call – capable handset (set to 3G/UMTS or Dual mode)
Supported Phones: All 3G/HSDPA Phones except the ff:
* Nokia Series 40 3G phones: 6280, 6233, 6288, 7390, 6151
* Older Nokia 3G phone: 7600, 6650
* Motorola 3G phones: E770, V3x, V3xx, K3, V6, V6maxx, C1000, V1050, E1070, E1000, V975, V980, A835. A1010, A1000

Usage Charging: Promo rate is at P5.00/minute. For postpaid subscribers, you can use your free minutes to watch TV for free. It will be charged against your free minutes as you use it together with your regular voice and video calls.

Operation: Do a video call to *9000.

This is on the heels of Smart’s recent launch of their MyTV service. But, if we look at both services closely. They are actually two different things. Smart’s service uses a digital TV broadcasting technology called Digital Video Broadcasting - Handheld (DVB-H). Globe’s service uses their 3G video call functionality. But wait … Smart also has a streaming TV services that was already released before. They already support local TV channels and on-demand episodes. So many choices!

Here is summary of these services.

Smart DVB-H Smart Streaming TV Globe Mobile TV
Launch Date Aug 2007 Feb 2006 Sep 2007
Technology DVB-H Streaming TV 3G Video Call
Handsets Few Most GPRS/EDGE/3G Compatible Handsets Most 3G Video Call Handsets
Channels 11 2 5
Uses CMTS Network? No Yes Yes
Broadcast? Yes No No
Narrowcast? No Yes Yes
Cost P488/month P20 per day + GPRS P5 per min
Cost per month (assume 2 hours per day for 20 days) P488 P1,600 P12,000

As a quick summary, DVB-H technology potentially provides a cheaper viewing experience for active viewers (many hours per month of viewing). It will also potentially be a more cost efficient and reliable programming delivery mechanism because it works outside the carrier’s CMTS network. The downside is that this technology requires the use of a specialized handset. Currently, there are only a few available in our market today and they are potentially pricey.

On the other hand, on CMTS network technologies like streaming TV and 3G video call, allow an operator to use existing infrastructure to deliver the programming. Hence, these services are currently costly for active viewers compared to the DVB-H option. A benefit is that these services are usable with more handsets available in the market today.

Which service will prevail? Only the market can decide.

Verizon Users Send 10 Billion SMSs in 1 Month … So?

July 28th, 2007

Here is a textually.org article on Verizon users sending over 10 billion SMS messages in one (1) months time. This is definitely something special for America.

Verizon Wireless customers sent and received more than 10 billion text messages in June 2007, a company record and the highest reported total of any wireless service provider in the nation. Also in June, Verizon Wireless customers sent and received more than 200 million multimedia messages (MMS), which include picture and video messages.

Both monthly figures represent an increase of more than 100 percent from September 2006, when the company broke the five billion monthly text message threshold for the first time.

The Philippines has a little over 40 million mobile phones subscribers who send over 1 billion SMS messages per … wait for it … DAY. That totals to over 30 billion SMS messages in one (1) month. This number even gets higher during holidays and special occasions like Valentines, New Years and Christmas. For these occasions, one operator can send out over one (1) billion SMS messages in one day. So, the Philippines still holds the crown as the SMS capital of the world. Now, if we could only get the 200 million MMS messages in one month ;-)

Parallel Computing: Hyperslabs in HDF5

July 24th, 2007

Well, I hope you guys where able to get HDF5 and OpenMPI running on your machines. As you will notice, the previous example code is not very useful because every process can read and write to any part of the file. This means that “you” as the programmer will have to manually control what is access by which process.

Have no fear. The folks at NCSA introduced the concept of a hyperslab.

Hyperslabs are portions of datasets. A hyperslab selection can be a logically contiguous collection of points in a dataspace, or it can be a regular pattern of points or blocks in a dataspace.

Here is the previous code converted into a hyperslab example.

#include <mpi.h>
#include <hdf5.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main (int argc, char *argv[])
{
        hid_t fd, plist_id, dspace, mspace, dset;
        int i, rank, size;

        /* create 2D hyperslab */
        hsize_t count[2];
        hsize_t offset[2];
        hsize_t dims[2] = {8, 5};

        int *data;

        /* initialize mpi */
        MPI_Init (&argc, &argv);
        MPI_Comm_size (MPI_COMM_WORLD, &size);
        MPI_Comm_rank (MPI_COMM_WORLD, &rank);          

        /* define size of hyperslab */
        count[0] = dims[0]/size;
        count[1] = dims[1];
        offset[0] = rank * count[0];
        offset[1] = 0;

        /* create sample data on in my memory space */
        data = (int *) malloc(sizeof(int)*count[0]*count[1]);
        for (i=0; i < count[0]*count[1]; i++)
                data[i] = rank + 10;

        /* create properties list to define parallel i/o */
        plist_id = H5Pcreate (H5P_FILE_ACCESS);
        H5Pset_fapl_mpio (plist_id, MPI_COMM_WORLD, MPI_INFO_NULL);

        /* create file */
        fd = H5Fcreate ("pdata.h5", H5F_ACC_TRUNC, H5P_DEFAULT, plist_id);
        if (fd < 0) {
                printf ("parallel %d: error on create.", rank);
                MPI_Finalize ();
                exit (1);
        }

        /* close properties list */
        H5Pclose (plist_id);

        /* create two dimensional space for the whole thing data space */
        dspace = H5Screate_simple (2, dims, NULL); 

        /* create data set */
        dset = H5Dcreate (fd, "Parallel", H5T_NATIVE_INT, dspace, H5P_DEFAULT);

        /* create two dimensional space in memory for just each processes share */
        mspace = H5Screate_simple(2, count, NULL);

        /* select hyperslab from dspace */
        H5Sselect_hyperslab(dspace, H5S_SELECT_SET, offset, NULL, count, NULL);

        /* set property list to write data collectively */
        /* change COLLECTIVE to INDEPENDENT for independent write */
        plist_id = H5Pcreate (H5P_DATASET_XFER);
        H5Pset_dxpl_mpio (plist_id, H5FD_MPIO_COLLECTIVE);

        /* write data to all */
        if (H5Dwrite(dset, H5T_NATIVE_INT, mspace, dspace, plist_id, data) < 0)
                perror ("parallel");

        /* free data */
        free (data);

        /* close properties list */
        H5Pclose (plist_id);

        /* close data set */
        H5Dclose (dset);

        /* close data space */
        H5Sclose (dspace);

        /* close file */
        H5Fclose (fd);

        /* close mpi */
        MPI_Finalize ();

        return 0;
} /* main */

You can use a Makefile similar to the one in the previous blog post. That should be a good start. Again, run this program with either 2, 4, 6, 8 processes. Happy coding!

Parallel Computing: HDF5 and MPIO for Fedora Core 6

July 23rd, 2007

As a professor once told me, “70% of a typical modeling problem is about pre-processing of data”. One of the biggest problems of data pre-processing is simple storing, representation and loading of data. Fortunately, the folks at the NCSA took the time to create stuff we could actually use to solve these problems.

What is HDF5?

  • HDF5 is a general purpose library and file format for storing scientific data. It comes with a lot of commonly used functions and utilities in library form for easy integration into existing programs.
  • Efficient storage and I/O. Definitely, this is much better than plain text file and easier than building your own binaries.
  • Software. You can build, compile and use it in a number of ways.
  • Emphasis on standards. Uses a standards-compliant storage format to allow ease of use amongst different development teams and organizations.
  • Large and varied user community. If you have a problem then there are lots of people to ask help from.

The problem is that the OpenMPI and HDF5 packages in FC6 aren’t quite what I need. The OpenMPI packages don’t have the necessary development libraries to work with Eclipse and PTP. I blogged about this previously. Here are some of the steps to get HD5F working in Fedora Core 6 and some examples to work with.

  1. Install OpenMPI as instructed in the previous blog. Or download my pre-packaged RPM for FC6 here.
  2. Install HDF5 for use in a parallel environment. It seems that the HDF5 binary RPM that comes with Fedora Extras is not compiled with parallel MPIO support. So we have to build one ourselves. I made a few modifications to the SPEC file to remove Fortran and C++ support (which I don’t need) and enabled parallel MPIO support with the “–enable-parallel” flag. You can download a pre-built RPM for FC6 here and here.
  3. Then you can try out the following test application that creates a HDF5 file using MPIO:
    #include <mpi.h>
    #include <hdf5.h>
    #include <stdio.h>
    #include <stdlib.h>
    
    int main (int argc, char *argv[])
    {
            hid_t fd, plist_id, dspace, dset;
            int i, rank, size;
    
            hsize_t dims[2] = {8, 5};
            int *data;
    
            /* create sample data */
            data = (int *) malloc(sizeof(int)*dims[0]*dims[1]);
            for (i=0; i < dims[0]*dims[1]; i++)
                    data[i] = i;
    
            /* initialize mpi */
            MPI_Init (&argc, &argv);
            MPI_Comm_size (MPI_COMM_WORLD, &size);
            MPI_Comm_rank (MPI_COMM_WORLD, &rank);
    
            /* create properties list to define parallel i/o */
            plist_id = H5Pcreate (H5P_FILE_ACCESS);
            H5Pset_fapl_mpio (plist_id, MPI_COMM_WORLD, MPI_INFO_NULL);
    
            /* create file */
            fd = H5Fcreate ("pdata.h5", H5F_ACC_TRUNC, H5P_DEFAULT, plist_id);
    
            /* close properties list */
            H5Pclose (plist_id);
    
            /* create a 2 dimensional data space */
            dspace = H5Screate_simple (2, dims, NULL);
    
            /* create data set */
            dset = H5Dcreate (fd, "Parallel", H5T_NATIVE_INT, dspace, H5P_DEFAULT);
    
            /* set property list to write data collectively */
            /* change COLLECTIVE to INDEPENDENT for independent write */
            plist_id = H5Pcreate (H5P_DATASET_XFER);
            H5Pset_dxpl_mpio (plist_id, H5FD_MPIO_COLLECTIVE);
    
            /* write data to all */
            if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, plist_id, data) < 0)
                    perror ("parallel");
    
            /* free data */
            free (data);
    
            /* close properties list */
            H5Pclose (plist_id);
    
            /* close data set */
            H5Dclose (dset);
    
            /* close data space */
            H5Sclose (dspace);
    
            /* close file */
            H5Fclose (fd);
    
            /* close mpi */
            MPI_Finalize ();
    
            return 0;
    } /* main */
    
  4. You can also use the following Makefile.
    CFLAGS=-Wall -Werror
    RM=rm -rf
    MCC=mpicc
    MLIBS=-lhdf5 -lmpi
    
    parallel:       parallel.o
            $(MCC) $(CFLAGS) -o parallel parallel.o $(MLIBS)
    
    clean:
            $(RM) parallel *.o *.h5
    
  5. Put both files in the same directory and type ‘make’. Then run the program using ‘mpirun -np 2 ./parallel’. You can replace 2 with any power of 2.

The example code above does not really do much. It demonstrated the creation of a file in parallel and allowing the different processes to write into the file. Notice that all processes have access to the same file. This is done in a safe manner to avoid all sorts of parallel I/O messiness. My next posting will be a bit more useful and will use the concept of a hyperslab to allow really Parallel I/O on a single HDF5 dataset.

Parallel Computing: Checking Out Eclipse Parallel Tools Platform

June 25th, 2007

As promised in my last blog, I have decided to check out Eclipse Parallel Tools Platform (PTP). This particular plug-in looks interesting as it aims to development a complete industry-strength platform for the development high performance computing applications.

The aim of the parallel tools platform project is to produce an open-source industry-strength platform that provides a highly integrated environment specifically designed for parallel application development. The project will provide a standard, portable parallel IDE that supports a wide range of parallel architectures and runtime systems, a scalable parallel debugger, support for the integration of a wide range of parallel tools and an environment that simplifies the end-user interaction with parallel systems.

Before we proceed, please make sure you have a copy of Eclipse CDT and OpenMPI installed. If not please check out my previous blog about the topic.

Note: PTP requires the ORTE and OMPI header files that are not standard in the Fedora Core 6 version of the openmpi RPMs. Noted below is how to get and build the RPMs from the official OpenMPI distribution.

  1. Download SRPM from official OpenMPI website.
  2. Install and build necessary RPMs. Notice the additional command line option in the rpmbuild command to ensure that the necessary headers are build. This is never standard. Building from source takes sometime. So maybe at this point, you can take a break. OR if you are using Fedora Core 6 then you can download my built RPM here.

    rpm -Uvh openmpi-1.2.3-1.src.rpm
    rpmbuild -bb /usr/src/redhat/SPECS/openmpi-1.2.3.spec --define 'configure_options --with-devel-headers'

  3. Remove all old Fedora RPMs

    rpm -e openmpi openmpi-devel openmpi-libs

  4. Install new OpenMPI RPMs

    rpm -Uvh openmpi-1.2.3-1.i386.rpm

  5. That was not so hard was it?

Then you have to have xmlto, gdb and a Java 1.5 runtime installed. Another note is you will have to use the official Java Java and not gcj. gcj does not work with PTP. If you have this then we are ready to start.

  1. First step will be to download the PTP core plug-in and the Parallel Language Development Tools plug-ins from the Eclipse website. Unfortunately, there is no update manager link yet. This is still bleeding edge stuff you know and as you will see later … there is special stuff to do.
  2. Unpack installers into the Eclipse directory.

    cd eclipse/..
    tar xvzf org.eclipse.ptp-1.1.0.tar.gz
    tar xvzf org.eclipse.ptp.pldt-1.1.0.tar.gz

  3. Then, we will have to build the files the plug-ins. Of course, you have to take note of the CPU architecture and operating system you will be running this tool on. Obviously, I will be using a Linux system on an x86 processor. If there are errors during the compile then something went wrong. Usually, the problems are because of the missing OpenMPI headers and libraries. So, please make sure that they are available.

    cd eclipse/plugins/org.eclipse.ptp.linux.x86/
    sh ./BUILD

  4. Start eclipse and force detection of new plug-ins. (eclipse --clean)
  5. Select the Other then the ‘PTP Runtime perspective’. If you do not see a PTP Runtime or PTP Debug perspectives please go to the Eclipse Software Manager (Help -> Software Updates -> Manage Configuration). Select the ‘Show Disabled Features’ button. Look for ‘Eclipse Parallel Tools Platform’ and ensure that is it enabled. If it is disable just enable it.
  6. Add OpenMPI include files. Go to Preferences -> PTP -> Parallel Language -> MPI then add /usr/include into the path. Do the same for OpenMP.

Now we are done with installation part. We can now proceed to trying it out. Here are some of the things you can check out with this new tool.

  1. Creating a New MPI Project. This is now nicely integrated into Eclipse. Just create a normal ‘New Managed C Project’. You will fill out the details as usual but in the end you will see a screen called ‘MPI Project Settings’. The defaults are typically ok. Just enable the ‘add MPI Project settings to this project’ radio button.
  2. Artifact Analysis. This is part of the PLDT component of PTP. Just select the folder or source file you want to analyze and click on the ‘Run OpenMP Analysis’ or ‘Run MPI Analysis’ buttons. Then a tab will open views (OpenMP Artifact View and MPI Artifact View) showing the artifacts found. You can now also hover on these artifacts to get more details about them.
  3. Content Completion. Like any other CDT or Java application, you can use Eclipse’s content completion features by pressing ctrl-space.
  4. Running Parallel Applications. You can do this by creating a new parallel launcher. This can be done by going to Run->Run->Parallel Application and creating a new launcher. The default name is normally acceptable. Just pick the necessary binary. Go to the Parallel Tab to select the machines you are going to run this job on and the number of processes you want to spawn. For demonstration purposes, pick a good number … like 4. Under debug, select SDM as the debugger. The rest of the tabs work the same way as a usual CDT application. Then just click on ‘Run’. You maybe be asking … ‘Where did my output go?’. Don’t panic, go to the left navigation panel and select Jobs. You will then see your number number and the associated processes. Just double-click on a process and you will see the standard output display of that process.

Well, PTP definitely makes it more convenient to run and debug MPI applications in Eclipse versus the method in my previous blog. Hope this helps. Good luck and have fun!

Parallel Computing: Eclipse and OpenMPI

June 23rd, 2007

Well, the first semester of SY 2007-2008 is nicely on its way. As usual, I will be getting teaching load this year. This particular semester I am once again teaching AMC 153: Introduction to Distributed and Parallel Computing. Due to advances in computing technology and the state of commodity parallel computing software, I have decided to re-format the course to teach students how to not just “use a commodity computing cluster” but to “build a commodity computing cluster“. The tools are getting much easier now.

So the first in this series in how to install, configure and use OpenMPI.

MPI stands for the Message Passing Interface. Written by the MPI Forum (a large committee comprising of a cross-section between industry and research representatives), MPI is a standardized API typically used for parallel and/or distributed computing. The MPI standard is comprised of 2 documents: MPI-1 (published in 1994) and MPI-2 (published in 1996). MPI-2 is, for the most part, additions and extensions to the original MPI-1 specification.

Open MPI is an open source, freely available implementation of both the MPI-1 and MPI-2 documents. The Open MPI software achieves high performance; the Open MPI project is quite receptive to community input.

Let’s get started. First, install Eclipse the usual way. Since, I am a big fan of doing things the “RedHat-way” here are the steps.


yum install eclipse eclipse-cdt

See. That was not very hard. Then let us install OpenMPI.


yum install openmpi openmpi-devel openmpi-libs

Huh? That is it? Now, it is time to try out our newly installed Eclipse-CDT with OpenMPI.


eclipse

Here are the steps to create a new project that would use OpenMPI inside Eclipse-CDT.

  1. Create a new project. File->New->Project. Select ‘Managed Make C Project’. Name the project and choose default for everything else. We are using a managed make configuration so we don’t have to worry about writing our own Makefiles.
  2. Right click on the Project Name in the Left (Project) Panel and change ‘Active Build Configuration’ to ‘Release’. This forces us to use the release properties as our default. The ‘Debug’ setting likes to run the debugger if you want that. But, it best you use PTP described below.
  3. Right click on the Project Name again and select ‘New’ and create a new file called ‘nodes.txt’. This file will contain the OpenMPI machine file. Here you define the nodes in your cluster. In this particular case, just put ‘localhost’.
  4. Right click on the Project Name again and select ‘Properties’. Select ‘C/C++ Build’ then select ‘GCC C Linker’. Change command to ‘mpicc’ from ‘gcc’. Do the same for ‘GCC C Compiler’. After that, select ‘Warnings’ and select ‘-Wall’ and ‘-Werror’. Next select ‘Optimization’ and select ‘None’.
  5. Go to Run->External Tools->External Tools. We cannot run this project like ordinary C/C++ projects in Eclipse because we have to run MPI programs with the mpirun wrapper. So now select ‘Program’ then add a new configuration. Name the configuration ‘AMC153-mpirun’. Select the ‘Working Directory’ by clicking on ‘Browse Workspace’ and selecting the root directory of the current project which I called AMC153. Finally, add ‘-np 4 -machinefile nodes.txt ${project_loc}/Release/${project_name}’ in the arguments line. 4 is the number of processes to spawn (set appropriately). nodes.txt is our newly created machine file above. The last argument is the directory of the executable. This formally is generally correct.
  6. Right click on the Project Name again and select ‘New’ then select ‘Source Folder’ and name it ’src’.
  7. Right click on the ’src’ and select ‘New’ source or header file and start coding!
  8. To run the project. Just select ‘Run’ then ‘External Tools’ then ‘AMC153-mpirun’.

You might want to try the following program.


#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>

int main ( int argc, char *argv[] )
{
  int rank, size;

  MPI_Init ( &argc, &argv );
  MPI_Comm_rank ( MPI_COMM_WORLD, &rank );
  MPI_Comm_size ( MPI_COMM_WORLD, &size );

  printf( "Hello, world! I am %d of %d\n", rank, size );

  MPI_Finalize ();
  return 0;
}

Another option is to use the Parallel Tools Platform (PTP) that comes as an Eclipse plug-in. These tools also use OpenMPI as the engine. I have not gotten to that yet because I am pretty pleased with plain Eclipse and OpenMPI. Maybe we can explore this next?

Taxing Bloggers?

June 21st, 2007

I just deposited a Text Links AD (TLA) check today to my US dollar account. I normally deposit checks for various reasons and until today I have not been asked for any additional information except for my account number. Today was different. I handed over the check to the friend bank teller, as usual. She then politely asked me for my TIN number and the source of the funds. Is anybody else experiencing this change in behavior? This is definitely new to me.

The bank is now asking me for the source of the funds for a check way under the Anti-Money Laundering Act (AMLA)-defined limit. It would be strange if the small amount I deposited money laundering. The money launder must be using thousands of people like me to be able push significant amounts. So what other reason would they want the information for?

The only other reason I can think of … is … that they are silently collecting the information in advanced already. Then at some point in the future, BIR can ask for the data and then start hunting mega-bloggers! Maybe. Maybe.

DLSU 2007 Graduation Response: Heroes not Martyrs

June 16th, 2007

I just attended the De La Salle University (DLSU) Batch 2006-2007 Third and Summer Term Graduation Ceremony this morning (June 16 2007 at 9:00am) at the Philippine International Convention Center (PICC). Here is the graduation response of this year’s class … ummm, DLSU does not have valedictorians … speaker?

To our Chairman of the Board of Trustees, Mr. Joaquin Quintos IV, our University President, Br. Armin Luistro, our Chancellor, Dr. Carmelita Quebengco, our beloved Lasallian Brothers, college deans and administrators, faculty and staff, dear parents and friends, my fellow graduates, good morning.

Graduating—doesn’t it always feel like a victory? With make-believe diplomas on hand like scepters, we march, poised and resolute, clad in togas of unbroken black. Under the gleam of light and gaze of others’ eyes, we hold our heads up high as we go, images of confidence and certainty. Ecstatic, our imaginations race over the boundless horizon before us.

‘Shall I proceed to law, medicine or business?’, we ask ourselves; ‘Or, shall I devote myself to research and teaching? Pursue graduate studies, a Master’s perhaps or a ladderized Ph.D.? Or maybe begin working? Will I work for-profit or not-for-profit? Shall I start my own firm or join someone else’s? Will it be a local organization or a multi-national?’ So many thoughts, so many options, so many possibilities.

But this hopeful dreaminess does not last. It doesn’t take long before we realize that we’re about to make our debut into the fabled ‘real world’, an unforgiving wasteland where choices are oppressively limited, where no-strings-attached is an age-old joke, and where heroism waives due process and is immediately punishable by death. We’re crossing over and can no longer turn back.

Yet this realization comes not in an all-encompassing instant. Like droplets of water that bang by the force and consistency of gravity on foreheads, bare and unadulterated, the rape of youthful idealism is slow.

And, it begins with a seemingly elevating benediction by those who’ve come before us—as they say, ‘You, the youth, are our nation’s hope for a brighter future’.

With every inspirational talk and graduation response delivered across the 7,107 islands of this youth-predominated country indebted to this snippet of unacknowledged brilliance, surely, we cannot help but wonder how long it’s been since this saying’s become so ubiquitous and indubitable. Perhaps, during the time of our parents, these selfsame words were used to (and I quote) ‘inspire’ them during their grade school, high school, and college graduations. Perhaps, during the time of their parents, our grandparents, this too was true. Moving further and further back in time, do we not correctly remember even our national hero, Jose Rizal, making a declaration of similar import, albeit somewhat less directly, in his letter to the women of Malolos?

Sadly, repetition does not produce results.

‘You, the youth, are our nation’s hope for a brighter future’—does it not sound oddly like the waving of a white flag under such ornamented circumstances, so as to disguise the fact of delegation if not capitulation?

‘You, the youth, are our nation’s hope for a brighter future’—does this challenge not loom before us on a towering pedestal, a worthy yet just about unreachable goal, a Herculean task commanded of a youth bewildered by a duplicity between what is demanded and what is proffered, what is expected and what is done?

‘You, the youth, are our nation’s hope for a brighter future’—does it not beckon like a call to martyrdom, the blasting of a horn before a charge to an inevitable and outwardly (only outwardly) heroic death?

Sadly, repetition does not produce results.

Repetition produces goals but no means, an end but no paths, a peak but neither ladder nor rope. The goal of nation-building is a worthy goal indeed, but can we rightfully expect the mass of Filipino youth to take up the challenge when the only means to its accomplishment lie in martyrdom—the sacrifice of all things valuable, the relinquishment of all bonds of friendship and family, love, loyalty and fidelity, the death in our hearts and in our minds of the natural human inclination toward the ‘good life’?

Happiness is every living being’s most righteous desire. We all stand rightfully unashamed in our hopes for a good home, a loving family, quality education for our children, ample (and hopefully palatable) food to eat, a steady supply of running water, energy, disposable income for a rainy day, and so on. Happiness is no evil aspiration. It is, in fact, at the root of our every act of kindness, at the root of compassion, and of every great deed of heroism. It is what drives us to build a better country for ourselves and for those that we love. Happiness is every Filipino’s most righteous desire.

Yet, happiness is now but distant reality. Today, those willing heroes become martyrs. Those determined to uplift the state of the Philippines must die, often in ways more horrifying than mere bodily death. For centuries, we’ve witnessed the ritual murder of youthful hopefulness, the murder of hope within those who are our only hope. For centuries, the young were made to choose advancement over honor, power over character, money over wisdom and spiritual wealth; they were made to believe that goodness is alien to happiness, that richness could only be gained at the expense of a life of responsibility and moral integrity. We’ve been made fools of, believing that the only way to righteousness is total self-sacrifice. And, believing this was true, we’ve unwittingly made it so, to our own detriment, and to our own demise.

Our vision, as the new generation of Filipinos, drawing from the strength and guidance of those who’ve come before us—the administrators who are the brick and mortar of this university, the faculty who have so often endured our ignorance, cradling even the tinniest spark of brilliance within us with such undeniable joy, the staff who though silent and, at times, near invisible, make our academic lives so seamless, so perfect, and our parents who, God knows, could have poured much less financial, emotional, and physical investments into many other things at much greater return but didn’t—(our vision with their strength and guidance) is to create for ourselves a new Philippines, a Philippines where good deeds are rewarded, where gallantry is praised and heroes lifted up. We will build for ourselves a new world where love for country and love for family are no longer disjoined, a world where living the ‘good life’ becomes a possibility for every Filipino, and nationalism, a choice free to all, made by all.

As the new generation of Filipinos, we will build institutions that will usurp those of the decadent past. We will make of social work the profession of every citizen—entrepreneur, industrialist, engineer, scientist, educator, all. Social justice shall become the cause of every man and woman, and social development her only goal. And they will be rewarded. They will be praised. They will be prosperous, empowered and, most of all, happy. They will live like sovereigns among sovereigns in a land of the sovereign free, a land that will be of our making.

And, when, in a scant few decades, we find that our time is done, we will in turn call upon the youth of our sunset years, and with those selfsame words we shall bring forth to them a new message of inspiration. As we say, ‘You, the youth, are our nation’s hope for a brighter future,’ we will exhort them to become our nation’s heroes, not its martyrs.

Wainwright Gregory S. Yu
Manila, Philippines
June 16 2007

This term’s graduation speaker is Wainwright Gregory S. Yu (yes, we are related), Summa Cum Laude, Br. Gabriel Connon Awardee, Student Leadership Awardee, Carlos J. Valdez Gold Medal for Excellence in Accountancy Awardee, Outstanding Undergraduate Thesis in Philosophy and Member of the De La Salle University Jose Rizal Honors Society. Congratulations Wainwright and Good Luck!