PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

MM5 MPP
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
slunce



Joined: 04 May 2006
Posts: 7

PostPosted: Thu May 04, 2006 11:33 am    Post subject: MM5 MPP Reply with quote

Hi,
I am trying to compile MM5-urban with MPP but I have problems. In the file produced during compilation there are lots of warning messages some error messages for particular programs for example
..........
/usr/local/topspin/mpi/mpich/bin/mpif77.p -c -O2 -Mcray=pointer -Mnoframe -byteswapio -DDEC_ALPHA gspbl.f 2> gspbl.lis
make[1]: [gspbl.o] Error 2 (ignored)
echo gspbl.b gspbl.dm gspbl.f
gspbl.b gspbl.dm gspbl.f
cut -c1-72 slab.F | sed 's/`//' | expand |\
.............
and the end of this file is

L/librsl.a -O2 -Mcray=pointer -Mnoframe -byteswapio -L/usr/local/topspin/mpi/mpich/lib64 -lfmpich -lmpich
transm_col.o(.text+0x0): In function `transm_col_':
: multiple definition of `transm_col_'
transm_col.o(.text+0x0): first defined here
/usr/bin/ld: gspbl.o: No such file: No such file or directory
make[1]: [all] Error 2 (ignored)
/bin/mv mm5.mpp ../../Run/mm5.mpp
/bin/mv: cannot stat `mm5.mpp': No such file or directory
make[1]: [all] Error 1 (ignored)
make[1]: Leaving directory `/home/hris/IBM/MPP/build'

I suppose that there are very strange mixture of compilation options- in fact I think that these options are not the correct ones. In fact when I tried to compile a single program I received this message

[slunce@efd bulk]$ /usr/local/topspin/mpi/mpich/bin/mpif77.p -c -O2 -Mcray=pointer -Mnoframe -byteswapio -DDEC_ALPHA blkpbl.F
PGFTN-F-0226-Can't find include file parame.incl (blkpbl.F: 15)

And of course the file parame.incl is in directory that it is supposed to be.
So may be there is a problem with compilation of statement

include <file_name>

because I tried with different programs and in each of them in which there are include <file_name> there is a message that the file with a particular name which is written in the first include statement cannot be found.

My options in configure.user file are

RUNTIME_SYSTEM = "linux"
MPP_TARGET=$(RUNTIME_SYSTEM)
LINUX_MPIHOME = /usr/local/topspin/mpi/mpich
MFC = $(LINUX_MPIHOME)/bin/mpif77.p
MCC = $(LINUX_MPIHOME)/bin/mpicc
MLD = $(LINUX_MPIHOME)/bin/mpif77.p
FCFLAGS = -O2 -Mcray=pointer -Mnoframe -byteswapio -DDEC_ALPHA
LDOPTIONS = -O2 -Mcray=pointer -Mnoframe -byteswapio
LOCAL_LIBRARIES = -L$(LINUX_MPIHOME)/lib64 -lfmpich -lmpich
MAKE = make -i -r
AWK = awk
SED = sed
CAT = cat
CUT = cut
EXPAND = expand
M4 = m4
CPP = /lib/cpp -C -P -traditional -DDEC_ALPHA
CPPFLAGS = -DMPI -Dlinux -DSYSTEM_CALL_OK -DDEC_ALPHA
CFLAGS = -DMPI -I$(LINUX_MPIHOME)/include
ARCH_OBJS = milliclock.o
IWORDSIZE = 4
RWORDSIZE = 4
LWORDSIZE = 4
#---------------------------------------

and in the makefile.linux

OBJ = $(CORE_OBJ) rsl_mpi_compat.o mpi_init_f.o debug.o fort_doubleread.o fort_doublewrite.o rsl_error_dup.o fort_bdyin_dbl.o vicopy.o
HDR = $(CORE_HDR)
TAR = $(CORE_TAR)

IDIR=$(LINUX_MPIHOME)/include
CC = $(LINUX_MPIHOME)/bin/mpicc
FC = $(LINUX_MPIHOME)/bin/mpif77.p

LIB =
...


I hope that someone can help me to fix my compilation options

Thank you very much
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6125
Location: The Portland Group Inc.

PostPosted: Thu May 04, 2006 4:50 pm    Post subject: Reply with quote

Hi slunce,

I think you just need to add the "-I/path/to/mm5/include" flag to let the compiler know where "parame.incl" is located. Please change the path to the actual path to the MM5 include directory.

Example:
Code:
slunce@efd bulk]$ /usr/local/topspin/mpi/mpich/bin/mpif77.p -c -O2 -Mcray=pointer -Mnoframe -byteswapio -DDEC_ALPHA -I/path/to/mm5/include blkpbl.F


- Mat
Back to top
View user's profile
slunce



Joined: 04 May 2006
Posts: 7

PostPosted: Fri May 05, 2006 6:13 pm    Post subject: MM5 MMP Reply with quote

Hi,
Used Mat's recommendation and thanks to him I have no error message in the file created during compilation except:) at the end of this file

...............
milliclock.o ../../MPP/RSL/RSL/librsl.a -O2 -Mcray=pointer -Mnoframe -byteswapio -L/usr/local/topspin/mpi/mpich/lib64 -lfmpich -lmpich
transm_col.o(.text+0x0): In function `transm_col_':
: multiple definition of `transm_col_'
transm_col.o(.text+0x0): first defined here
../../MPP/RSL/RSL/librsl.a(rsl_malloc.o)(.text+0x20a): In function `rsl_free':
: undefined reference to `errno'
../../MPP/RSL/RSL/librsl.a(rsl_malloc.o)(.text+0x22a): In function `rsl_free':
: undefined reference to `errno'
make[1]: [all] Error 2 (ignored)
/bin/mv mm5.mpp ../../Run/mm5.mpp
/bin/mv: cannot stat `mm5.mpp': No such file or directory
make[1]: [all] Error 1 (ignored)
make[1]: Leaving directory `/home/hris/IBM/MPP/build'
...............

and I have no idea what is the meaning of these messages

So can you help me with this?

Thank you very much
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6125
Location: The Portland Group Inc.

PostPosted: Sat May 06, 2006 9:47 am    Post subject: Reply with quote

Hi sluce,

The MM5 help desk (http://www.mmm.ucar.edu/mm5/mpp/helpdesk/) shows that they have a fix for the 'errno' problem in the latest release (See http://www.mmm.ucar.edu/mm5/mpp/helpdesk/20030725.html). Linux changed how it handles the global variable 'errno' and many programs needed to be updated.

As for the multple definition error, I'm not sure. While I haven't built MM5 MPP for a while, I don't remember encountering this. If I had to guess, I'd say that 'transm.o' and 'transm_col.o' are on the link line and when you compiled 'transm.o' (source physics/radiation/sfc/transm.F) you used the define flag '-DMPP1_COLUMNWISE'. This define flag toggles which TRANSM function definition to use.

Try downloading the latest MM5 and MPP versions from ftp://ftp.ucar.edu/mesouser/MM5V3 to see if this takes care of the problem. If not, next week I'll try to write up a guide on compiling MPP.

- Mat
Back to top
View user's profile
slunce



Joined: 04 May 2006
Posts: 7

PostPosted: Sun May 07, 2006 1:31 pm    Post subject: MM5 MPP Reply with quote

Hi, Mat
I used http://www.mmm.ucar.edu/mm5/mpp/helpdesk/20030725.html) and now I have problems only with
.......................
L/librsl.a -O2 -Mcray=pointer -Mnoframe -byteswapio -L/usr/local/topspin/mpi/mpich/lib64 -lfmpich -lmpich
transm_col.o(.text+0x0): In function `transm_col_':
: multiple definition of `transm_col_'
transm_col.o(.text+0x0): first defined here
make[1]: [all] Error 2 (ignored)
/bin/mv mm5.mpp ../../Run/mm5.mpp
/bin/mv: cannot stat `mm5.mpp': No such file or directory
.........



Following your recommendations I tried with the newest version of MPP and the same copilation options but something strange happened
.....................
/usr/local/topspin/mpi/mpich/bin/mpicc -c -I/usr/local/topspin/mpi/mpich/include -DMPI -DRSL_SYNCIO -Dlinux -DSWAPBYTES -O -DIMAX_MAKE= -DJMAX_MAKE= -DMAXDOM_MAKE=6 -DMAXPROC_MAKE=256 -DHOST_NODE=0 -DMON_LOW=1 -DALLOW_RSL_168PT=1 set_padarea.c
In file included from /usr/local/topspin/mpi/mpich/include/mpidefs.h:7,
from /usr/local/topspin/mpi/mpich/include/mpi.h:230,
from rsl_comm.h:266,
from rsl.h:839,
from set_padarea.c:59:
/usr/local/topspin/mpi/mpich/include/mpi_fortdefs.h:5: error: redefinition of typedef 'MPI_Fint'
rsl.h:832: error: previous declaration of 'MPI_Fint' was here
make[2]: [set_padarea.o] Error 1 (ignored)
/usr/local/topspin/mpi/mpich/bin/mpif77.p -c -O set_f_padarea.F
/usr/local/topspin/mpi/mpich/bin/mpicc -c -I/usr/local/topspin/mpi/mpich/include -DMPI -DRSL_SYNCIO -Dlinux -DSWAPBYTES -O -DIMAX_MAKE= -DJMAX_MAKE= -DMAXDOM_MAKE=6 -DMAXPROC_MAKE=256 -DHOST_NODE=0 -DMON_LOW=1 -DALLOW_RSL_168PT=1 domain_def.c
In file included from /usr/local/topspin/mpi/mpich/include/mpidefs.h:7,
from /usr/local/topspin/mpi/mpich/include/mpi.h:230,
from rsl_comm.h:266,
from rsl.h:839,
from domain_def.c:59:
/usr/local/topspin/mpi/mpich/include/mpi_fortdefs.h:5: error: redefinition of typedef 'MPI_Fint'
rsl.h:832: error: previous declaration of 'MPI_Fint' was here
make[2]: [domain_def.o] Error 1 (ignored)
......................


and at the end of compilation
..................
cc -DMPI -I/usr/local/topspin/mpi/mpich/include -o col_cutter ./col_cutter.c;
/tmp/ccshoBmx.o(.text+0xe): In function `main':
: warning: the `gets' function is dangerous and should not be used.
make[1]: Leaving directory `/home/hris/P/IBM/MPP'
(cd MPP/build; \
/bin/rm -f .tmpobjs ; \
/lib/cpp -C -P -traditional -DDEC_ALPHA -D"linux" -I../../pick ../mpp_objects_all > .tmpobjs ; \
make -i -r -f Makefile.RSL )
make[1]: Entering directory `/home/hris/P/IBM/MPP/build'
cut -c1-72 ../../include/parame >> parame.incl
/bin/mv parame.incl ../../pick
make[1]: Leaving directory `/home/hris/P/IBM/MPP/build'


And when I typed "make mpclean", "make uninstall" the tast message was:
...................
make[1]: Entering directory `/home/hris/P/IBM/MPP/RSL/RSL'
make[1]: *** No rule to make target `super'. Stop.
make[1]: Leaving directory `/home/hris/P/IBM/MPP/RSL/RSL'
make: *** [uninstall] Error 2


So may be I have no other choice expect to use the MPP which is provided with the version of MM5 which I used.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group