#!/bin/bash # # Installation script for GPAW 1.5.2: # * Using the existing IntelPython3 module on the system which has an optimized # NumPy and SciPy included. # * Using the matching version of ase, 3.17.0 # * Compiling with the Intel compilers # # The FFT library is discovered at runtime. With the settings used in this script # this should be MKL FFT, but it is possible to change this at runtime to either # MKL, FFTW or the built-in NumPy FFT routines, see the installation instructions # (link below). # # The original installation instructions for GPAW can be found at # https://gitlab.com/gpaw/gpaw/-/blob/1.5.2/doc/install.rst # packageID='1.5.2-Python37icc-icc' install_root=$VSC_SCRATCH/UEABS systemID=CalcUA-vaughan-rome download_dir=$install_root/Downloads install_dir=$install_root/$systemID/Packages/GPAW-manual/$packageID modules_dir=$install_root/$systemID/Modules/GPAW-manual build_dir="/dev/shm/$USER/GPAW-manual/$packageID" patch_dir=$VSC_DATA/Projects/PRACE/GPAW-experiments/UEABS/build/patches libxc_version='4.3.4' cython_version='0.29.21' numpy_version='1.18.5' #numpy_version='1.19.2' scipy_version='1.4.1' #scipy_version='1.5.3' ase_version='3.17.0' GPAW_version='1.5.2' GPAWsetups_version='0.9.20000' # Check version on https://wiki.fysik.dtu.dk/gpaw/setups/setups.html py_maj_min='3.7' ################################################################################ # # Prepare the system # # # Load modules # module purge module load calcua/2020a module load personal/UEABS module load intel/2020a module load buildtools/2020a module load FFTW/3.3.8-intel-2020a module load Python/3.7.9-intel-2020a-Cfg5-UEABS-GPAW # # Create the directories and make sure they are clean if that matters # /usr/bin/mkdir -p $download_dir /usr/bin/mkdir -p $install_dir /usr/bin/rm -rf $install_dir /usr/bin/mkdir -p $install_dir /usr/bin/mkdir -p $modules_dir /usr/bin/mkdir -p $build_dir /usr/bin/rm -rf $build_dir /usr/bin/mkdir -p $build_dir ################################################################################ # # Download components # echo -e "\nDownloading files...\n" cd $download_dir # https://gitlab.com/libxc/libxc/-/archive/4.3.4/libxc-4.3.4.tar.bz2 libxc_file="libxc-$libxc_version.tar.bz2" libxc_url="https://gitlab.com/libxc/libxc/-/archive/$libxc_version" [[ -f $libxc_file ]] || wget "$libxc_url/$libxc_file" # We do not download Cython but simply install it using pip. # NumPy needs customizations, so we need to download and unpack the sources numpy_file="numpy-$numpy_version.zip" numpy_url="https://pypi.python.org/packages/source/n/numpy" [[ -f $numpy_file ]] || wget "$numpy_url/$numpy_file" # SciPy scipy_file="scipy-$scipy_version.tar.gz" scipy_url="https://pypi.python.org/packages/source/s/scipy" [[ -f $scipy_file ]] || wget "$scipy_url/$scipy_file" # We do not download ase in this script. As it is pure python and doesn't need # customization, we will install it using pip right away. ## https://files.pythonhosted.org/packages/d9/08/35969da23b641d3dfca46ba7559f651fcfdca81dbbc00b9058c934e75769/ase-3.17.0.tar.gz #ase_file="ase-$ase_version.tar.gz" #ase_url="https://files.pythonhosted.org/packages/d9/08/35969da23b641d3dfca46ba7559f651fcfdca81dbbc00b9058c934e75769" #[[ -f $ase_file ]] || wget "$ase_url/$ase_file" # GPAW needs customization, so we need to download and unpack the sources. # https://files.pythonhosted.org/packages/49/a1/cf54c399f5489cfdda1e8da02cae8bfb4b39d7cb7a895ce86608fcd0e1c9/gpaw-1.5.2.tar.gz GPAW_file="gpaw-$GPAW_version.tar.gz" GPAW_url="https://pypi.python.org/packages/source/g/gpaw" [[ -f $GPAW_file ]] || wget "$GPAW_url/$GPAW_file" # Download GPAW-setup, a number of setup files for GPAW. # https://wiki.fysik.dtu.dk/gpaw-files/gpaw-setups-0.9.20000.tar.gz GPAWsetups_file="gpaw-setups-$GPAWsetups_version.tar.gz" GPAWsetups_url="https://wiki.fysik.dtu.dk/gpaw-files" [[ -f $GPAWsetups_file ]] || wget "$GPAWsetups_url/$GPAWsetups_file" ################################################################################ # # Install libxc # echo -e "\nInstalling libxc...\n" cd $build_dir # Uncompress tar -xf $download_dir/$libxc_file cd libxc-$libxc_version # Configure autoreconf -i export CC=icc #export CFLAGS="-O2 -march=core-avx2 -mtune=core-avx2 -fPIC" export CFLAGS="-O2 -march=core-avx2 -mtune=core-avx2 -ftz -fp-speculation=safe -fp-model source -fPIC" #export CFLAGS="-O0 -march=core-avx2 -mtune=core-avx2 -ftz -fp-speculation=safe -fp-model source -fPIC" ./configure --prefix="$install_dir" \ --disable-static --enable-shared --disable-fortran # Build make -j 16 # Install make -j 16 install # Add bin, lib and include to the PATH variables PATH=$install_dir/bin:$PATH LIBRARY_PATH=$install_dir/lib:$LIBRARY_PATH LD_LIBRARY_PATH=$install_dir/lib:$LD_LIBRARY_PATH CPATH=$install_dir/include:$CPATH ################################################################################ # # Install Cython # echo -e "\nInstalling Cython...\n" /usr/bin/mkdir -p "$install_dir/lib/python$py_maj_min/site-packages" cd $install_dir /usr/bin/ln -s lib lib64 PYTHONPATH="$install_dir/lib/python$py_maj_min/site-packages" cd $build_dir pip3 install --prefix=$install_dir --no-deps cython==$cython_version ################################################################################ # # Install NumPy # echo -e "\nInstalling NumPy...\n" cd $build_dir # Uncompress unzip $download_dir/$numpy_file cd numpy-$numpy_version cat >site.cfg <customize.py <$packageID.lua <