Using C on PelicanHPC

6 messages Options
Embed this post
Permalink
phoenixlament

Using C on PelicanHPC

Reply Threaded More More options
Print post
Permalink
Hi all, I recently installed Pelican 1.9.1 on a cluster of a pentium 4 head node and a celeron 650MHz client node. Installation went smoothly. Benchmarking using orterun ran successfully. KSysguard and htop both showed that both nodes had CPU usage at 100% while the benchmarking.

Now I would like to run some C code that uses both computers. How do I go about doing this?


Thanks!
Michael Creel

Re: Using C on PelicanHPC

Reply Threaded More More options
Print post
Permalink
Are you asking for some example code to use, or are you asking how to use some code you already have?
phoenixlament

Re: Using C on PelicanHPC

Reply Threaded More More options
Print post
Permalink
In reply to this post by phoenixlament
Apologies for my ambiguity.

Here's an update:

I successfully compiled the following hello.c on /media/disk using "mpicc hello.c -o hello"
==============================
#include <stdio.h>
#include "mpi.h"
int main(int argc, char **argv)
{
  MPI_Init(&argc, &argv);
  printf("Hello world\n");
  MPI_Finalize();
  return 0;
}
=============================

When I try to run "mpirunĀ CĀ hello" or "mpirun N hello" or "mpirun -np 4 hello", I get the following error:
"mpirun: cannot start hello on n0: No such file or directory"

Does anyone know how to fix this error? Do I have to set the default directory to something other than n0 somehow?


Thanks.
Michael Creel

Re: Using C on PelicanHPC

Reply Threaded More More options
Print post
Permalink
I would guess that you are not in /media/disk when you call mpirun. Try "ls", and make sure you see  the executable "hello".  If not, cd to /media/disk

Better yet, you probably want to put the executable in a place accessible to all nodes of the cluster. Please try this:

1. copy the source code from /media/disk to /home/user
2. cd to /home/user
3. compile and run from /home/user

Any luck?
phoenixlament

Re: Using C on PelicanHPC

Reply Threaded More More options
Print post
Permalink
Thanks for the quick response. I was unfortunately sick/studying for most of the week and was unable to try out your solution right away.

I was actually in the /media/disk directory when trying to execute "hello". That gave the error that was described previously. As you suggested, I moved the source code to /home/user, and this time "hello" executed successfully with a "Hello World" output.


I'm not sure if anyone has done this before on Pelican.. but I'm building this cluster to process optical simulations for a professor of mine. The optical simulations, based on a C source, generate a frame-by-frame throughput of light on a nano-scale basis. Each frame consists of a bmp file(14MB each) and usually the simulation is run until gigabytes of data are outputted. From what I read online, Pelican seems to be able to do such a task but I'm just not sure how to modify the C source code to do so..

Could you please offer some general guidance on how to split the bitmap generation task to all the nodes in a cluster? I can give you the source code (totalling 62KB) if you are interested.

Thanks alot Michael.
Michael Creel

Re: Using C on PelicanHPC

Reply Threaded More More options
Print post
Permalink
OK, the problem with running this from /media/disk is that the executable is available only to the frontend, but not the compute nodes. Doing it from /home/user solves the problem, because that directory is NFS exported.

For your work, I don't see any reason why PelicanHPC shouldn't work well. You will definitely want to mount external storage (during the initial boot up, replace "ram1" with something like "sda1", where that is the device name of a partition formatted as ext2 or ext3. For speeding up the work, I have a couple of ideas. If it is possible to generate all the information needed to plot a frame ahead of time, do that, and then plot complete frames on nodes. If you absolutely need to have the .bmp file (and not just the input parameters) before the information needed to plot the next frame can be computed, then slice the frames into blocks, and compute blocks on nodes. This might be complicated if the pixels on either size of a slice are not independent. That's the reason I would try to do the first approach.

Plotting and video rendering is pretty widespread, but I don't know much about it. You might try searching for some topic-specific mail lists to get advice.

Cheers, M.