Skip to content
Snippets Groups Projects
Commit 2f70bf83 authored by Andreas Korpi-Lagg's avatar Andreas Korpi-Lagg
Browse files

added swan compile script

parent 3adcb0f5
Branches
Tags
No related merge requests found
......@@ -20,7 +20,7 @@ DISLINSUB=""
AC_CHECK_SIZEOF([long])
# set fortran compiler
AC_LANG([Fortran])
AC_PROG_FC(ifort gfortran,[])
AC_PROG_FC(ifx ifort gfortran,[])
#AC_FC_PP_DEFINE
#PP=$FC_DEFINE
......@@ -45,7 +45,15 @@ AC_PREFIX_DEFAULT(`pwd`)
# Check MPI first. This might overwrite FC
OMPI_FC=$FC
MPIFC=""
case $FC in
*ifort|*ifx)
MPIFC="mpi$FC"
;;
*)
MPIFC=""
;;
esac
AC_MSG_NOTICE([MPI Fortran compiler: $MPIFC])
MPICC=""
PP="-D"
AC_ARG_WITH([mpi],
......@@ -54,49 +62,52 @@ AC_ARG_WITH([mpi],
[])
if test "x$with_mpi" != "x" ; then
if test "x$with_mpi" = xyes ; then
AC_PATH_PROG(mpiprog,mpifort)
if test "x$mpiprog" == "x" ; then
AC_PATH_PROG(mpiprog,$MPIFC)
if test "x$mpiprog" == "x" ; then
with_mpi="/opt/mpich-3"
else
with_mpi=$(echo $mpiprog |awk -F"/bin/mpifort" '{print $1}')
fi
#check if openmpi or mvapich
openmpi=$(echo $mpiprog | grep openmpi)
mvapich=$(echo $mpiprog | grep mvapich)
if test "x$openmpi" != "x0" ;then
MPILIB="-lmpi"
elif test "x$mvapich" != "x0" ;then
MPILIB="-lmpich"
with_mpi=$(echo $mpiprog |awk -F"/bin/$MPIFC" '{print $1}')
fi
# #check if openmpi or mvapich
# openmpi=$(echo $mpiprog | grep openmpi)
# mvapich=$(echo $mpiprog | grep mvapich)
# # if test "x$openmpi" != "x0" ;then
# # MPILIB="-lmpi"
# if test "x$mvapich" != "x0" ;then
# MPILIB="-lmpich"
# else
# MPILIB="-lmpi"
# fi
MPILIB="-lmpi"
fi
AC_CHECK_FILE([${with_mpi}/bin/mpifort], [],
AC_MSG_ERROR([mpifort compiler not found.]))
AC_CHECK_FILE([${with_mpi}/bin/$MPIFC], [],
AC_MSG_ERROR($MPIFC compiler not found.))
AC_MSG_NOTICE([MPI version])
PPFLAGS=$PPFLAGS" "$PP"MPI"
LPATH=$LPATH" -L$with_mpi/lib "
IPATH=$IPATH" -I$with_mpi/include "
HELIBS=$HELIBS" "$MPILIB
MPIFC=$with_mpi/bin/mpifort
MPIFC=$with_mpi/bin/$MPIFC
MPICC=$with_mpi/bin/mpicc
EXEADD=".mpi"
#check if mpifort is using gfortran or ifort
impi=$($MPIFC --version | grep ifort)
gmpi=$($MPIFC --version | grep GNU )
FCOLD=$FC
if test "x$impi" != "x" ;then
AC_MSG_NOTICE([MPI COMPILER: $impi])
FC=ifort
elif test "x$gmpi" != "x" ;then
AC_MSG_NOTICE([MPI COMPILER: $gmpi])
FC=gfortran
else
AC_MSG_ERROR([MPI version uses unknown compiler (only ifort or gfortran supported).])
fi
if test "$FCOLD" != "$FC" ;then
AC_MSG_NOTICE([Changed fortran compiler: Using $FC])
AC_LANG([Fortran])
AC_PROG_FC($FC)
fi
# #check if mpifort is using gfortran or ifort
# impi=$($MPIFC --version | grep $FC)
# gmpi=$($MPIFC --version | grep GNU )
# FCOLD=$FC
# if test "x$impi" != "x" ;then
# AC_MSG_NOTICE([MPI COMPILER: $impi])
# FC=ifort
# elif test "x$gmpi" != "x" ;then
# AC_MSG_NOTICE([MPI COMPILER: $gmpi])
# FC=gfortran
# else
# AC_MSG_ERROR([MPI version uses unknown compiler (only ifort or gfortran supported).])
# fi
# if test "$FCOLD" != "$FC" ;then
# AC_MSG_NOTICE([Changed fortran compiler: Using $FC])
# AC_LANG([Fortran])
# AC_PROG_FC($FC)
# fi
fi
AC_MSG_NOTICE([Using fortran Compiler: $FC])
......@@ -115,7 +126,7 @@ esac],
# optimization flags
AC_MSG_CHECKING(optimization and preprocessing flags)
case $FC in
*ifort)
*ifort|*ifx)
AR="ar"
# OPTFLAGS="-O2 -save"
if $debug ;then
......@@ -125,7 +136,7 @@ case $FC in
OPTFLAGS="-O3"
fi
PPCMD="-fpp"
EXEADD=".intel"$EXEADD
EXEADD=".$FC"$EXEADD
PPFLAGS=$PPFLAGS" "$PP"INTEL"
DISLINSUB="ifc"
;;
......@@ -259,6 +270,7 @@ if test "$fitsio" != "1" ; then
AC_MSG_NOTICE([CFITSIO Include: $with_cfitsio_include_path])
fi
module load openmpi_gcc
AC_PROG_RANLIB
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
#!/bin/bash
IDIR=$1
SRCDIR=$(pwd)
echo shell-script to perform network-installation of helix.
if [ -z $IDIR ] ;then
echo "script for a network install of HeLIx+ on MPS computers."
echo "Usage: "
echo "net_install "$HOME/helix
echo " -> this will install HeLIx+ to "$HOME/helix
echo " by creating links to the distribution directory /data/slam/software/helix"
exit
fi
IDIR=$IDIR
read -n 1 -p "Installing helix to "$IDIR" - Press Y to continue " cont
echo
[ -z $cont ] && { exit ; }
[ $cont != 'Y' ] && [ $cont != 'y' ] && { exit ; }
echo
echo Source-directory: $SRCDIR
echo
echo Creating directory $IDIR
mkdir -p $IDIR
cd $IDIR
echo
echo Creating symbolic links:
links=( "bin" "idlpro" "fortran" "docu" "ilib_lagg" "run" "sample_data" "idl.so" "gitrevision" )
for link in ${links[*]} ;do
echo $SRCDIR/$link "->" $link
rm -f $link
ln -sf $SRCDIR/$link $link
done
echo
echo Copy and sync user directories:
user_dirs=( "input" "wgt" "atom" "convolve" )
for dir in ${user_dirs[*]} ;do
echo Creating and syncing directory $dir
mkdir -p $dir
rsync -tl --exclude=*/*~ $SRCDIR/$dir/* $dir/
done
echo
echo Create input and output directories
io_dirs=( "ps" "sav" "atm_archive" "profile_archive" )
for dir in ${io_dirs[*]} ;do
echo Creating input / output directory $dir
mkdir -p $dir
done
echo Installation finished.
......@@ -4,15 +4,25 @@
#make sure to have the latest version
git pull
module load intel openmpi_intel dislin cfitsio
# # setup for bob
# module load intel openmpi_intel dislin cfitsio
# # setup for swan cluster
module load GCC/12.3.0 OpenMPI/4.1.5 CFITSIO/4.3.0
module load intel/2024a
module load Autoconf
autoconf
cfitsio=/opt/local/cfitsio/cfitsio-3.350
dislin=/opt/local/dislin
motif=/usr/lib64
cfitsio=/sw/eb/CFITSIO/4.3.0-GCCcore-12.3.0
dislin=
motif=
#create ifort version with X11
./configure FC=ifort --with-dislin=$dislin --with-cfitsio=$cfitsio --with-openmotif=$motif
./configure FC=ifx --with-dislin=$dislin --with-cfitsio=$cfitsio --with-openmotif=$motif
make clean all install
#create ifort MPI version
./configure FC=ifx --with-mpi --with-cfitsio=$cfitsio
make clean all install
#create gfortran version with X11
......@@ -24,13 +34,8 @@ make clean all install
make clean all install
#create gfortran MPI version
module unload intel openmpi_intel
module load openmpi_gcc
# module unload intel openmpi_intel
# module load openmpi_gcc
./configure FC=gfortran --with-mpi --with-cfitsio=$cfitsio
make clean all install
#create ifort MPI version
module unload openmpi_gcc
module load intel openmpi_intel
./configure FC=ifort --with-mpi --with-cfitsio=$cfitsio
make clean all install
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment