Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

mct build error

wlee@purdue_edu

New Member
Dear guru,

I am porting CCSM3.0 at intel linux machine.
I am using pgf90 fortran compiler. I set Macro.Linux and all other scripts (batch.linux.steele, env.linux.steele, run.linux.steele). I created a case like
[wlee@tg-steele scripts]$ ./create_newcase -case /grp/tgportal/CCSM/ccsm3_0/test_dir/my_case62 -mach steele
After configuring, I tried below, but had errors

[wlee@tg-steele my_case62]$ ./my_case62.steele.build
-------------------------------------------------------------------------
## Warning: SCRATCH not defined in system environment. Set SCRATCH to be /home/ba01/u106/wlee
-------------------------------------------------------------------------
Preparing T42_gx1v3 component models for execution
-------------------------------------------------------------------------
- Create execution directories for atm,cpl,lnd,ice,ocn
- If a restart run then copy restart files into executable directory
ccsm_getrestart: get /grp/tgportal/CCSM/ccsm-work/my_case62 restarts from /grp/tgportal/CCSM/ccsm-data/archive/wlee/my_case62/restart
- Check validity of configuration
- Determine if build must happen (env variable BLDTYPE)
- Build flag (BLDTYPE) is TRUE
- Build Libraries: esmf, mph, mct
Wed Jul 9 23:22:59 EDT 2008 esmf.buildlib.080709-232259
Wed Jul 9 23:23:00 EDT 2008 mph.buildlib.080709-232259
Wed Jul 9 23:23:00 EDT 2008 mct.buildlib.080709-232259
- Create model directories for each platform
- Determine if models must be rebuilt
- Build model executables, create namelist files, prestage input data
Wed Jul 9 23:23:00 EDT 2008 /grp/tgportal/CCSM/ccsm-work/my_case62/cpl/cpl.log.080709-232259
Wed Jul 9 23:23:00 EDT 2008 /grp/tgportal/CCSM/ccsm-work/my_case62/cpl/cpl.buildexe.080709-232259
ERROR: cpl.buildexe.csh failed, see cpl.buildexe.080709-232259
ERROR: cat /grp/tgportal/CCSM/ccsm-work/my_case62/cpl/cpl.buildexe.080709-232259
-----------------------------------------------------------------------

[wlee@tg-steele my_case62]$ cat /grp/tgportal/CCSM/ccsm-work/my_case62/cpl/cpl.buildexe.080709-232259
--------------------------------------------------------------------------
*
*
PGF90-F-0004-Unable to open MODULE file m_mctworld.mod (/usr/rmt_share/p6/CCSM/ccsm3_0/models/csm_share/cpl/cpl_mct_mod.F90: 37)
PGF90/x86-64 Linux 7.1-6: compilation aborted
gmake: *** [cpl_mct_mod.o] Error 2
--------------------------------------------------------------------------

[wlee@tg-steele mct]$ vi mct.buildlib.080709-232259
--------------------------------------------------------------------------
*
*
make[1]: Entering directory `/usr/rmt_share/p6/CCSM/ccsm-work/my_case60/mct/mpeu'
pgf90 -c -DSYSLINUX -DCPRPGI -O2 -pc 64 m_mpif.F90
PGF90-S-0017-Unable to open include file: mpif.h (m_mpif.F90: 60)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_integer (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_real (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_double_precision (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_logical (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_character (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_real4 (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_real8 (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_comm_world (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_comm_null (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_sum (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_prod (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_min (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_max (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_max_error_string (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_status_size (m_mpif.F90: 68)
PGF90-W-0155-MODULE PROCEDURE not defined: mpi_any_source (m_mpif.F90: 68)
0 inform, 16 warnings, 1 severes, 0 fatal for m_mpif
make[1]: *** [m_mpif.o] Error 2
make[1]: Leaving directory `/usr/rmt_share/p6/CCSM/ccsm-work/my_case62/mct/mpeu'
make[1]: Entering directory `/usr/rmt_share/p6/CCSM/ccsm-work/my_case62/mct/mct'
make[1]: *** No rule to make target `/grp/tgportal/CCSM/ccsm-work/my_case62/mct/mpeu/libmpeu.a', needed by `m_MCTWorld.o'. Stop.
make[1]: Leaving directory `/usr/rmt_share/p6/CCSM/ccsm-work/my_case62/mct/mct'
cp: No match.
cp: No match.
cp: No match.
--------------------------------------------------------------------------

My Macro.Linux file looks like this
--------------------------------------------------------------------------
INCLDIR = -I./ -I/apps/steele/mpich2-1.0.7/64/nemesis-pgi-7.1-6/include -I/apps/steele/mpich2-1.0.7/64/ssm-pgi-7.1-6/include -I/apps/steele/mpich2-1.0.7/64/ssm-intel-10.1.015/include -I/apps/steele/mpich-1.2.7p1/32/p4-pgi-7.1-6/include -I/apps/steele/mpich-1.2.7p1/32/p4-intel-10.1.015/include -I/apps/steele/mvapich2-1.0.2p1/64/ib-pgi-7.1-6/include

SLIBS = -L/lib -L/usr/lib -lnetcdf -L/grp/tgportal/CCSM/netcdf/lib -lmpich -L/apps/steele/mpich-1.2.7p1/64/p4-gcc-4.3.0/lib -L/apps/steele/pgi-7.1-6/linux86/7.1-6/lib -L/apps/steele/mpich-1.2.7p1/64/p4-pgi-7.1-6/lib -L/apps/steele/mpich-1.2.7p1/64/p4-pgi-6.0-5/lib -L/apps/steele/mpich-1.2.7p1/64/p4-pgi-6.1-2/lib -L/apps/steele/mpich-1.2.7p1/64/shmem-intel-10.1.015/lib -L/apps/steele/mpich-1.2.7p1/64/shmem-intel-10.1.015/lib/shared -llapack -L/apps/steele/Python-2.5.2-intel32/lib/python2.5/site-packages/scipy/lib/lapack -L/apps/steele/pgi-7.1-6/linux86-64/7.1-6/lib -lblas

ULIBS = -L$(LIBROOT) -lesmf -lmct -lmpeu -lmph
CPP = NONE
CXX = pgcpp
CPPFLAGS = -DLINUX -DPGF90 -DNO_SHR_VMATH
CPPDEFS = -DLINUX
CC = pgcc
CFLAGS = -c
ifeq ($(CC),pgcc)
CFLAGS += -fast
else
CFLAGS += -DUSE_GCC
endif
FIXEDFLAGS =
FC = pgf90
F90 = pgf90
FFLAGS = -c -DLINUX -DPGF90
MOD_SUFFIX = mod
LD = $(FC)
ifeq ($(CC),gcc)
LDFLAGS += -g77libs="-L/usr/local/pgi/linux86/lib -lpgf90 -lpgf90rtl -lpgftnrtl -lpgc"
endif
AR = ar
--------------------------------------------------------------

Main problem is that mpif.h is not found though the include path is included in the macro file.
Any comment to check would be very appreciated.

Thank you!
 
Hi,

Your error message says that mpif.h is not found. I've highlight MPIHEADER variable, which points out your mpif.h location below. If you put the right path of mpif.h, I think the problem won't come again. "mpif.h" is usually in your $mpich/include directory.

The rest variables are the options for compiling your MCT library. I think they should be set correctly, too.

1) Check $CASEROOT/mct/mct.buildlib.xxxxxxxx

2) Find the "Output Variables:"

If you only see the variables but no compilers or paths, that means your MCT didn't catch your compilers. You have to use "setenv" command to set them up on your .cshrc

Here is my MCT output variables look like:
Output Variables: {CC=cc} {ALLCFLAGS=-DFORTRAN_UNDERSCORE_ -DSYSLINUX -DCPRPGI -O} {FPP=cpp} {FPPFLAGS=-P -C -N -traditional} {FC=mpif90} {F90=pgf90} {FCFLAGS=} {F90FLAGS=} {MACHDEFS=-DSYSLINUX -DCPRPGI} {OPT=-O3} {REAL8=-r8} {BIT64=-tp amd64} {ENDIAN=-byteswapio} {MPIF90=mpif90} {MPILIBS=-L/usr/local/mpi/mvapich-0.9.9-pgi-fixed-shmem/lib/shared -L/usr/local/mpi/mvapich-0.9.9-pgi-fixed-shmem/lib -lmpich -libverbs -lpthread} {MPIHEADER=-I/usr/local/mpi/mvapich-0.9.9-pgi-fixed-shmem/include} {INCLUDEFLAG=-I} {INCLUDEPATH=} {AR=ar cq} {BABELROOT=} {COMPILER_ROOT=/usr/local/pgi/linux86-64/7.0-4/bin} {PYTHON=} {PYTHONOPTS=} {FORT_SIZE=} {prefix=NONE}


3) If your MCT variablres are good, but the problem is still there. I would like to suggest you download new version MCT from The Model Coupling Toolkit. Do the same output variable setting for your machine. You will pass through it.

Good luck!

-odden
 

wlee@purdue_edu

New Member
Thank you very much!!
It finally works now..I don't see previous errors. I fully spent last three days to find this...
By the way, I have another error something like this..
-------------------------------------------------
/grp/tgportal/CCSM/ccsm-work/my_case80/lib/libmct.a(m_MCTWorld.o)(.text+0x8ad): In function `m_mctworld_initd__':
: undefined reference to `mpi_irecv_'
/grp/tgportal/CCSM/ccsm-work/my_case80/lib/libmct.a(m_MCTWorld.o)(.text+0xac7): In function `m_mctworld_initd__':
: undefined reference to `mpi_waitall_'
/grp/tgportal/CCSM/ccsm-work/my_case80/lib/libmct.a(m_MCTWorld.o)(.text+0xbf8): In function `m_mctworld_initd__':
: undefined reference to `mpi_gather_'
/grp/tgportal/CCSM/ccsm-work/my_case80/lib/libmct.a(m_MCTWorld.o)(.text+0xeac): In function `m_mctworld_initd__':
: undefined reference to `mpi_irecv_'
*
*
*
-------------------------------------------------------------------------------------

Even though I think I set correct mpi library in Macro.Linux, it makes errors...

Thus I changed compiler to mpicc and mpif90 and configured accordingly, but still has problem like below
---------------------------------------------------------------------------------------
shr_sys_mod.o(.text+0x7b5): In function `__shr_sys_mod_MOD_shr_sys_chdir':
: undefined reference to `chdir_'
shr_sys_mod.o(.text+0x7e3): In function `__shr_sys_mod_MOD_shr_sys_system':
: undefined reference to `system_'
collect2: ld returned 1 exit status
gmake: *** [/grp/tgportal/CCSM/ccsm-work/my_case100/cpl/cpl] Error 1
---------------------------------------------------------------------------------------

I am not sure where the 'chdir_' and 'system_' come from...

Thank you,
Wonjun
 

wlee@purdue_edu

New Member
What I wonder is that though the MPI library is included like below at Macro.Linux
--------------------------------------
LIB_MPI := /apps/steele/mpich-1.2.7p1/32/p4-pgi-7.1-6/lib

SLIBS := -L$(NETCDFLIB) -lnetcdf -L/apps/steele/pgi-7.1-6/linux86/7.1-6/lib -L$(LIB_MPI) -lmpich -lfmpich -lmpichf90 -L$(LIBROOT) -L/apps/steele/Python-2.5.2-intel32/lib/python2.5/site-packages/scipy/lib/lapack
--------------------------------------,

mct build is not made generating messages like

--------------------------------------
/grp/tgportal/CCSM/ccsm-work/my_case115/lib/libmct.a(m_MCTWorld.o)(.text+0x8ad): In function `m_mctworld_initd__':
: undefined reference to `mpi_irecv_'
/grp/tgportal/CCSM/ccsm-work/my_case115/lib/libmct.a(m_MCTWorld.o)(.text+0xac7): In function `m_mctworld_initd__':
: undefined reference to `mpi_waitall_'
/grp/tgportal/CCSM/ccsm-work/my_case115/lib/libmct.a(m_MCTWorld.o)(.text+0xbf8): In function `m_mctworld_initd__':
: undefined reference to `mpi_gather_'
/grp/tgportal/CCSM/ccsm-work/my_case115/lib/libmct.a(m_MCTWorld.o)(.text+0xeac): In function `m_mctworld_initd__':
: undefined reference to `mpi_irecv_'
/grp/tgportal/CCSM/ccsm-work/my_case115/lib/libmct.a(m_MCTWorld.o)(.text+0x10d2): In function `m_mctworld_initd__':
: undefined reference to `mpi_waitall_'
/grp/tgportal/CCSM/ccsm-work/my_case115/lib/libmct.a(m_MCTWorld.o)(.text+0x1a43): In function `m_mctworld_initr__':
: undefined reference to `mpi_comm_dup_'
*
*
*
---------------------------------------

It doesn't look like mpi path is recognized at Macro file..
 
For the Marco.Linux:
1) change "LIB_MPI := /apps/steele/mpich-1.2.7p1/32/p4-pgi-7.1-6/lib"
to
"LIB_MPI = /apps/steele/mpich-1.2.7p1/32/p4-pgi-7.1-6/lib",
and then it should work.

2) Using mpicc and mpif90 is cool.

3) set FFLAGS = -c r8 -i4 -Kieee -Mdalign -Mextend -O2

4) I don't know if you need CXX, though


For the MCT:
Have you upgraded MCT to the newest version yet? If not, please do so. The original MCT within CCSM3 somehow is not compatible with the new mpich compiler.

1) Download the newest MCT.

2) gunzip and untar the new MCT to $CCSMROOT/models/utils/

4) Rename old mct to mct_old by using "mv" command

5) Rename new MCT to mct by using "mv" command

6) You don't have to do configure or makefile in mct directory. When building the models, the building scripts will do that. So, just go ahead to create a new case and build the model again.

One more thing that I would like to notice you is that, as I showed you, the mpi library variable name in MCT is "MPILIBS", which is different from "LIB_MPI" in Marco.Linux. If you don't set MPILIBS = your mpich library path, MCT won't be compiled. Just wanna make sure you know this.
 

wlee@purdue_edu

New Member
I updated mct and changed environment variables like below...
----------------------
Output Variables: {CC=pgcc} {ALLCFLAGS=-DFORTRAN_UNDERSCORE_ -DSYSLINUX -DCPRPGI -O} {FPP=cpp} {FPPFLAGS=-P -C -N -traditional} {FC=pgf90} {F90=pgf90} {FCFLAGS=} {F90FLAGS=} {MACHDEFS=-DSYSLINUX -DCPRPGI} {OPT=-O2} {REAL8=-r8} {BIT64=-pc 64} {ENDIAN=-byteswapio} {MPIF90=mpif90} {MPILIBS=-L/apps/steele/mpich-1.2.7p1/32/p4-pgi-7.1-6/lib -L/apps/steele/mpich-1.2.7p1/32/p4-pgi-7.1-6/lib/shared -lmpich -libverbs -lpthread} {MPIHEADER=-I/apps/steele/mpich-1.2.7p1/32/p4-pgi-7.1-6/include} {INCLUDEFLAG=-I} {INCLUDEPATH=} {AR=ar cq} {BABELROOT=} {COMPILER_ROOT=} {PYTHON=} {PYTHONOPTS=} {FORT_SIZE=} {prefix=NONE}
------------------------

My Macro.Linux is
-----------------------
NETCDFLIB := /usr/rmt_share/p6/CCSM/netcdf-pgf/lib
INC_NETCDF := /usr/rmt_share/p6/CCSM/netcdf-pgf/include
LIB_MPI = /apps/steele/mpich-1.2.7p1/32/p4-pgi-7.1-6/lib
LIB_MPI2 = /apps/steele/mpich2-1.0.7/32/ssm-pgi-7.1-6/lib
INC_MPI := /apps/steele/mpich-1.2.7p1/32/p4-pgi-7.1-6/include
INC_MPI2 := /apps/steele/mpich2-1.0.7/32/ssm-pgi-7.1-6/include

INCLDIR := -I./ -I$(INC_MPI) -I$(INC_MPI2) -I/apps/steele/pgi-7.1-6/linux86/7.1-6/include -I$(INCROOT) -I$(INC_NETCDF)

SLIBS := -L$(NETCDFLIB) -lnetcdf -L/apps/steele/pgi-7.1-6/linux86/7.1-6/lib -L$(LIB_MPI) -L$(LIB_MPI2) -lmpich -lfmpich -lmpichf90 -L$(LIBROOT) -L/apps/steele/Python-2.5.2-intel32/lib/python2.5/site-packages/scipy/lib/lapack

ULIBS := -L$(LIBROOT) -lesmf -lmct -lmpeu -lmph
CPP := NONE
CXX := pgcpp
CPPFLAGS := -DLINUX -DPGF90 -DNO_SHR_VMATH
CPPDEFS := -DLINUX
CC := mpicc
CFLAGS := -c
ifeq ($(CC),pgcc)
CFLAGS += -fast
else
CFLAGS += -DUSE_GCC
endif
FIXEDFLAGS :=
FFLAGS := -c -r8 -i4 -tp x64 -Kieee -Mdalign -Mextend -Mfree -O2
FC := pgf90
F90 := mpif90
-------------------------------------------------

However, it still says that /grp/tgportal/CCSM/ccsm-work/my_case144/lib/libmct.a(m_ExchangeMaps.o)(.text+0xb4d): In function `m_exchangemaps_exgsmapgsmap__':
: undefined reference to `mpi_isend_'

Is there any other settings that I need to reflect mpi library?

Thank you so much,
Wonjun
 
1)For MCT:
You need to give your COMPILER_ROOT= ???

2)For Marco.Linux:
NETCDFLIB := /usr/rmt_share/p6/CCSM/netcdf-pgf/lib
INC_NETCDF := /usr/rmt_share/p6/CCSM/netcdf-pgf/include
LIB_MPI = /apps/steele/mpich-1.2.7p1/32/p4-pgi-7.1-6/lib
LIB_MPI2 = /apps/steele/mpich2-1.0.7/32/ssm-pgi-7.1-6/lib
INC_MPI := /apps/steele/mpich-1.2.7p1/32/p4-pgi-7.1-6/include
INC_MPI2 := /apps/steele/mpich2-1.0.7/32/ssm-pgi-7.1-6/include

Remove all ":" before "=" on each line above.

3) I don't know it's matter or not. If I were you, I would like to put the same compiler in Marco.Linux as in MCT (e.g. FC = mpif90 in Marco.Linux, and FC = mpif90 in MCT).



That's all I would do so far.
Good luck!
 

wlee@purdue_edu

New Member
Hi,

The problem that the mpi related library reference is not found, was cleared. When I changed the path to pgf90 from 32 bit to 64bit then it cleared.

However, I had another errors, like
------------------------------------
PGF90-S-0023-Syntax error - unbalanced parentheses (/usr/rmt_share/p6/CCSM/ccsm3_0/models/ice/csim4/src/source/ice_mechred.F: 293)
PGF90-S-0023-Syntax error - unbalanced parentheses (/usr/rmt_share/p6/CCSM/ccsm3_0/models/ice/csim4/src/source/ice_mechred.F: 318)
PGF90-S-0034-Syntax error at or near end of line (/usr/rmt_share/p6/CCSM/ccsm3_0/models/ice/csim4/src/source/ice_mechred.F: 369)
PGF90-S-0034-Syntax error at or near end of line (/usr/rmt_share/p6/CCSM/ccsm3_0/models/ice/csim4/src/source/ice_mechred.F: 455)
PGF90-S-0023-Syntax error - unbalanced parentheses (/usr/rmt_share/p6/CCSM/ccsm3_0/models/ice/csim4/src/source/ice_mechred.F: 494)
PGF90-S-0023-Syntax error - unbalanced parentheses (/usr/rmt_share/p6/CCSM/ccsm3_0/models/ice/csim4/src/source/ice_mechred.F: 519)
0 inform, 0 warnings, 6 severes, 0 fatal for ridge
PGF90-S-0023-Syntax error - unbalanced parentheses (/usr/rmt_share/p6/CCSM/ccsm3_0/models/ice/csim4/src/source/ice_mechred.F: 647)
PGF90-S-0310-Illegal statement in the specification part of a MODULE (/usr/rmt_share/p6/CCSM/ccsm3_0/models/ice/csim4/src/source/ice_mechred.F: 677)
PGF90-S-0310-Illegal statement in the specification part of a MODULE (/usr/rmt_share/p6/CCSM/ccsm3_0/models/ice/csim4/src/source/ice_mechred.F: 678)
PGF90-S-0310-Illegal statement in the specification part of a MODULE (/usr/rmt_share/p6/CCSM/ccsm3_0/models/ice/csim4/src/source/ice_mechred.F: 679)
-------------------------------------
in ice.buildexe (after compiling cpl.buildexe).

I searched the errors in google, and found that FFLAG should have a freeform, -Mfreeform for pgf90. However when I added that flag, I got error like
--------------------------------
PGF90-S-0155-Unexpected continuation (mph.F: 517)
PGF90-S-0155-Unexpected continuation (mph.F: 518)
PGF90-S-0155-Unexpected continuation (mph.F: 519)
PGF90-S-0023-Syntax error - unbalanced parentheses (mph.F: 516)
0 inform, 0 warnings, 4 severes, 0 fatal for mph_init
PGF90-S-0155-Unexpected continuation (mph.F: 579)
PGF90-S-0023-Syntax error - unbalanced parentheses (mph.F: 578)
PGF90-S-0155-Unexpected continuation (mph.F: 583)
-------------------------------
in mph.buildlib before ice.buildexe.

What should I do?
Any comments and advice to try would be appreciated very much.

Thank you!
 
As I know, "-Mfree" should be put on FREEFLAGS not FFLAGS.

I modified your Marco.Linux below if you wanna try.
Here is what I changed:
1) remove CXX
2) add FREEFLAGS := -Mfree
3) change FC to mpif90
4) remove F90
5) change FFLAGS
6) add LDFLAGS after MOD_SUFFIX (be sure your mpi lib is correct here)
7) In my case, "-tp x64" is for CFLAGS not for FFLAGS. You can add "-tp x64 -fast" on two CFLAGS (i.e. the one right after CC, and the other in pgcc if-statement). I would like to suggest you do it after you successfully passed first model building.
8 ) Don't forget your $(LIBROOT). It should be the path of your mpi lib as well.

Good luck!
-Odden
===============================
ULIBS := -L$(LIBROOT) -lesmf -lmct -lmpeu -lmph
CPP := NONE
#CXX := pgcpp
CPPFLAGS := -DLINUX -DPGF90 -DNO_SHR_VMATH
CPPDEFS := -DLINUX

CC := mpicc
CFLAGS := -c

ifeq ($(CC),pgcc)
CFLAGS += -fast
else
CFLAGS += -DUSE_GCC
endif

FIXEDFLAGS :=
FREEFLAGS := -Mfree

FC := mpif90

FFLAGS := -c -r8 -i4 -Kieee -Mdalign -Mextend -O2
#FC := pgf90
#F90 := mpif90

MOD_SUFFIX = mod
LD = $(FC)
LDFLAGS := -L$(LIB_MPI) -L$(LIB_MPI2) -lpthread

ifeq ($(CC),gcc)
LDFLAGS += -g77libs="-L/usr/local/pgi/linux86/lib -lpgf90 -lpgf90rtl -lpgftnrtl -lpgc"
endif
AR = ar
 

wlee@purdue_edu

New Member
Hey Odden!

It finally works!
How can I express my appreciation to you!
Thank you so much for your help...

When I removed F90, I think it works for that...

Now I am passing cpl, ice, lnd, and ocn....hopefully it passes the ocn..

For those who have troubles like me, refer this Macro.Linux file.
--------------------------
NETCDFLIB := /apps/steele/graphics/pgi/7.1-6/netcdf-3.6.2/lib
INC_NETCDF := /apps/steele/graphics/pgi/7.1-6/netcdf-3.6.2/include
LIB_MPI2 = /apps/steele/mpich2-1.0.7/64/nemesis-pgi-7.1-6/lib
INC_MPI2 := /apps/steele/mpich2-1.0.7/64/nemesis-pgi-7.1-6/include

INCLDIR := -I./ -I$(INC_MPI2) -I/apps/steele/pgi-7.1-6/linux86-64/7.1-6/include -I$(INCROOT) -I$(INC_NETCDF)

SLIBS := -L$(NETCDFLIB) -lnetcdf -L/apps/steele/pgi-7.1-6/linux86-64/7.1-6/lib -L$(LIB_MPI2) -lmpich -lfmpich -lmpichf90 -L$(LIBROOT) -L/apps/steele/Python-2.5.2-intel32/lib/python2.5/site-packages/scipy/lib/lapack

ULIBS := -L$(LIBROOT) -lesmf -lmct -lmpeu -lmph
CPP := NONE
CPPFLAGS := -DLINUX -DPGF90 -DNO_SHR_VMATH
CPPDEFS := -DLINUX
CC := pgcc

CFLAGS := -c
ifeq ($(CC),pgcc)
CFLAGS += -fast
else
CFLAGS += -DUSE_GCC
endif
FIXEDFLAGS := none
FREEFLAGS := -Mfree
FFLAGS := -c -r8 -i4 -Kieee -Mrecursive -Mdalign -Mextend -O2
FC := pgf90
MOD_SUFFIX := mod
LD := $(FC)
ifeq ($(CC),gcc)
LDFLAGS += -g77libs="-L/usr/local/pgi/linux86/lib -lpgf90 -lpgf90rtl -lpgftnrtl -lpgc"
endif
AR := ar


ifeq ($(MODEL),pop)
CPPDEFS := $(CPPDEFS) -DPOSIX -Dimpvmix -Dcoupled
-DNPROC_X=$(NX) -DNPROC_Y=$(NY)
FIXEDFLAGS := -byteswapio
endif

ifeq ($(MODEL),csim)
CPPDEFS := $(CPPDEFS) -Dcoupled -DNPROC_X=$(NX) -DNPROC_Y=$(NY) -D_MPI
FIXEDFLAGS := -byteswapio
FREEFLAGS := $(FREEFLAGS)
endif

ifeq ($(THREAD),TRUE)
CPPFLAGS := $(CPPFLAGS) -D_OPENMP
FREEFLAGS := $(FREEFLAGS) -mp
LDFLAGS := $(LDFLAGS) -mp
endif

ifeq ($(DEBUG),TRUE)
endif
---------------------------------------------------------------

Thank you very much!
Wonjun
 
Top