#!/bin/bash -l vpkg_require cmake/default openmpi/4.1.5:intel-oneapi-2023 PREFIX="${G_INSTALL_PREFIX}" CPU_GMX_SIMD=AVX2_256 BASE_BUILD_FLAGS=" -DCMAKE_BUILD_TYPE=Release -DGMX_SIMD=${CPU_GMX_SIMD} -DGMX_FFT_LIBRARY=mkl -DMKL_MPI=openmpi -DBUILD_SHARED_LIBS=OFF -DGMX_PREFER_STATIC_LIBS=ON " # BASE_BUILD_FLAGS="$BASE_BUILD_FLAGS -DGMX_GPU=SYCL" # -DMKL_INCLUDE_DIR=$MKLROOT/include # -DMKL_LIBRARIES=-mkl=sequential #" build_variant() { local DBL=$1 MPI=$2 local build_dir="" local build_flags="" if [ $DBL -ne 0 ]; then build_dir="double" build_flags="${build_flags} -DGMX_DOUBLE=on" else build_dir="single" build_flags="${build_flags} -DGMX_DOUBLE=off" fi if [ $MPI -eq 0 ]; then build_dir="${build_dir}-thread" build_flags="${build_flags} -DGMX_MPI=off -DGMX_THREAD_MPI=on -DCMAKE_DISABLE_FIND_PACKAGE_MPI=on" CC=icx CXX=icpx FC=ifx else build_dir="${build_dir}-mpi" build_flags="${build_flags} -DGMX_MPI=on -DGMX_THREAD_MPI=off" CC=mpicc CXX=mpicxx FC=mpifort fi [ -d "build-${build_dir}" ] && rm -rf "build-${build_dir}" mkdir "build-${build_dir}" ; pushd "build-${build_dir}" CC=$CC CXX=$CXX FC=$FC \ cmake \ -DCMAKE_INSTALL_PREFIX="${PREFIX}/${build_dir}" \ $BASE_BUILD_FLAGS $build_flags \ ../.. if [ $? -eq 0 ]; then make -j 20 if [ $? -eq 0 ]; then make install fi fi popd } ## ## SYCL only supports single precision. ## # DOUBLE? MPI? #build_variant 0 0 #build_variant 1 0 #build_variant 0 1 build_variant 1 1