#!/usr/bin/perl
use warnings;
use strict;
use Parallel::MPI::Simple qw(:all);
MPI_Init() or die("Error: $!\n");
MPI_Finalize();
####
> perl -c init.pl
Can't load '/usr/local/lib/perl/5.10.0/auto/Parallel/MPI/Simple/Simple.so' for module Parallel::MPI::Simple: /usr/local/lib/perl/5.10.0/auto/Parallel/MPI/Simple/Simple.so: undefined symbol: ompi_mpi_char at /usr/lib/perl/5.10/DynaLoader.pm line 196.
####
> ldd usr/local/lib/perl/5.10.0/auto/Parallel/MPI/Simple/Simple.so
linux-gate.so.1 => (0xb8058000)
libmpich-p4mpd.so.1.0 => /usr/lib/libmpich-p4mpd.so.1.0 (0xb7e53000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7ccd000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7cb3000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7caa000)
libgfortran.so.3 => /usr/lib/libgfortran.so.3 (0xb7bf6000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7bd0000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7bc1000)
/lib/ld-linux.so.2 (0xb8059000)
####
> strings /usr/local/lib/perl/5.10.0/auto/Parallel/MPI/Simple/Simple.so | grep mpi
ompi_mpi_comm_world
ompi_mpi_comm_null
ompi_mpi_int
ompi_mpi_char
libmpich-p4mpd.so.1.0
####
#!/usr/bin/perl
use warnings;
use strict;
use Parallel::MPI qw(:all);
MPI_Init() or die("Error: $!\n");
MPI_Finalize();
####
> perl -c init.pl
init.pl syntax OK
####
> mpirun -np 2 perl init.pl
MPI_Init: no arguments found in the argv at init.pl line 7.
MPI_Init: no arguments found in the argv at init.pl line 7.
####
> mpirun -np 2 perl init.pl asdada
Fatal error in MPI_Errhandler_set: Invalid communicator, error stack:
MPI_Errhandler_set(121): MPI_Errhandler_set(comm=0x5b, errh=0x78) failed
MPI_Errhandler_set(72).: Invalid communicator[unset]: aborting job:
Fatal error in MPI_Errhandler_set: Invalid communicator, error stack:
MPI_Errhandler_set(121): MPI_Errhandler_set(comm=0x5b, errh=0x78) failed
MPI_Errhandler_set(72).: Invalid communicator
Fatal error in MPI_Errhandler_set: Invalid communicator, error stack:
MPI_Errhandler_set(121): MPI_Errhandler_set(comm=0x5b, errh=0x78) failed
MPI_Errhandler_set(72).: Invalid communicator[unset]: aborting job:
Fatal error in MPI_Errhandler_set: Invalid communicator, error stack:
MPI_Errhandler_set(121): MPI_Errhandler_set(comm=0x5b, errh=0x78) failed
MPI_Errhandler_set(72).: Invalid communicator