Compiling gnu_mpi_32

58 views
Skip to first unread message

Kongzhu

unread,
Feb 4, 2010, 8:19:17 AM2/4/10
to FDS and Smokeview Discussions
I've tried to compile gnu_mpi_32 and got this error message:

gfortran -O1 -fno-underscoring -o fds5_gnu_mpi_32 isob.o prec.o smvv.o
cons.o devc.o type.o mesh.o func.o irad.o ieva.o pois.o radi.o evac.o
part.o vege.o ctrl.o turb.o dump.o hvac.o read.o mass.o wall.o fire.o
divg.o init.o velo.o pres.o mpip.o main.o
main.o:main.f90:(.text+0x57a): undefined reference to `mpi_allreduce_'
main.o:main.f90:(.text+0x5d4): undefined reference to `mpi_allreduce_'
main.o:main.f90:(.text+0x62b): undefined reference to `mpi_allreduce_'
...

The makefile looks like this:

gnu_mpi_32 : FFLAGS = -O1
gnu_mpi_32 : CFLAGS = -O1
gnu_mpi_32 : FCOMPL = gfortran
gnu_mpi_32 : CCOMPL = gcc
gnu_mpi_32 : obj = fds5_gnu_mpi_32
gnu_mpi_32 : $(obj_mpi)
$(FCOMPL) $(FFLAGS) -o $(obj) $(obj_mpi)


I've also tried to add -fno-underscoring to FFLAGS and -D pp_noappend
to CFLAGS which gives the same result but instead of the above error
message I get (no underscore):

main.o:main.f90:(.text+0x57a): undefined reference to `mpi_allreduce'
main.o:main.f90:(.text+0x5d4): undefined reference to `mpi_allreduce'
main.o:main.f90:(.text+0x62b): undefined reference to `mpi_allreduce'
...

Do be able to get this far I had to copy-paste add mpif.h into the
FDS_Source folder.

Does anyone know what is wrong and how I can get past this problem? I
tried to fiddle around a bit in the mpis.f90 file with no change in
result.

Joakim

shostikk

unread,
Feb 5, 2010, 2:32:14 AM2/5/10
to FDS and Smokeview Discussions
Since you are trying to compile the MPI version, the file mpip.f90 is
used, not mpis.f90.
mpip.f90 contains only an include statement for mpif.h, which must be
found from you system.
So, make sure you have properly installed mpi libraries, and that the
compiler can find them.
That is, the directories should be included your PATH or LIBRARY_PATH
environment variables.

Simo


On Feb 4, 3:19 pm, Kongzhu <joakim.sandst...@brandskyddslaget.se>
wrote:

Kongzhu

unread,
Feb 5, 2010, 9:29:53 AM2/5/10
to FDS and Smokeview Discussions
I couldn't get the mpif.h files to be in the path so I moved them to
FDS_Source. This solved some of the problems and got me past to this
stage. I assume that this error has nothing to do with not finding
mpif.h but I'm not shure.

I'll continue trying. If anyone has solved this please let me know.

Joakim

Reply all
Reply to author
Forward
0 new messages