Quantcast
Channel: Clusters and HPC Technology
Viewing all articles
Browse latest Browse all 927

mpi calling external mpi program failed

$
0
0

I tried to use MPI to parallel running external command line program.

 

So I write `run.f90`

 

    program run
          use mpi
          implicit none
          integer::num_process,rank,ierr;

          call MPI_Init(ierr);

          call MPI_Comm_rank(MPI_COMM_WORLD, rank,ierr);
          call MPI_Comm_size(MPI_COMM_WORLD, num_process,ierr);

          call execute_command_line('./a.out')

          call MPI_Finalize(ierr);

    end program 

 

 

I compile it using intel compiler like

 

   

 mpiifort run.f90 -o run.out

 

Now if `./a.out` is normal non-MPI program like

 

    

program test
    implicit none
    print*,'hello'
    end

then 

 

    mpiexec.hydra -n 4 ./run.out

 

works fine.

 

However, if `./a.out` is also a MPI program like

 

    program mpi_test
              use mpi
              implicit none
              integer::num_process,rank,ierr;

              call MPI_Init(ierr);

              call MPI_Comm_rank(MPI_COMM_WORLD, rank,ierr);
              call MPI_Comm_size(MPI_COMM_WORLD, num_process,ierr);

              print*,rank

              call MPI_Finalize(ierr);

        end program 

Then, I got error after running "mpiexec.hydra -n 4 ./run.out"

===================================================================================

=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES

=   PID 19519 RUNNING AT i02n18

=   EXIT CODE: 13

=   CLEANING UP REMAINING PROCESSES

=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES

===================================================================================

 

===================================================================================

=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES

=   PID 19522 RUNNING AT i02n18

=   EXIT CODE: 13

=   CLEANING UP REMAINING PROCESSES

=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES

===================================================================================

   Intel(R) MPI Library troubleshooting guide:

      https://software.intel.com/node/561764

What is wrong?


Viewing all articles
Browse latest Browse all 927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>