Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
2159 Discussions

Malfunctioning of some MPI subroutines with Ifort Compiler for Windows

Ines_F_
Beginner
299 Views

Hi,

I started recently programming with the MPICH2 library associated to the Intel Visual Fortran composer for Windows. Even if my test code recognize the MPI library, many of the MPI simple subroutines didn't work, even well set ! For example, this simple code didn't create the file 'data.txt' :

program main

        use mpi

        implicit none

        integer :: descripteur,code
        call MPI_INIT(code)
        call MPI_COMM_SIZE ( MPI_COMM_WORLD ,nb_procs,code)
        call MPI_COMM_RANK ( MPI_COMM_WORLD ,rang,code)

      print * ,'Je suis le processus ',rang,' parmi ',nb_procs        

        call MPI_FILE_OPEN(MPI_COMM_WORLD,"data.txt",MPI_MODE_RDWR+MPI_MODE_CREATE,MPI_INFO_NULL,descripteur,code)
        
        call MPI_FILE_CLOSE (descripteur,code)
        call MPI_FINALIZE (code)
         
end 

Result :

Je suis le processus            5  parmi            8

 Je suis le processus            3  parmi            8

 Je suis le processus            1  parmi            8

 Je suis le processus            7  parmi            8

 Je suis le processus            6  parmi            8

 Je suis le processus            2  parmi            8

 Je suis le processus            4  parmi            8

 Je suis le processus            0  parmi            8

But the file data.txt isn't created !

Can someone please help me ! why such a simple code do not work ?

Thanks a lot.

0 Kudos
0 Replies
Reply