PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Building MVAPICH2 with PGI 2010
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation
View previous topic :: View next topic  
Author Message
TheMatt



Joined: 06 Jul 2009
Posts: 304
Location: Greenbelt, MD

PostPosted: Thu Jul 22, 2010 8:20 am    Post subject: Building MVAPICH2 with PGI 2010 Reply with quote

(This might not be the right forum for this, but it seemed best to me. If not, please move.)

I was wondering if anyone at PGI or in the Forum Community had a "best" build strategy for MVAPICH2 1.5 with PGI 2010, a la Open MPI, say:

http://www.pgroup.com/resources/openmpi/openmpi141_pgi2010.htm

I'm just building for one node, so I'm looking mainly at just the MPI bit of MVAPICH2 without the need for all the Infiniband/OFED/etc. I know it's odd to use MVAPICH2 on a single node, but it's what's used in large clusters here, so I thought I'd be nice to troubleshoot building my code with a PGI+MVAPICH2 environment in a more controlled area (and I assume the OFED is done correctly on the larger clusters maintained by specialists).

I'm also looking for optimizations that have worked. Is -fast viable, or do you need to dial down?
Back to top
View user's profile
hongyon



Joined: 19 Jul 2004
Posts: 551

PostPosted: Thu Jul 22, 2010 1:37 pm    Post subject: Reply with quote

Hi,

I would look at:

http://www.pgroup.com/resources/mpich/mpich2_121_pgi2010.htm

Example configuration for mvapich2 would be:

env CC=pgcc FC=pgfortran F77=pgfortran CXX=pgcpp CFLAGS=-fast FCFLAGS=-fast FFLAGS=-fast \
CXXFLAGS=-fast ./configure --with-device=ch3:sock --prefix=/usr/local/mpich2 >& configure.log


Good luck.
Hongyon
Back to top
View user's profile
TheMatt



Joined: 06 Jul 2009
Posts: 304
Location: Greenbelt, MD

PostPosted: Mon Jul 26, 2010 6:31 am    Post subject: Reply with quote

hongyon,

This seems to be a working configure line, and it seems to make correctly as well. Thanks.

However, when I try and run even a hello world example (hellow.c) using mpirun_rsh, it crashes. It *does* run if you do mpdboot and mpiexec, which I'm guessing means mpich2 built correctly, but I can't seem to get mpirun_rsh to do anything but crash, and I'd like to use mpirun_rsh if possible.

Have you encountered this with MVAPICH2?

Matt
Back to top
View user's profile
hongyon



Joined: 19 Jul 2004
Posts: 551

PostPosted: Mon Jul 26, 2010 12:37 pm    Post subject: Reply with quote

mpirun_rsh requires -hostfile host_file_name

You will need to put the name of current node in file host_file_name.

Try this:

%hostname
myhost

From example above, put myhost in host_file_name file.

Also test it if ssh/rsh works correctly with following command.
% ssh myhost

OR/AND

%rsh myhost

If that rsh/ssh command does not work, then you will need some IT person to help you.

Then you can test just a simple script to see if mpirun_rsh works.
% cat >testme.sh
echo "Hello"
^C
%chmod +x testme.sh

%mpirun_rsh -np 2 -hostfile host_file_name ./testme.sh
hello
hello

If that works, then check your hello program.

If not, what is the OS you built your mpich on, which version of PGI, 32-bit or 64-bit? What exactly is in your hello program?

Are you trying to run on more than 1 node or trying to run on the OS that you didn't built on? You should make sure that it runs on the system you built on.

Hongyon
Back to top
View user's profile
TheMatt



Joined: 06 Jul 2009
Posts: 304
Location: Greenbelt, MD

PostPosted: Tue Jul 27, 2010 7:17 am    Post subject: Reply with quote

Following you:
Code:
> ~/mvapich2/bin/mpirun_rsh -np 2 -hostfile host_file_name ./testme.sh
Hello
Hello

So, that's good. Now then, let's try the MVAPICH2 hellow.c file:
Code:
> cat hellow.c
#include <stdio.h>
#include "mpi.h"

int main( int argc, char *argv[] )
{
    int rank;
    int size;
   
    MPI_Init( 0, 0 );
    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
    MPI_Comm_size(MPI_COMM_WORLD, &size);
    printf( "Hello world from process %d of %d\n", rank, size );
    MPI_Finalize();
    return 0;
}

Simple enough program. Now I try to run it:
Code:
> ~/mvapich2/bin/mpicc -o hellow hellow.c
> ~/mvapich2/bin/mpirun_rsh -np 2 -hostfile host_file_name ./hellow
Fatal error in MPI_Init: Invalid buffer pointer, error stack:
MPIR_Init_thread(411): Initialization failed
(unknown)(): Invalid buffer pointer
Fatal error in MPI_Init: Invalid buffer pointer, error stack:
MPIR_Init_thread(411): Initialization failed
(unknown)(): Invalid buffer pointer
MPI process (rank: 1) terminated unexpectedly on hostname
Exit code -5 signaled from hostname
where 'hostname' is the actual hostname of the computer that I've munged for safety's sake.

And yet:
Code:
> ~/mvapich2/bin/mpdboot
> ~/mvapich2/bin/mpirun -np 2 ./hellow
Hello world from process 0 of 2
Hello world from process 1 of 2
> ~/mvapich2/bin/mpdallexit
This seems to indicate that MPICH2 built correctly inside MVAPICH2 (and I've tested both ch3:sock and ch3:nemesis). But, for some reason, it just doesn't run mpirun_rsh. (Note: there are no build errors that I can detect in the make log.)
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation All times are GMT - 7 Hours
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group