Skip to content

Commit

Permalink
Added support for libmed. Regenerated documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
hfp committed Aug 26, 2021
1 parent f677ae6 commit 6df1ae8
Show file tree
Hide file tree
Showing 9 changed files with 415 additions and 0 deletions.
36 changes: 36 additions & 0 deletions config/libmed/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Med File Library

To [download](https://salome-platform.org/downloads/), configure, build, and install libmed, one may proceed as shown below.

```bash
wget --no-check-certificate https://files.salome-platform.org/Salome/other/med-4.1.0.tar.gz
tar xvf med-4.1.0.tar.gz
cd med-4.1.0

wget --no-check-certificate https://github.com/hfp/xconfigure/raw/master/configure-get.sh
chmod +x configure-get.sh
./configure-get.sh libmed
```

Please make the intended compiler available on the command line. For instance, many HPC centers rely on `module load`.

```bash
source /opt/intel/compilers_and_libraries_2020.4.304/linux/bin/compilervars.sh intel64
```

**Note**: Please make the "hdf5-tools" command available, or pay attention to the console output after configuring libmed. In general, an HDF5 development package is necessary to pass the default configuration as implemented by XCONFIGURE. One can adjust the configure wrapper script for custom-built HDF5 by pointing to an (non-default) installation location.

For example, to configure and make for an Intel Xeon Scalable processor ("SKX"):

```bash
make distclean
./configure-med-skx.sh
make -j; make install
```

## References

[https://salome-platform.org/downloads/](https://salome-platform.org/downloads/)
[http://wiki.opentelemac.org/doku.php?id=installation_linux_med](http://wiki.opentelemac.org/doku.php?id=installation_linux_med)
[http://opentelemac.org/](http://opentelemac.org/)

61 changes: 61 additions & 0 deletions config/libmed/configure-libmed-gnu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/env bash
###############################################################################
# Copyright (c) Intel Corporation - All rights reserved. #
# This file is part of the XCONFIGURE project. #
# #
# For information on the license, see the LICENSE file. #
# Further information: https://github.com/hfp/xconfigure/ #
# SPDX-License-Identifier: BSD-3-Clause #
###############################################################################
# Hans Pabst (Intel Corp.)
###############################################################################

if [ "" = "$1" ]; then PRFX=gnu; else PRFX=$1; shift; fi
HERE=$(cd $(dirname $0); pwd -P)
DEST=${HERE}/../libmed/${PRFX}

if [ ! -e ${HERE}/configure.ac ] || [ "${HERE}" != "$(pwd -P)" ]; then
echo "Error: XCONFIGURE scripts must be located and executed in the application folder!"
exit 1
fi

if [ "${HERE}" = "${DEST}" ]; then
echo "Warning: LIBMED source directory equals installation folder!"
read -p "Are you sure? Y/N" -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi

CONFOPTS=""
TARGET="-march=native"

export FLAGS="-O3 ${TARGET}"
export LDFLAGS=""
export CFLAGS="${FLAGS}"
export CXXFLAGS="${FLAGS}"
export FCFLAGS="${FLAGS}"

export AR="gcc-ar"
export FC="mpif90"
export CC="mpicc"
export CXX="mpicxx"
export F77=${FC}
export F90=${FC}

export MPICC=${CC}
export MPIFC=${FC}
export MPIF77=${F77}
export MPICXX=${CXX}

libtoolize
aclocal
#autoheader
#automake -a
autoconf

./configure \
--prefix=${DEST} ${CONFOPTS} \
--host=x86_64-unknown-linux-gnu \
$*

61 changes: 61 additions & 0 deletions config/libmed/configure-libmed-hsw-gnu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/env bash
###############################################################################
# Copyright (c) Intel Corporation - All rights reserved. #
# This file is part of the XCONFIGURE project. #
# #
# For information on the license, see the LICENSE file. #
# Further information: https://github.com/hfp/xconfigure/ #
# SPDX-License-Identifier: BSD-3-Clause #
###############################################################################
# Hans Pabst (Intel Corp.)
###############################################################################

if [ "" = "$1" ]; then PRFX=gnu-; else PRFX=$1-; shift; fi
HERE=$(cd $(dirname $0); pwd -P)
DEST=${HERE}/../libmed/${PRFX}hsw

if [ ! -e ${HERE}/configure.ac ] || [ "${HERE}" != "$(pwd -P)" ]; then
echo "Error: XCONFIGURE scripts must be located and executed in the application folder!"
exit 1
fi

if [ "${HERE}" = "${DEST}" ]; then
echo "Warning: LIBMED source directory equals installation folder!"
read -p "Are you sure? Y/N" -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi

CONFOPTS=""
TARGET="-march=core-avx2"

export FLAGS="-O3 ${TARGET}"
export LDFLAGS=""
export CFLAGS="${FLAGS}"
export CXXFLAGS="${FLAGS}"
export FCFLAGS="${FLAGS}"

export AR="gcc-ar"
export FC="mpif90"
export CC="mpicc"
export CXX="mpicxx"
export F77=${FC}
export F90=${FC}

export MPICC=${CC}
export MPIFC=${FC}
export MPIF77=${F77}
export MPICXX=${CXX}

libtoolize
aclocal
#autoheader
#automake -a
autoconf

./configure \
--prefix=${DEST} ${CONFOPTS} \
--host=x86_64-unknown-linux-gnu \
$*

65 changes: 65 additions & 0 deletions config/libmed/configure-libmed-hsw.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env bash
###############################################################################
# Copyright (c) Intel Corporation - All rights reserved. #
# This file is part of the XCONFIGURE project. #
# #
# For information on the license, see the LICENSE file. #
# Further information: https://github.com/hfp/xconfigure/ #
# SPDX-License-Identifier: BSD-3-Clause #
###############################################################################
# Hans Pabst (Intel Corp.)
###############################################################################

if [ "" = "$1" ]; then PRFX=intel-; else PRFX=$1-; shift; fi
HERE=$(cd $(dirname $0); pwd -P)
DEST=${HERE}/../libmed/${PRFX}hsw

if [ ! -e ${HERE}/configure.ac ] || [ "${HERE}" != "$(pwd -P)" ]; then
echo "Error: XCONFIGURE scripts must be located and executed in the application folder!"
exit 1
fi

if [ "${HERE}" = "${DEST}" ]; then
echo "Warning: LIBMED source directory equals installation folder!"
read -p "Are you sure? Y/N" -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi

CONFOPTS=""
TARGET="-xCORE-AVX2"

# consider more accurate FP-model
#FPCMODEL = -fp-model precise
#FPFMODEL = -fp-model source

export FLAGS="-O2 ${TARGET}" #-ipo-separate
export LDFLAGS=""
export CFLAGS="${FLAGS} ${FPCMODEL}"
export CXXFLAGS="${FLAGS} ${FPCMODEL}"
export FCFLAGS="${FLAGS} ${FPFMODEL} -align array64byte"

export AR="xiar"
export FC="mpiifort"
export CC="mpiicc"
export CXX="mpiicpc"
export F77=${FC}
export F90=${FC}

export MPICC=${CC}
export MPIFC=${FC}
export MPIF77=${F77}
export MPICXX=${CXX}

libtoolize
aclocal
#autoheader
#automake -a
autoconf

./configure \
--prefix=${DEST} ${CONFOPTS} \
--host=x86_64-unknown-linux-gnu \
$*

61 changes: 61 additions & 0 deletions config/libmed/configure-libmed-skx-gnu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/env bash
###############################################################################
# Copyright (c) Intel Corporation - All rights reserved. #
# This file is part of the XCONFIGURE project. #
# #
# For information on the license, see the LICENSE file. #
# Further information: https://github.com/hfp/xconfigure/ #
# SPDX-License-Identifier: BSD-3-Clause #
###############################################################################
# Hans Pabst (Intel Corp.)
###############################################################################

if [ "" = "$1" ]; then PRFX=gnu-; else PRFX=$1-; shift; fi
HERE=$(cd $(dirname $0); pwd -P)
DEST=${HERE}/../libmed/${PRFX}skx

if [ ! -e ${HERE}/configure.ac ] || [ "${HERE}" != "$(pwd -P)" ]; then
echo "Error: XCONFIGURE scripts must be located and executed in the application folder!"
exit 1
fi

if [ "${HERE}" = "${DEST}" ]; then
echo "Warning: LIBMED source directory equals installation folder!"
read -p "Are you sure? Y/N" -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi

CONFOPTS=""
TARGET="-mavx512f -mavx512cd -mavx512dq -mavx512bw -mavx512vl -mfma"

export FLAGS="-O3 ${TARGET}"
export LDFLAGS=""
export CFLAGS="${FLAGS}"
export CXXFLAGS="${FLAGS}"
export FCFLAGS="${FLAGS}"

export AR="gcc-ar"
export FC="mpif90"
export CC="mpicc"
export CXX="mpicxx"
export F77=${FC}
export F90=${FC}

export MPICC=${CC}
export MPIFC=${FC}
export MPIF77=${F77}
export MPICXX=${CXX}

libtoolize
aclocal
#autoheader
#automake -a
autoconf

./configure \
--prefix=${DEST} ${CONFOPTS} \
--host=x86_64-unknown-linux-gnu \
$*

65 changes: 65 additions & 0 deletions config/libmed/configure-libmed-skx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env bash
###############################################################################
# Copyright (c) Intel Corporation - All rights reserved. #
# This file is part of the XCONFIGURE project. #
# #
# For information on the license, see the LICENSE file. #
# Further information: https://github.com/hfp/xconfigure/ #
# SPDX-License-Identifier: BSD-3-Clause #
###############################################################################
# Hans Pabst (Intel Corp.)
###############################################################################

if [ "" = "$1" ]; then PRFX=intel-; else PRFX=$1-; shift; fi
HERE=$(cd $(dirname $0); pwd -P)
DEST=${HERE}/../libmed/${PRFX}skx

if [ ! -e ${HERE}/configure.ac ] || [ "${HERE}" != "$(pwd -P)" ]; then
echo "Error: XCONFIGURE scripts must be located and executed in the application folder!"
exit 1
fi

if [ "${HERE}" = "${DEST}" ]; then
echo "Warning: LIBMED source directory equals installation folder!"
read -p "Are you sure? Y/N" -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi

CONFOPTS=""
TARGET="-xCORE-AVX512 -qopt-zmm-usage=high"

# consider more accurate FP-model
#FPCMODEL = -fp-model precise
#FPFMODEL = -fp-model source

export FLAGS="-O2 ${TARGET}" #-ipo-separate
export LDFLAGS=""
export CFLAGS="${FLAGS} ${FPCMODEL}"
export CXXFLAGS="${FLAGS} ${FPCMODEL}"
export FCFLAGS="${FLAGS} ${FPFMODEL} -align array64byte"

export AR="xiar"
export FC="mpiifort"
export CC="mpiicc"
export CXX="mpiicpc"
export F77=${FC}
export F90=${FC}

export MPICC=${CC}
export MPIFC=${FC}
export MPIF77=${F77}
export MPICXX=${CXX}

libtoolize
aclocal
#autoheader
#automake -a
autoconf

./configure \
--prefix=${DEST} ${CONFOPTS} \
--host=x86_64-unknown-linux-gnu \
$*

Loading

0 comments on commit 6df1ae8

Please sign in to comment.