- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This may be probably more an mpi issue then fortran, plz forgive if it is totally so.
I am trying to impliment mpi in my code. I installed mpich2 from source and it is correct:
[bash]$ which mpdtrace
~/Library/mpich2-install/bin/mpdtrace
$ which mpd
~/Library/mpich2-install/bin/mpd
[/bash]
and
[bash]$ locate mpif.h
/home/rudra/Library/mpich2-install/include/mpif.h
[/bash]
now in my makefile i have:
[bash]MPIFLAGS =-I/home/rudra/Library/mpich2-install/include/
FFLAGS=$(MPIFLAGS) $(CFLAGS)
$(PROG): $(FOBJ)
$(FC) $(FFLAGS) $(FPAR) -o ${PROG} $(FOBJ) -L${LMPATH}/LMTO-A -llm_a -L${LMPATH}/LMTO-B -llm_b
[/bash]
I cannot use "use mpi" as in that case
[bash]$ make -s
main.f90(31): error #7013: This module file was not generated by any release of this compiler. [MPI]
use mpi
-------^
compilation aborted for main.f90 (code 1)
make: *** [main.o] Error 1
[/bash]
but even when i am using "include mpif.h" i am getting the error as
[bash]$ make
ifort -c -I/home/rudra/Library/mpich2-install/include/ -O3 -openmp main.f90
ifort -c -I/home/rudra/Library/mpich2-install/include/ -O3 -openmp newfit.f90
ifort -I/home/rudra/Library/mpich2-install/include/ -O3 -openmp -o irun band.o cgreen.o dos.o fermi.o hop.o kind.o ldos.o main.o mmat.o newfit.o param.o pardos.o shared.o thread.o util.o bit_unm.o nis.o echo.o file.o -L/home/rudra/ASR_FULL/LMTO-A -llm_a -L/home/rudra/ASR_FULL/LMTO-B -llm_b
main.o: In function `MAIN__':
main.f90:(.text+0x2b48): undefined reference to `mpi_init_'
main.f90:(.text+0x2b5b): undefined reference to `mpi_comm_rank_'
main.f90:(.text+0x2b6e): undefined reference to `mpi_comm_size_'
main.f90:(.text+0x42f0): undefined reference to `mpi_barrier_'
main.f90:(.text+0x42f6): undefined reference to `mpi_finalize_'
make: *** [irun] Error 1
[/bash]
Since I am using the source as mpif.h, does it really matter which compiler is used in this case? wher I am going wrong?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use the mpif90 wrapper you made when you built mpi from source, and the same compilers. If you want a pre-built mpi using Intel compilers, Intel MPI is your choice.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page