Newsgroups: comp.parallel.mpi From: Woo Chat Ming Subject: Re: MPI_Bcast Organization: The University of Hong Kong Date: 19 Nov 1997 06:41:58 GMT Message-ID: <64u1nm$bh44@hkusud.hku.hk> Dear Mr Heng, Heng Kok Liang wrote: : Can we use MPI_Bcast for MPMD program? I have two files called 'master.f' : and 'slave.f', and I call MPI_Bcast(x, 1, MPI_INTEGER, 0, comm, ierr) in the : file 'master.f', but I can't refer x in my 'slave.f', how can I solve this : problem? You must call MPI_Bcast() in ALL the processes, including master and slave, at the same time. I have taught MPI course many times. I found that many students makes this common mistake. Regards, Woo Chat Ming. ------------- Woo Chat Ming Computer Centre, TEL (852)-2857-8632 Room 1-34A, Old Library Building, FAX (852)-2559-7904 The University of Hong Kong. Email cmwoo@hku.hk http://www.hku.hk/cc/sp2/index.html Email cmwoo@hkstar.com http://www.hkstar.com/~cmwoo/