- 论坛徽章:
- 0
|
在原始文件中,默认编译环境为PrgEnv-pgi,为此设FC=ftn,
本人将源代码移植到新平台,使用pgi编译环境,请问,除了改动FC=pgf90,还需改动什么?
另外,本人对CPPFLAGS,CFLAGS,的设置语句含义不懂,应查看什么资料?
不尽感激!!!
代码如下:
# template for the PGI compiler
# typical use with mkmf
# mkmf -t mkmf.template.pgi -c"-Duse_libMPI -Duse_netCDF" path_names /usr/local/include
# next two definitions are site-dependent, set by environment
NETCDF_ROOT = $(NETCDF_DIR)
MPI_ROOT = $(MPICH_DIR)
VERBOSE = -v
INCLUDE = -I$(NETCDF_ROOT)/include
CPPFLAGS = # -Wp,-C,$(VERBOSE)
CFLAGS = $(INCLUDE) $(VERBOSE)
FFLAGS_OPT = -O2 -fast -Mcray=pointer
FFLAGS_DEBUG = -g -traceback $(VERBOSE)
# use that -D flag to detect if we can use 03 allocatable in fms_platform.h
FFLAGS = $(INCLUDE) -i4 -r8 -byteswapio -Ktrap=fp -Mallocatable=03 -D_F2000 $(FFLAGS_OPT) $(FFLAGS_DEBUG)
FC = ftn
CC = cc
#CFLAGS = -D__IFC
LD = $(FC)
#LDFLAGS = -byteswapio -lpathfortran -L$(NETCDF_ROOT)/lib -lnetcdf -L$(MPI_ROOT)/lib -lmpich
LDFLAGS = $(VERBOSE) -byteswapio -L$(NETCDF_ROOT)/lib -lnetcdf |
|