This is a memory, and thanks to George – the author of MMS, without his help, I can not make MMS work on my system – ubuntu dapper.
1. download the latest version to your computer, and extract it in a directory.
I download version 1.2.1 beta and extract it to ~/Desktop/mms directory.
and install the gcc compiler and gfortran95 compiler, run:
sudo aptitude install gfortran gcc
2. modify setup file, change ksh with sh, you can use nano command or any other text editor.
3. run setup with command: ~/setup.
When run setup, there are some directory you must notice, the include directory in ubuntu is /usr/include, and the lib directory is /usr/lib. I have the big problem in this step, and resolve it with George’s help, and there are some warnning messages with the default parameters, just skip them, we will change these parameter at next step.
4. modify ~/Desktop/mms/make/makelist, make it like this:
CC = gcc
FC = gfortran
ARC = LINUX
RM = rm -f
MV = mv -f
CP = cp
RANLIB = ranlib
MAKE = make
LN = ln -s
CD = cd
AR = ar ruvCOMPILE_FLAGS = -O -DLINUX
LDFLAGS = -s
PRINTFLAGS = -DUSE_LPR_PRINT_CMDXCFLAGS =
XLDFLAGS =
XINCPATH = -I/usr/include/
XMINCPATH =
XLIBPATH = -L/usr/lib
XTLIBPATH = -L/usr/lib
XMLIBPATH = -L/usr/lib
XLIB = -lX11
XTLIB = -lXt
XMLIB = -lXm
XEXTRALIBS = -lXp -lXext
MATHLIB = -lm
GISFLAG = -D_NO_GIS
GISLIB =######################################################################
# local macros for model building
######################################################################MMSDIR = /home/wlx/Desktop/mms
MSRCDIR = /home/wlx/Desktop/mms/src/mms
MINCDIR = /home/wlx/Desktop/mms/src/include
MLIBDIR = /home/wlx/Desktop/mms/lib
MOBJDIR = /home/wlx/Desktop/mms/obj
OBJDIR = /home/wlx/Desktop/mms/obj
MBINDIR = /home/wlx/Desktop/mms/bin
CFLAGS = -O -DLINUX -I/usr/include/ -I/home/wlx/Desktop/mms/src/include
FFLAGS = -Wall -fno-second-underscore -fbounds-check
FLIBS = -lgfortran -lgcc
GLIBS = -L/usr/lib -lXm -lXt -lX11 -lXp -lXext
5. create a mms working directory, and then run command mms_workspace in this directory, and first you should the ksh to sh in the command:
mkdir ~/mms_work
cd ~/mms_work
~/Desktop/mms/bin/mms_workspace
6. run command setmms.sh in mms_work/control directory.
7. run xmbuild -E~/mms_work/control/mms.env
(this is a bug, normally you should run xmbuild, but in bash shell, you can not do it.)
note: after I wrote this, I do another clean test, find that you must do this faq twice then can make it work.
发表回复