File _service:extract_file:hdf5.spec of Package phdf5-intel-impi (Revision 2e7a3f3f3f418727f97cb2c29f2108d4)
Currently displaying revision 2e7a3f3f3f418727f97cb2c29f2108d4 , Show latest
175
1
%define mpi_family impi
2
%define compiler_family intel
3
#----------------------------------------------------------------------------bh-
4
# This RPM .spec file is part of the OpenHPC project.
5
#
6
# It may have been modified from the default version supplied by the underlying
7
# release package (if available) in order to apply patches, perform customized
8
# build/install configurations, and supply additional files to support
9
# desired integration conventions.
10
#
11
#----------------------------------------------------------------------------eh-
12
13
# Build that is dependent on compiler/mpi toolchains
14
%define ohpc_compiler_dependent 1
15
%define ohpc_mpi_dependent 1
16
%include %{_sourcedir}/OHPC_macros
17
18
# Base package name
19
%define pname hdf5
20
21
Summary: A general purpose library and file format for storing scientific data
22
Name: p%{pname}-%{compiler_family}-%{mpi_family}%{PROJ_DELIM}
23
Version: 1.14.0
24
Release: 1%{?dist}
25
License: Hierarchical Data Format (HDF) Software Library and Utilities License
26
Group: %{PROJ_NAME}/io-libs
27
URL: http://www.hdfgroup.org/HDF5
28
29
Source0: https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/%{pname}-%{version}/src/%{pname}-%{version}.tar.bz2
30
31
BuildRequires: zlib-devel make
32
BuildRequires: perl(File::Compare)
33
BuildRequires: perl(File::Copy)
34
35
%if "%{compiler_family}" == "intel"
36
BuildRequires: libtool%{PROJ_DELIM}
37
%endif
38
39
#!BuildIgnore: post-build-checks rpmlint-Factory
40
41
# Default library install path
42
%define install_path %{OHPC_LIBS}/%{compiler_family}/%{mpi_family}/%{pname}/%version
43
44
%description
45
HDF5 is a general purpose library and file format for storing scientific data.
46
HDF5 can store two primary objects: datasets and groups. A dataset is
47
essentially a multidimensional array of data elements, and a group is a
48
structure for organizing objects in an HDF5 file. Using these two basic
49
objects, one can create and store almost any kind of scientific data
50
structure, such as images, arrays of vectors, and structured and unstructured
51
grids. You can also mix and match them in HDF5 files according to your needs.
52
53
%prep
54
%setup -q -n %{pname}-%{version}
55
56
%build
57
# override with newer config.guess for aarch64
58
%ifarch aarch64 || ppc64le
59
%if 0%{?rhel} >= 9
60
cp /usr/lib/rpm/redhat/config.guess bin
61
%else
62
cp /usr/lib/rpm/config.guess bin
63
%endif
64
%endif
65
66
# OpenHPC compiler/mpi designation
67
%ohpc_setup_compiler
68
69
export CC=mpicc
70
export CXX=mpicxx
71
export F77=mpif77
72
export FC=mpif90
73
export MPICC=mpicc
74
export MPIFC=mpifc
75
export MPICXX=mpicxx
76
77
%if "%{mpi_family}" == "impi" && "%{compiler_family}" == "gnu14"
78
# This is not really the perfect solution, but impi does not have
79
# the necessary files for gfortran 12. It seems to work with
80
# the files from gfortran 11.1.0.
81
export FCFLAGS="-I $MPI_DIR/include/mpi/gfortran/11.1.0 $FCFLAGS"
82
export FCFLAGS="$FCFLAGS -Wno-array-temporaries"
83
export CFLAGS="$CFLAGS -Wno-redundant-decls"
84
%endif
85
86
%if "%{compiler_family}" == "arm1"
87
# For some reason the flag '-lmpi"' has a double quote at the end.
88
# This tries to adapt the configure script to remove double quotes
89
# from the linker options.
90
%{__sed} -i -e 's,^ ac_cv_fc_libs="\$ac_cv_fc_libs $ac_arg, ac_cv_fc_libs="\$ac_cv_fc_libs \$(echo \$ac_arg | sed "s/\\"//g"),g' configure
91
%endif
92
93
%if "%{compiler_family}" == "intel"
94
export PATH=%{OHPC_UTILS}/autotools/bin:${PATH}
95
autoreconf -if
96
sed -e 's/NO_SYMBOLS_CFLAGS="-Wl,-s"/NO_SYMBOLS_CFLAGS=/g' -i config/intel-flags
97
sed -e 's/NO_SYMBOLS_CFLAGS="-Wl,-s"/NO_SYMBOLS_CFLAGS=/g' -i config/intel-cxxflags
98
# delete special flags no longer available
99
echo "" > config/intel-warnings/18
100
sed '/-Wp64/d' -i config/intel-warnings/15
101
%endif
102
103
./configure --prefix=%{install_path} \
104
--enable-fortran \
105
--enable-static=no \
106
--enable-parallel \
107
--enable-shared || { cat config.log && exit 1; }
108
109
%if "%{compiler_family}" == "llvm" || "%{compiler_family}" == "arm1"
110
%{__sed} -i -e 's#wl=""#wl="-Wl,"#g' libtool
111
%{__sed} -i -e 's#pic_flag=""#pic_flag=" -fPIC -DPIC"#g' libtool
112
%endif
113
114
make %{?_smp_mflags}
115
116
%install
117
118
# OpenHPC compiler designation
119
%ohpc_setup_compiler
120
121
export NO_BRP_CHECK_RPATH=true
122
123
make %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT install
124
125
# Remove static libraries
126
find "%buildroot" -type f -name "*.la" | xargs rm -f
127
128
# OpenHPC module file
129
%{__mkdir_p} %{buildroot}%{OHPC_MODULEDEPS}/%{compiler_family}-%{mpi_family}/p%{pname}
130
%{__cat} << EOF > %{buildroot}/%{OHPC_MODULEDEPS}/%{compiler_family}-%{mpi_family}/p%{pname}/%{version}
131
#%Module1.0#####################################################################
132
133
proc ModulesHelp { } {
134
135
puts stderr " "
136
puts stderr "This module loads the parallel %{pname} library built with the %{compiler_family} compiler"
137
puts stderr "toolchain and the %{mpi_family} MPI stack."
138
puts stderr "\nVersion %{version}\n"
139
140
}
141
module-whatis "Name: %{pname} built with %{compiler_family} compiler and %{mpi_family} MPI"
142
module-whatis "Version: %{version}"
143
module-whatis "Category: runtime library"
144
module-whatis "Description: %{summary}"
145
module-whatis "%{url}"
146
147
set version %{version}
148
149
prepend-path PATH %{install_path}/bin
150
prepend-path INCLUDE %{install_path}/include
151
prepend-path LD_LIBRARY_PATH %{install_path}/lib
152
153
setenv %{PNAME}_DIR %{install_path}
154
setenv %{PNAME}_LIB %{install_path}/lib
155
setenv %{PNAME}_BIN %{install_path}/bin
156
setenv %{PNAME}_INC %{install_path}/include
157
158
family "hdf5"
159
EOF
160
161
%{__cat} << EOF > %{buildroot}/%{OHPC_MODULEDEPS}/%{compiler_family}-%{mpi_family}/p%{pname}/.version.%{version}
162
#%Module1.0#####################################################################
163
##
164
## version file for %{pname}-%{version}
165
##
166
set ModulesVersion "%{version}"
167
EOF
168
169
%{__mkdir_p} ${RPM_BUILD_ROOT}/%{_docdir}
170
171
%files
172
%{OHPC_PUB}
173
%doc COPYING
174
%doc README.md
175