- 积分
- 62060
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-4-21
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2013-11-11 16:55:44
|
显示全部楼层
大马哈 发表于 2013-11-11 16:29
楼主大大 我尝试安装最新netcdf的时候 zlib一切ok 就是我在make hdf5 的时候总是有 warning: will never be ...
这类问题太坑了~~~还是哈佛大学GEOS_CHEM研究小组比较好~~~他把这些都集成了~~~你需要的话,可以去下载安装,一个命令,netcdf4.2-c,netcdf-fortran和hdf5等等都安装好了~~~
http://acmg.seas.harvard.edu/geos/doc/man/index.html
2.5.1 Downloading the GEOS-Chem-Libraries installer package
You can use the Git source-code management software to download the GEOS-Chem-Libraries installer package onto your system. Type:
git clone git://git.as.harvard.edu/bmy/GEOS-Chem-Libraries
and then change into the GEOS-Chem-Libraries directory:
cd GEOS-Chem-Libraries
In this directory you will find the following files and subdirectories:
File or Directory Description
README File describing the contents of GEOS-Chem-Libraries and how to build the netCDF libraries
GNUmakefile Main-level makefile. This calls down to the master GNUmakefile in the src/ sub-directory.
opt/ Default directory where libraries will be installed (if you do not choose an alternate directory)
src/ Directory containing netCDF and related library distributions.
2.5.2 Installing netCDF–4.2
Follow these instructions to install the netCDF–4.2 library and the libraries on which it depends.
2.5.2.1 Building the netCDF–4.2 library
To build the netCDF-4.2 library (and the dependent ZLIB and HDF5 libraries) using the Intel Fortran Compiler (ifort), type one of the following commands:
make PREFIX=root_library_dir # If you have the Intel C compilers
make PREFIX=root_library_dir GCC=yes # If you don't have the Intel C compilers
To build the libraries for the PGI compiler, type one of the following commands:
make COMPILER=pgi PREFIX=root_library_dir # If you have the PGI C compilers
make COMPILER=pgi PREFIX=root_library_dir GCC=yes # If you don't have the PGI C compilers
Makefile options:
Option Description
COMPILER
This option is used to pick the compiler that you wish to use to build netCDF-4.2 and the related libraries. At present, you may select either ifort or pgi. If you omit the COMPILER option, the default value of ifort will be selected.
PREFIX
This option is used to set root_library_dir, which is the full path name of the directory into which the netCDF-4.2 and related libraries will be installed. If you omit the PREFIX option, then root_library_dir will be automatically set to one of these default values:
GEOS-Chem-Libraries/opt/ifort/nc4/ # If COMPILER=ifort
GEOS-Chem-Libraries/opt/pgi/nc4/ # If COMPILER=pgi
If you do not have sysadmin privileges, then you can use the PREFIX option to set root_library_dir to a directory in your home space, such as /home/YOUR_USER_ID/lib (or you may install them in one of the default paths listed above). You can then ask your sysadmin to move the libraries to a common space on your machine (or cluster) where all users may access them.
GCC If you do not have the Intel C/C++ compilers (icc, icpc) or PGI C/C++ compilers (pgcc, pgcpp) installed on your system, then you can tell the GEOS-Chem-Libraries installer to use the GNU C/C++ compilers (gcc, g++) instead. Otherwise, you can omit this option.
The libraries take approximately 20 minutes (or longer) to build. If the library installation process is successful, you will see this confirmation screen:
-------+---------+-------------------------------------
Config | Install | Package
-------+---------+-------------------------------------
ok | ok | zlib-1.2.6
ok | ok | hdf5-1.8.8
ok | ok | netcdf-4.2
ok | ok | netcdf-fortran-4.2
-------+---------+-------------------------------------
This tells you that the netCDF-4.2 and its related libraries were installed properly.
2.5.2.2 netCDF-4.2 library paths
The netCDF-4.2 (and related libraries) will be installed into the following paths. As described above, you may use the PREFIX=root_library_dir option to set the value of root_library_dir.
root_library_dir/bin # nc-config, nf-config, ncdump, ncgen, etc.
root_library_dir/include # Include files (*.h)
root_library_dir/lib # Library file (libz.a)
root_library_dir/share # Manual pages & documentation
Now that you have installed netCDF–4.2, you may skip ahead to Chapter 2.5.4: Telling GEOS–Chem where to find the netCDF libraries.
2.5.3 Installing netCDF CLASSIC
If you have problems installing the netCDF–4.2 libraries on your system, try installing netCDF classic instead. Follow these instructions:
2.5.3.1 Building netCDF CLASSIC
To build the netCDF CLASSIC libraries (which lacks the advanced features of netCDF-4.2) using the Intel Fortran Compiler (ifort), type one of the following commands:
make CLASSIC=yes PREFIX=root_library_dir # If you have the Intel C compilers
make CLASSIC=yes PREFIX=root_library_dir GCC=yes # If you don't have the Intel C compilers
To build the netCDF "CLASSIC" libraries for the PGI compiler, type:
make CLASSIC=yes COMPILER=pgi PREFIX=root_library_dir # If you have the PGI C compilers:
make CLASSIC=yes COMPILER=pgi PREFIX=root_library_dir GCC=yes # If you don't have the PGI C compilers
Makefile options:
Option Description
COMPILER
This option is used to pick the compiler that you wish to use to build netCDF CLASSIC. At present, you may select either ifort or pgi. If you omit the COMPILER option, the default value of ifort will be selected.
PREFIX
This option is used to set root_library_dir, which is the full path name of the directory into which netCDF CLASSIC will be installed. If you omit the PREFIX option, then root_library_dir will be automatically set to one of these default values:
GEOS-Chem-Libraries/opt/ifort/nc_classic/ # If COMPILER=ifort
GEOS-Chem-Libraries/opt/pgi/nc_classic/ # If COMPILER=pgi
If you do not have sysadmin privileges, then you can use the PREFIX option to set root_library_dir to a directory in your home space, such as /home/YOUR_USER_ID/lib (or you may install them in one of the default paths listed above). You can then ask your sysadmin to move the libraries to a common space on your machine (or cluster) where all users may access them.
GCC If you do not have the Intel C/C++ compilers (icc, icpc) or PGI C/C++ compilers (pgcc, pgcpp) installed on your system, then you can tell the GEOS-Chem-Libraries installer to use the GNU C/C++ compilers (gcc, g++) instead. Otherwise, you can omit this option.
The netCDF CLASSIC library takes several minutes to build. If the library installation process is successful, you will see this confirmation screen:
-------+---------+-------------------------------------
Config | Install | Package
-------+---------+-------------------------------------
-- | -- | zlib-1.2.6
-- | -- | hdf5-1.8.8
ok | ok | netcdf-4.2 (netCDF classic)
ok | ok | netcdf-fortran-4.2 (netCDF classic)
-------+---------+-------------------------------------
This tells you that the netCDF CLASSIC library was installed properly. The ZLIB and HDF5 libraries are not needed for netCDF CLASSIC, and are therefore not built. |
|