When -x10rt mpi is specified, X10 uses 'mpicxx' as the post compiler. So to run the resulting executable, whatever is in LD_LIBRARY_PATH must be consistent with the libraries linked by mpicxx.

You could specify a particular version of MPI to use as the post compiler i.e.

$ x10c++ ... -post '/path/to/openmpi/bin/mpicxx # # -I/path/to/openmpi/include/openmpi/ompi # -L/path/to/openmpi/lib ...'

(see http://x10-lang.org/documentation/practical-x10-programming/native-code-integration.html) ... but this is probably overcomplicating it. Just make sure that your environment is set up so that 'mpicxx' is the version you want.

Can you compile and run a simple MPI program using the same environment (including LD_LIBRARY_PATH) as you are using for X10?

Cheers,

Josh

On 19/02/13 09:04, Sparsh Mittal wrote:
Thanks a lot. On my cluster, there are two mpi installations. The default is old and what I installed is newer.

On compiling I get an error:

x10c++  -x10rt mpi MontePiCluster.x10  -o  montepiobj -O
x10c++: /usr/bin/ld: warning: libmpi_cxx.so.1, needed by ~/X10Source/x10.dist/lib/*libx10rt_mpi.so, not found* (try using -rpath or -rpath-link) /usr/bin/ld: warning: libmpi.so.1, needed by ~/X10Source/x10.dist/lib/libx10rt_mpi.so, not found (try using -rpath or -rpath-link) ~/X10Source/x10.dist/lib/libx10rt_mpi.so: undefined reference to `MPI_Op_commutative' ~/X10Source/x10.dist/lib/libx10rt_mpi.so: undefined reference to `MPI_Reduce_local'
     collect2: ld returned 1 exit status
x10c++: Non-zero return code: 1

So I provided the path of newer installation using LD_LIBRARY_PATH. It compiles but gives warning:

x10c++: /usr/bin/ld: warning: libmpi_cxx.so.1, needed by ~/X10Source/x10.dist/lib/libx10rt_mpi.so, may conflict with libmpi_cxx.so.0 /usr/bin/ld: warning: libmpi.so.1, needed by ~/X10Source/x10.dist/lib/libx10rt_mpi.so, may conflict with libmpi.so.0

Moreover, on running it crashes!

My question is: can we specify the location of MPI from which X10 should connect, at the time we compile X10? I tried to see but could not ascertain. I had compiled X10 as:

cd x10.dist && ant dist -DX10RT_MPI=true

Please let me know. Thanks a lot for your help.
Thanks and Regards
Sparsh Mittal



On Mon, Feb 18, 2013 at 2:27 PM, Josh Milthorpe <josh.miltho...@anu.edu.au <mailto:josh.miltho...@anu.edu.au>> wrote:

    Hi Sparsh,

    to use MPI you must compile using the MPI version of X10RT.

    $ /x10c++ //-x10rt mpi MontePiCluster.x10  -o  montepiobj -O/

    
http://x10-lang.org/documentation/practical-x10-programming/x10rt-implementations.html

    Cheers,

    Josh


    On 19/02/13 04:22, Sparsh Mittal wrote:
    Hello

    I am trying to run
    http://x10-lang.org/documentation/code-examples/small-examples.html?id=103
    example with MPI, as follows:

    /export X10_NPLACES=2
    x10c++ //MontePiCluster.x10 -o  montepiobj -O
    mpirun -np 4 ./montepiobj 1000 2 4
    /
    Here ./montepiobj 1000 2 4 tells to run with 1000 guesses, at 2
    places with 4 threads.

    In the MontePiCluster.x10 file, I have just added one statement:

    /Console.OUT.println(" I am running at "+ places + " places  ");/

    So, the output comes:

    /I am running at 2 places
     I am running at 2 places
    The value of pi is 3.112
     I am running at 2 places
    The value of pi is 3.112
    The value of pi is 3.112
     I am running at 2 places
    The value of pi is 3.112/


    So, my expectation was that with /-np *4,*/
    and/**/X10/*_*/NPLACES=2/*, */it will make it 4*2 = 8 places; but
    what is happening right now is that same m1 is being run at 4 mpi
    processors. How can we use the mpi processor so that value of pi
    is calculated at 8 places (only then using MPI is of any use )
    and not at 2 places, repeated at 4 processors.

    I will be thankful for your answers.

    Thanks and Regards
    Sparsh Mittal



    
------------------------------------------------------------------------------
    The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
    is your hub for all things parallel software development, from weekly 
thought
    leadership blogs to news, videos, case studies, tutorials, tech docs,
    whitepapers, evaluation guides, and opinion stories. Check out the most
    recent posts - join the conversation now.http://goparallel.sourceforge.net/


    _______________________________________________
    X10-users mailing list
    X10-users@lists.sourceforge.net  <mailto:X10-users@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/x10-users


    
------------------------------------------------------------------------------
    The Go Parallel Website, sponsored by Intel - in partnership with
    Geeknet,
    is your hub for all things parallel software development, from
    weekly thought
    leadership blogs to news, videos, case studies, tutorials, tech docs,
    whitepapers, evaluation guides, and opinion stories. Check out the
    most
    recent posts - join the conversation now.
    http://goparallel.sourceforge.net/
    _______________________________________________
    X10-users mailing list
    X10-users@lists.sourceforge.net
    <mailto:X10-users@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/x10-users




------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/


_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to