Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I was a scientific computing consultant for 4 years at LSU and LONI a while back. Systems included Linux clusters (PBS/Torque) and IBM Power systems (LoadLeveler). We not only participated in research and helped users port and optimize their codes on various systems, but we also maintained (and evaluated potential) systems.

First, I would say that there is no Perl module that allows one to manage jobs across nodes in the cluster as a set of cooperating sequential processes; not the way you're thinking anyway.

Let's take a step back and remove Perl from this equation. There are basically 2 different approaches to parallelizing your codes. First, there is pure message passing though libraries that meet the Message Passing Interface (MPI) specification. This library provides for a standard programming interface and execution environment for some number of communicating sequential processes (both logical processes and literal Unix processes). MPI provides data type primitives, means of communications, and synchronization constructs to orchestrate the computation you're coordinating among the CSPs. This is inter-node communication.

You also have OpenMP (for example) for a well standardized shared memory programming (SMP) interface. This is used to write tightly coupled, threaded code on a single "CCNUMA" node. This is intra-node communication. Most C/C++ and Fortran compilers supported OpenMP. For more information on it, I have an OpenMP tutorial I created a few years ago.

Still keeping Perl out of this, what you want to do sounds like the third option - i.e., the "hybrid" approach. What you need to do here is basically have an SMP (threaded single process) program running on each node using something like OpenMP to thread the program; each of these processes communicate across the nodes using some sort of message passing, like MPI. Hybrid MPI/OpenMP programs are a fairly common target for playing and testing, but I know of only a few that actually take advantage of this rich and interesting approach.

To bring Perl back into it here, there is nothing that is going to give you this hybrid approach for free. You will need a Perl based way of passing messages among the nodes. On each node, you will need a way to manages the "threads" that are running. I would strongly recommend that in an HPC environment you look at MPI & OpenMP, even if it is to get familiar conceptually with what it takes to create a hybrid application. You should also look at the MPI interfaces and threading interfaces PDL provides. There has been a lot of work to offer access to parallelization technologies through PDL; but frankly nothing is going to be as good (or interesting) as use C/C++ or Fortran + MPI&OpenMP.

I contributed to a lot of the documentation at LSU and LONI regarding OpenMP and writing hybrid codes, for example here one would run a hybrid job on one of the Linux clusters. There is also information on that site, along with many other sites (some better than others) on writing your first hybrid code.

Like I said, it's a rich and interesting world. I highly encourage you to look at this and understand the paradigms. Once you do, it'd be fairly straightforward to translate the concepts using any number of intra-node communication and inter-node threading technologies.

I used a lot of Perl for managing the systems and running codes - some mine, some others. I also translated a computational molecular dynamics code one friend of mine had written into a Perl version, just for fun. If you have any questions regarding Perl and HPC just post them here and I'll reply if I can help. If you have strictly HPC related questions, you can PM me.

Other Perl and HPC resources include the PDL list/resources and the Quantified Onion list. There is an HPC BoF at YAPC this week that I plan on attending, so I know that while the HPC community in Perl is small, it is very much alive.


In reply to Re: HPC Computing Question by perlfan
in thread HPC Computing Question by doubleqq

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-04-18 17:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found