爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 27308|回复: 19

wrf-chem中prep_chem_sources编译需要的HDF5安装(已解决)

[复制链接]

新浪微博达人勋

发表于 2016-4-18 16:33:19 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
本帖最后由 悠然一梦123 于 2016-5-18 09:33 编辑

已经纠结不止一个星期了,真不知道该怎么办了,编译prep_chem_sources这一块,一直出现问题,
use hdf5
----^
edgar_emissions.f90(696): error #6683: A kind type parameter must be a compile-time constant.   [HID_T]
integer(hid_t):: file_id, dset_id, group_id, dtype_id
---------^
edgar_emissions.f90(697): error #6683: A kind type parameter must be a compile-time constant.   [HSIZE_T]
integer(hsize_t) :: data_dims(2)
---------^
edgar_emissions.f90(702): error #6683: A kind type parameter must be a compile-time constant.   [HID_T]
integer(hid_t)::dcpl
---------^
edgar_emissions.f90(704): error #6683: A kind type parameter must be a compile-time constant.   [SIZE_T]
integer(size_t)::nelmts
---------^
edgar_emissions.f90(707): error #6683: A kind type parameter must be a compile-time constant.   [SIZE_T]
integer(size_t),parameter:: MaxChrlen=80
---------^
edgar_emissions.f90(733): error #6404: This name does not have a type, and must have an explicit type.   [H5F_ACC_RDONLY_F]
      call h5fopen_f(filenameed, H5F_ACC_RDONLY_F, file_id, error)
---------------------------------^
edgar_emissions.f90(771): error #6404: This name does not have a type, and must have an explicit type.   [H5T_IEEE_F32LE]
                          call h5dread_f(dset_id, H5T_IEEE_F32LE, soma,&
--------------------------------------------------^
edgar_emissions.f90(821): error #7013: This module file was not generated by any release of this compiler.   [HDF5]
use hdf5
-----^
edgar_emissions.f90(864): error #6683: A kind type parameter must be a compile-time constant.   [HID_T]
integer(HID_T) :: file_id
---------^
edgar_emissions.f90(865): error #6683: A kind type parameter must be a compile-time constant.   [HID_T]
integer(HID_T) :: dset_id
---------^
edgar_emissions.f90(866): error #6683: A kind type parameter must be a compile-time constant.   [HSIZE_T]
integer(HSIZE_T) :: data_dims(4)
---------^
edgar_emissions.f90(898): error #6404: This name does not have a type, and must have an explicit type.   [H5F_ACC_RDONLY_F]
         call h5fopen_f(trim(filename),H5F_ACC_RDONLY_F, file_id, hdferr)  !abre o arquivo
---------------------------------------^
edgar_emissions.f90(920): error #6404: This name does not have a type, and must have an explicit type.   [H5T_NATIVE_REAL]
               call h5dread_f(dset_id, H5T_NATIVE_REAL, src_dummy, data_dims, hdferr)  !faz a leitura do dataset
---------------------------------------^
compilation aborted for edgar_emissions.f90 (code 1)
make: *** [edgar_emissions.o] Error 1
。总是提示HDF5的问题,HDF5我用的是hdf5-1.8.16.tar.gz版本,解压编译安装,include.mk.intel.中netcdf,hdf5路径都改了,F_COMP,C_COMP路径也都改了,用的是学院里服务器,netcdf是集群里自带的,hdf5,wrf,wps的编译用的都是intel编译器编译的,真是搞不懂到底是哪里出错了,HDF5安装也没出现error,就是make时中间有出现这类提示,tmisc.c(2725): warning #810: conversion from "void *" to "const char" may lose significant bits
                          {"1234567", "1234567\0", "12345678", {NULL}};
                                                                ^
tmisc.c(2804): warning #810: conversion from "void *" to "const char" may lose significant bits
                          {"1234567", "1234567\0", "12345678", {NULL}};
我想知道,难道是我的HDF5安装有问题吗,安装HDF5需要安装其他的辅助软件吗?ZLIB我也安装过了呀,还需要其他的吗。论坛里有人遇到过这种情况吗,求解答求解答,折腾了一个多星期了,还是没有解决问题,难过死了,感觉快要崩溃了,论坛里的小伙伴们帮帮忙吧



问题已经解决,就是HDF5没有装上,用的INTEL编译,之前没有将c++和fortran编译器都打开,./configure时应该这样,./configure FC=ifort CC=icc --prefix=path_hdf5 --enable-fortran --enable-cxx

评分

参与人数 1金钱 +1 收起 理由
klingel + 1 赞一个!

查看全部评分

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2021-8-30 22:08:07 | 显示全部楼层
qrjn111 发表于 2017-8-6 08:36
我的按照楼主的方法编译hdf5之后,重新编译 prep_chem_sources时出现了下列问题,想问一下你的是不是这个问 ...

我也出现了这个问题,我是这么解决的:
编译PREP-CHEM-SRC-1.5时这一步是在bin/build/文件夹下,要返回到PREP-CHEM-SRC-1.5/src文件夹下,把src文件夹下的convert_edgar_to_RELACS_REAC.f90和bin/build/文件夹下的convert_edgar_to_RELACS_REAC.f90这两个f90文件中的两个use chem1_list前面都加上英文感叹号,也即改成:
!use chem1_list
!use chem1_list,only : alke,bio,ora2,aro,ket,alka,ald
密码修改失败请联系微信:mofangbao
回复 支持 1 反对 0

使用道具 举报

新浪微博达人勋

发表于 2017-12-14 13:20:30 | 显示全部楼层
解决方法:


你试试,修改原代码文件的内容, 源代码文件所在位置及名称:
PREP-CHEM-SRC-1.5/src/convert_edgar_to_RELACS_REAC.f90

修改内容:
!use chem1_list
!use chem1_list, only : alke, bio,ora2,aro,ket,alka,ald
【上面这两个地方,如果convert_edgar_to_RELACS_REAC.f90文件中这两个地方没有“!”的话,加上“!”】
密码修改失败请联系微信:mofangbao
回复 支持 1 反对 0

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2016-4-18 16:53:39 | 显示全部楼层
这是修改过的 include include.mk.opt
#Makefile include include.mk.opt
############################## Change Log ##################################
# 1.0.0.2
#
# 000908 MJB include.mk-mrc ##
#            Added MAKE environment varaible.
#            Added free format option to F_OPTS for some platforms. ##
# 000907 MJB include.mk-mrc ##
#            Changed the defualts to no NCAR Graphics and no parallel.
#            Also commented out the machine specifics to force the user to
#            select the appropriate machine for them. ##
# 000823 MJB include.mk-mrc ##
#            New - defines all make environment varaibles and is included
#            in all make files. ##
#
############################################################################

# Define make (gnu make works best).

MAKE=/usr/bin/make

# Activate appropriate parts below, comment out others.

# NCAR Graphics.

#---------------------------------------------------------------
# If you are using a standard installation of NCAR Graphics, set:
#       LOADER=ncargf90
# in the machine-dependent sections below
#LIBNCARG=
#---------------------------------------------------------------
# If you are using the NCAR dummy libraries...

NCARG_DIR=$(BASE)
#LIBNCARG=-L$(NCARG_DIR) -lncarg-$(UTILS_VERSION) -lncarg_c-$(UTILS_VERSION) \
#                        -lncarg_gks-$(UTILS_VERSION)
#LIBNCARG=-L$(NCARG_DIR) -lncarg-$(UTILS_VERSION)
LIBNCARG=$(BASE)/libncarg-$(UTILS_VERSION)-$(OPT).a
#---------------------------------------------------------------
# If you are using a real distribution of NCAR Graphics...
#NCARG_DIR=/usr/local/ncarg-4.3.0/lib
#LIBNCARG=-L$(NCARG_DIR) -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX11 -ldl
#---------------------------------------------------------------

# NETCDF libraries


NETCDF=/gpfsdata/apps/netcdf-intel2013

NETCDF_INC=-I$(NETCDF)/include
NETCDF_LIBS=-L$(NETCDF)/lib -lnetcdf

# HDF libraries


HDF5=/gpfshome/wany/zhous/hdf5
HDF5_INC=-I$(HDF5)/include
HDF5_LIB=-L$(HDF5)/lib -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5 -L/gpfshome/wany/zhous/zlib-1.2.8/lib -lz

# Machine-dependent options.

#-----------------  LINUX Portland Group pgf77/gcc ---------------
CMACH=PC_LINUX1
F_COMP=/gpfsdata/intel/bin/ifort
C_COMP=/gpfsdata/intel/bin/icc
LOADER=/gpfsdata/intel/bin/ifort
C_LOADER=/gpfsdata/intel/bin/icc
LIBS=
MOD_EXT=mod

F_OPTS=-fpp -D$(CHEM) -O3
C_OPTS= -O3
LOADER_OPTS= -O3

#-----------------------------------------------------------------


# If compiling for a single-CPU platform only (without MPI):

#-----------------------------------------------------------------
PAR_LIBS=
PAR_DEFS=
#-----------------------------------------------------------------


# For IBM,HP,SGI,ALPHA use these:
ARCHIVE=ar rs
# For NEC SX-6
#ARCHIVE=sxar rs
# For SUN,CONVEX
#ARCHIVE=ar r'

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-3-14 20:36:22 | 显示全部楼层
我也是HDF5安装不上,也是用的intel的编译器,然后按照楼主的命令输入会出现fortran无法读取.f90的文件,难道是大型机上没有装Fortran?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-8-6 08:36:18 | 显示全部楼层
我的按照楼主的方法编译hdf5之后,重新编译 prep_chem_sources时出现了下列问题,想问一下你的是不是这个问题,如何解决的?
convert_edgar_to_RELACS_REAC.f90(17): error #6405: The same named entity from different modules and/or program units cannot be referenced.   [CO]
                            ,CO                      &
-----------------------------^
convert_edgar_to_RELACS_REAC.f90(19): error #6405: The same named entity from different modules and/or program units cannot be referenced.   [CO2]
                            ,CO2                     &
-----------------------------^
convert_edgar_to_RELACS_REAC.f90(20): error #6405: The same named entity from different modules and/or program units cannot be referenced.   [CH4]
                            ,CH4                     &
-----------------------------^
convert_edgar_to_RELACS_REAC.f90(21): error #6405: The same named entity from different modules and/or program units cannot be referenced.   [SO2]
                            ,SO2                     &
-----------------------------^
compilation aborted for convert_edgar_to_RELACS_REAC.f90 (code 1)
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-12-13 22:09:02 | 显示全部楼层
qrjn111 发表于 2017-8-6 08:36
我的按照楼主的方法编译hdf5之后,重新编译 prep_chem_sources时出现了下列问题,想问一下你的是不是这个问 ...

你这个问题解决了吗
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-4-28 20:34:00 | 显示全部楼层
qrjn111 发表于 2017-8-6 08:36
我的按照楼主的方法编译hdf5之后,重新编译 prep_chem_sources时出现了下列问题,想问一下你的是不是这个问 ...

请问你的问题后来是怎么解决的?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-9-8 19:13:23 | 显示全部楼层
楼主,按照你的方法安装了HDF5,prep_chem_sources也编译成功了,但是运行的时候报错:HDF5 file not found, please change to the correct path of the HDF5 file
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-5-8 19:45:02 | 显示全部楼层

您好,我加上!后,重新编译依然出现这个错误,然后查看文件!不见了
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2019-5-16 21:13:42 | 显示全部楼层

非常感谢,我有同样的问题按照你的方法解决了,但是又出现新的问题:

undefined reference to `curl_version_info'
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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