Skip to content

Commit

Permalink
Merge pull request #46 from deslaughter/win-oneapi
Browse files Browse the repository at this point in the history
Attempt to build OpenFAST on Windows using Intel oneAPI
  • Loading branch information
gbarter authored Dec 11, 2023
2 parents 19747cc + 719ed29 commit e37389b
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 43 deletions.
6 changes: 4 additions & 2 deletions .ci_support/win_64_.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
c_compiler:
- vs2019
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
openblas:
- 0.3.*
cxx_compiler:
- vs2019
target_platform:
- win-64
2 changes: 1 addition & 1 deletion .github/CODEOWNERS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 20 additions & 16 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
@echo on

mkdir build
cd build
curl.exe --output webimage.exe --url https://registrationcenter-download.intel.com/akdlm/IRC_NAS/62641e01-1e8d-4ace-91d6-ae03f7f8a71f/w_BaseKit_p_2024.0.0.49563_offline.exe
start /b /wait webimage.exe -s -x -f webimage_extracted --log extract.log
del webimage.exe
webimage_extracted\bootstrapper.exe -s --action install --components=intel.oneapi.win.mkl.devel --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=.

curl.exe --output webimage2.exe --url https://registrationcenter-download.intel.com/akdlm/IRC_NAS/5b36181e-4974-4733-91c7-0c10c54900a5/w_HPCKit_p_2024.0.0.49588_offline.exe
start /b /wait webimage2.exe -s -x -f webimage2_extracted --log extract.log
del webimage2.exe
webimage2_extracted\bootstrapper.exe -s --action install --components=intel.oneapi.win.ifort-compiler --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=.

set LDFLAGS="-static"
@call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"

mkdir build

cmake ^
-S %SRC_DIR% ^
-B . ^
-G "MinGW Makefiles" ^
-B build ^
-G "Ninja" ^
-DCMAKE_BUILD_TYPE="Release" ^
-DDOUBLE_PRECISION=OFF ^
-DBLA_VENDOR=OpenBLAS ^
-DBLA_STATIC=ON ^
-DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DBUILD_FASTFARM=ON ^
-DCMAKE_C_COMPILER=gcc.exe ^
-DCMAKE_CXX_COMPILER=g++.exe ^
-DCMAKE_Fortran_COMPILER=gfortran.exe
-DCMAKE_Fortran_COMPILER=ifort ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
-DBLA_STATIC=ON ^
-DDOUBLE_PRECISION=OFF ^
-DBUILD_FASTFARM=ON
if errorlevel 1 exit /b 1

cmake --build . -j 2
cmake --build build --target install -j %CPU_COUNT%
if errorlevel 1 exit /b 1

cmake --install .
if errorlevel 1 exit /b 1
17 changes: 7 additions & 10 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
#!/bin/bash

if [[ "$CONDA_BUILD_CROSS_COMPILATION" == 1 && $target_platform == "osx-arm64" ]]; then
export LDFLAGS="${LDFLAGS:-} -lquadmath"
fi

mkdir build
cd build

cmake \
-S ${SRC_DIR} \
-B . \
-DDOUBLE_PRECISION=OFF \
-B build \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DBUILD_FASTFARM=ON \
-DDOUBLE_PRECISION=OFF \
-DBLA_VENDOR=OpenBLAS \
-DBLA_STATIC=ON
-DBLA_STATIC=ON \
-DBUILD_FASTFARM=ON

make -j"${CPU_COUNT}" install
cmake --build build --target install -j ${CPU_COUNT}
23 changes: 10 additions & 13 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,24 @@ source:
git_depth: 1 # (Defaults to -1/not shallow)

build:
number: 2
number: 3
missing_dso_whitelist:
- "*/libopenfastlib.dll" # [win]
- "*/libiomp5md.dll" # [win]

requirements:
build:
- {{ compiler('c') }} # [not win]
- {{ compiler('cxx') }} # [not win]
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('fortran') }} # [not win]
- make # [not win]
- cmake
- llvm-openmp # [osx]
- make # [not win]
- ninja # [win]
host:
- openblas
- ucrt # [win]
- libgomp # [linux or win]
- libgomp # [linux]
- openblas # [not win]
run:
- libopenblas # [win]
- ucrt # [win]
- libgomp # [linux or win]
- intel-openmp =2024.0.0 # [win]

test:
commands:
Expand All @@ -53,8 +51,7 @@ about:

extra:
recipe-maintainers:
- rafmudaf
- openfast
- andrew-platt
- deslaughter
- gbarter
- andrew-platt

0 comments on commit e37389b

Please sign in to comment.