*On 06/26/2017 01:42 AM, ashwin .D wrote:*
I already have an existing installation of HDF5 1.8.17 compiled
with gfortran. Now for another project on the same machine I need
to compile with PGI compilers i.e. pgcc , pgc++and pgf90. The
installation directory will be separate as well i.e.
/opt/local/lib and /opt/local/include.
Ashwin -- here's a script that I use to build HDF5 1.10.1 using the PGI
17.5 compiler.
You might try testing with these components first to see if you can get
it to build, and then go backlevel on the pieces that you want to use.
-- Carl
------------------------------------------------------------------------
This is how I try to build hdf5
CPPFLAGS=/opt/local/include CXXFLAGS=/opt//local/include
LDFLAGS=/opt//local/lib CC=pgcc CXX=pgc++ FC=pgf90 F77=pgf77
./configure --prefix=/opt/local --with-zlib=/opt/local
--enable-fortran --enable-cxx.
and when I try doing this I get this error message -
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... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) 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 'pgcc' is PGI pgcc-17.4-0
compiler 'pgf90' is PGI pgf90-17.4-0
No match to get cxx_version_info for pgc++
checking for config ./config/site-specific/host-Vostro-3800... no
checking for gcc... pgcc
checking whether the C compiler works... no
configure: error: in `/home//hdf5-1.8.17':
configure: error: C compiler cannot create executables
See `config.log' for more details
Any suggestions on how to build will be appreciated.
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may
contain
confidential information. Any unauthorized review, use, disclosure or
distribution
is prohibited. If you are not the intended recipient, please contact the
sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
#
# Unpack the distribution tarball.
#
rm -Rf distro bin include lib share
mkdir -p distro
FILE1=../*.tar.bz2 #
Bzip'd tar-file.
FILE2=../*.tar.xz # XZ'd
tar-file.
FILE3=../*.tar.gz #
GZip'd tar-file.
FILE4=../*.tgz #
GZip'd tar-file.
FILE5=../*.tar # Plain
tar-file.
FILE6=../*.zip # Zip
archive.
if [ -f $FILE1 ]
then
tar -C distro --strip-components=1 -xjvf $FILE1
elif [ -f $FILE2 ]
then
tar -C distro --strip-components=1 -xJvf $FILE2
elif [ -f $FILE3 ]
then
tar -C distro --strip-components=1 -xzvf $FILE3
elif [ -f $FILE4 ]
then
tar -C distro --strip-components=1 -xzvf $FILE4
elif [ -f $FILE5 ]
then
tar -C distro --strip-components=1 -xvf $FILE5
elif [ -f $FILE6 ]
then
unzip $FILE6 -d distro
fi
#
# Set up the build environment.
#
source $MODULESHOME/init/bash # This is essential for the
"module" command to work inside a script.
module () #
Re-define the operation to be *quiet* with xtrace enabled.
{ set +o xtrace; eval `modulecmd bash $*`; set -o xtrace; }
module purge
# Clear-out the old environment.
# module load use.own
# module load nvidia-only
# Have to load this *before* the bundle.
# module load junkpile
# module load PrgEnv/PGI+OpenMPI/2016-11-14 # Based on
pgi/16.10.
# module load PrgEnv/PGI+OpenMPI/2017-04-26 # Based on
pgi/17.4.
module load PrgEnv/PGI+OpenMPI/2017-05-24 # Based on
pgi/17.5.
# module load slurm
module load cuda
module load pgi
module load szip
module load zlib
module load openmpi
module list # Diagnostic.
#
# Make the explicit configuration settings for the build.
#
# export CC=`which pgcc` # Extract the
components from the environment we just built.
# export CXX=`which pgCC`
# export F77=`which pgf77`
# export F90=`which pgf90`
# export FC=`which pgfortran`
export CC=`which mpicc` # Extract the
components from the environment we just built.
export CXX=`which mpicxx`
# export CXX=`which mpic++`
export FC=`which mpifort`
PREFIXPATH=$PWD
export CFLAGS="-fPIC -m64 -tp=px" # These allow the utilities to
run on any node (IvyBridge etc.).
export CXXFLAGS="-fPIC -m64 -tp=px"
export FCFLAGS="-fPIC -m64 -tp=px"
FLAGS=""
FLAGS+=" --mandir=$PREFIXPATH/share/man"
FLAGS+=" --with-szlib=$SZIP"
FLAGS+=" --enable-threadsafe"
FLAGS+=" --enable-parallel"
FLAGS+=" --enable-cxx"
FLAGS+=" --enable-fortran --enable-fortran2003"
FLAGS+=" --enable-unsupported" # This makes the language
interfaces work with the threadsafe.
# Hopefully we can get rid of this with an upcoming release.
#
# Now start the build.
#
pushd distro
# patch -p0 < ../../file-lock-removal.diff
# Apply the file-locking patch.
set +e # This
usually fails on an initial install because there are
make -s clean # no residual
files to clean up. That's ok, we just suspend the
set -e #
abort-on-error setting for now.
./configure --prefix=$PREFIXPATH $FLAGS
make
make install
set +e # Get
the checking to continue-past any internal errors.
make check-install # Check that
the pieces are in the right places.
popd
#
# Run the available diagnostics, for validation.
#
export HDF5_ALARM_SECONDS=180 # Reduce timeout for bad case.
export MPIEXEC_TIMEOUT=360 # Give HDF5 a chance to
timeout, then have MPI time out.
pushd distro
date
set +e
make -i -k check # Make sure it
runs right. Use -i so it continues past erroneous cases.
set -e
date
popd
#
# Show what we built.
#
ls -C -T 4 | expand -t 4 - # Look at the directory
contents.
ls -C -T 4 */ | expand -t 4 - # And the
subdirectories as well.
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5