请选择 进入手机版 | 继续访问电脑版
爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
楼主: andrewsoong

netcdf4.2及以上版本的安装:For C and Fortran

  [复制链接]
 楼主| 发表于 2013-12-3 08:42:17 | 显示全部楼层

wrf啊,我没用这个版本。我用这个酔新版本来支持气候模式CESM
密码修改失败请联系微信:mofangbao
发表于 2013-12-4 20:18:58 | 显示全部楼层
当我使用哈佛的那个进行编译时,出现了下面的状况:
configure: netCDF 4.2
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
configure: checking user options
checking whether a NCIO_MINBLOCKSIZE was specified... 256
checking if fsync support is enabled... yes
checking whether extra valgrind tests should be run... no
checking whether we should try to build netCDF-4... no
checking whether reading of HDF4 SD files is to be enabled... no
checking whether to fetch some sample HDF4 files from Unidata ftp site to test HDF4 reading (requires wget)... no
checking whether parallel I/O for classic and 64-bit offset files using parallel-netcdf is to be enabled... no
checking whether extra example tests should be run... no
checking whether parallel IO tests should be run... no
checking whether a default chunk size in bytes was specified... 4194304
checking whether a maximum per-variable cache size for HDF5 was specified... 67108864
checking whether a number of chunks for the default per-variable cache was specified... 10
checking whether a default file cache size for HDF5 was specified... 4194304
checking whether a default file cache maximum number of elements for HDF5 was specified... 1009
checking whether a default cache preemption for HDF5 was specified... 0.75
checking whether netCDF-4 logging is enabled... no
checking whether cdmremote client is to be built... no
checking whether DAP client is to be built... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/luyi/GEOS-Chem-Libraries/src/netcdf-4.2':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[1]: *** [nc_classic] Error 77
make[1]: Leaving directory `/home/luyi/GEOS-Chem-Libraries/src'
make: *** [all] Error 2

请教大神!
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2013-12-4 20:41:12 | 显示全部楼层
易易猪 发表于 2013-12-4 20:18
当我使用哈佛的那个进行编译时,出现了下面的状况:
configure: netCDF 4.2
checking build system type. ...

推荐使用intel fortran
密码修改失败请联系微信:mofangbao
发表于 2013-12-24 11:48:24 | 显示全部楼层
我又哭了:cdf/include -fpic -mcmodel=medium -MT libnetcdf3_la-nclistmgr.lo -MD -MP -MF .deps/libnetcdf3_la-nclistmgr.Tpo -c nclistmgr.c -o libnetcdf3_la-nclistmgr.o
icc: command line warning #10148: option '-mcmodel=medium' not supported
mv -f .deps/libnetcdf3_la-nclistmgr.Tpo .deps/libnetcdf3_la-nclistmgr.Plo
m4   putget.m4 >putget.c
/bin/bash: m4:找不到命令
make[3]: *** [putget.c] 错误 127
make[3]:正在离开目录 `/home/luyi/GEOS-Chem-Libraries/src/netcdf-4.2/libsrc'
make[2]: *** [check-recursive] 错误 1
make[2]:正在离开目录 `/home/luyi/GEOS-Chem-Libraries/src/netcdf-4.2'
make[1]: *** [nc_classic] 错误 2
make[1]:正在离开目录 `/home/luyi/GEOS-Chem-Libraries/src'
make: *** [all] 错误 2

用的是ifort和icc编译的,但不知道是哪个原因出的错!
密码修改失败请联系微信:mofangbao
发表于 2013-12-24 11:58:31 | 显示全部楼层
还有,icc的参数该如何设置呀?
密码修改失败请联系微信:mofangbao
发表于 2013-12-24 12:08:11 | 显示全部楼层
libtool: link: icc -fpic -mcmodel=medium -o nctest add.o atttests.o cdftests.o dimtests.o driver.o emalloc.o error.o misctest.o rec.o slabs.o val.o vardef.o varget.o vargetg.o varput.o varputg.o vartests.o vputget.o vputgetg.o  ../liblib/.libs/libnetcdf.a -L/home/luyi/netcdf/lib -lm
icc: command line warning #10148: option '-mcmodel=medium' not supported
../liblib/.libs/libnetcdf.a(libnetcdf3_la-nc.o): In function `NC_endef':
nc.c:(.text+0xf42): undefined reference to `fill_NC_var'
nc.c:(.text+0x105a): undefined reference to `fill_NC_var'
nc.c:(.text+0x11db): undefined reference to `fill_NC_var'
../liblib/.libs/libnetcdf.a(libnetcdf3_la-nc.o): In function `NC_endef..0':
nc.c:(.text+0x1bc4): undefined reference to `fill_NC_var'
nc.c:(.text+0x1cdc): undefined reference to `fill_NC_var'
../liblib/.libs/libnetcdf.a(libnetcdf3_la-nc.o):nc.c:(.text+0x1e5d): more undefined references to `fill_NC_var' follow
../liblib/.libs/libnetcdf.a(libnetcdf3_la-nc3dispatch.o):(.data+0x78): undefined reference to `NC3_get_vara'
../liblib/.libs/libnetcdf.a(libnetcdf3_la-nc3dispatch.o):(.data+0x7c): undefined reference to `NC3_put_vara'
make[4]: *** [nctest] 错误 1
make[4]:正在离开目录 `/home/luyi/GEOS-Chem-Libraries/src/netcdf-4.2/nctest'
make[3]: *** [check-am] 错误 2
make[3]:正在离开目录 `/home/luyi/GEOS-Chem-Libraries/src/netcdf-4.2/nctest'
make[2]: *** [check-recursive] 错误 1
make[2]:正在离开目录 `/home/luyi/GEOS-Chem-Libraries/src/netcdf-4.2'
make[1]: *** [nc_classic] 错误 2
make[1]:正在离开目录 `/home/luyi/GEOS-Chem-Libraries/src'
make: *** [all] 错误 2
%

又出现问题了!我又哭了,不知道原因呀!哈哈
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2013-12-24 14:29:12 | 显示全部楼层
易易猪 发表于 2013-12-24 12:08
libtool: link: icc -fpic -mcmodel=medium -o nctest add.o atttests.o cdftests.o dimtests.o driver.o e ...

他们的默认支持 intel fortran 也就是 FC=ifort 就好了~~~icc我没指定,没出问题
密码修改失败请联系微信:mofangbao
发表于 2013-12-24 15:54:23 | 显示全部楼层
那你明白我最后的那个问题不?同时,你装的平台是pc还是大型机,用的linux是那个版本?
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2013-12-24 17:19:26 | 显示全部楼层
易易猪 发表于 2013-12-24 15:54
那你明白我最后的那个问题不?同时,你装的平台是pc还是大型机,用的linux是那个版本?

大型机~~~小红帽的linux~~~
密码修改失败请联系微信:mofangbao
发表于 2014-3-7 17:52:01 | 显示全部楼层
易易猪 发表于 2013-12-24 12:08
libtool: link: icc -fpic -mcmodel=medium -o nctest add.o atttests.o cdftests.o dimtests.o driver.o e ...

我安装的过程中也出现这个问题了,请问这个问题你解决了吗?
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表