使用 GCC 4.7 和 OpenMPI 构建 HDF5

使用 GCC 4.7 和 OpenMPI 构建 HDF5

我正在尝试从二进制文件安装带有 GCC 4.7 的 hdf5,因为我没有 root 权限,在使用 CentOS 版本 5.6(AMD64 位)的计算机上使用以下脚本:

module purge
module unload Parallel/openmpi-1.4.3
module load Compilateurs/gnu
module load Compilateurs/gnu-4.7
module load Parallel/openmpi-1.6.5

export  CC=/share/apps/openmpi/1.6.5/gnu-4.7/bin/mpicc
export  FC=/share/apps/openmpi/1.6.5/gnu-4.7/bin/mpif90
export CXX=/share/apps/openmpi/1.6.5/gnu-4.7/bin/mpicxx

export MPICC="/share/apps/gcc/bin/gcc"
export MPIF90="/share/apps/gcc/bin/gfortran"
export MPICCC="/share/apps/gcc/bin/gc++"

export   CFLAGS="-O3 -march=native -funroll-loops -I$MPIHOME/include"
export  FCFLAGS="-O3 -march=native -funroll-loops -I$MPIHOME/include"
export CXXFLAGS="-O3 -march=native -funroll-loops -I$MPIHOME/include"
export   CFLAGS="-O3 -march=native -funroll-loops -I$MPIHOME/include"
export LDFLAGS=""
export LD_LIBRARY_PATH="/share/apps/gcc/4.7/lib64:$MPIHOME/lib:$LD_LIBRARY_PATH"

mkdir -p hdf5/build
mkdir -p hdf5/bin
cp hdf5-1.8.12.tar.gz hdf5/build
cd hdf5/build
rm -r hdf5-1.8.12
tar -xf hdf5-1.8.12.tar.gz
cd hdf5-1.8.12
mkdir build
cd build
../configure --prefix='/home/isolak01/hdf5/bin' --enable-static --disable-shared --enable-fortran --enable-parallel
make -j8
make install

但我收到以下错误:

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
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking shell variables initial values... done
checking if basename works... yes
checking if xargs works... yes
checking for cached host... none
checking for config x86_64-unknown-linux-gnu... no
checking for config x86_64-unknown-linux-gnu... no
checking for config unknown-linux-gnu... no
checking for config unknown-linux-gnu... no
checking for config x86_64-linux-gnu... no
checking for config x86_64-linux-gnu... no
checking for config x86_64-unknown... no
checking for config linux-gnu... found
compiler '/share/apps/openmpi/1.6.5/gnu-4.7/bin/mpicc' is GNU gcc-4.7.3
CC_BASENAME is mpicc.
No match to get fc_version_info for /share/apps/openmpi/1.6.5/gnu-4.7/bin/mpif90
No match to get cxx_version_info for /share/apps/openmpi/1.6.5/gnu-4.7/bin/mpicxx
checking for config ../config/site-specific/host-mc2p-login0.local... no
checking for config ../config/site-specific/host-local... no
checking for gcc... /share/apps/openmpi/1.6.5/gnu-4.7/bin/mpicc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /share/apps/openmpi/1.6.5/gnu-4.7/bin/mpicc accepts -g... yes
checking for /share/apps/openmpi/1.6.5/gnu-4.7/bin/mpicc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of /share/apps/openmpi/1.6.5/gnu-4.7/bin/mpicc... gcc3
checking if unsupported combinations of configure options are allowed... no
checking if Fortran interface enabled... yes
checking if Fortran 2003 interface enabled... yes
checking whether we are using the GNU Fortran compiler... no
checking whether /share/apps/openmpi/1.6.5/gnu-4.7/bin/mpif90 accepts -g... yes
checking for Fortran flag to compile .f90 files... unknown
configure: error: Fortran could not compile .f90 files
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.

我哪里出错了?Fortran 标志有错误吗?

有没有文档喜欢这是针对 (GNU) GCC 4.7 而不是 Intel 的吗?

相关内容