Browse Source

Updated build scripts and recipe

lon0
Bill Ladwig 7 years ago
parent
commit
dd188359a4
  1. 12
      build_scripts/gnu_no_omp.sh
  2. 12
      build_scripts/gnu_omp.sh
  3. 21
      build_scripts/win_mingw_no_omp.bat
  4. 18
      build_scripts/win_mingw_omp.bat
  5. 21
      build_scripts/win_msvc_mingw_no_omp.bat
  6. 17
      build_scripts/win_msvc_mingw_omp.bat
  7. 9
      conda_recipe/bld.bat
  8. 8
      conda_recipe/build.sh
  9. 20
      conda_recipe/meta.yaml
  10. 58
      conda_recipe/meta.yaml.develop
  11. 58
      conda_recipe/meta.yaml.release

12
build_scripts/gnu_no_omp.sh

@ -4,5 +4,17 @@ cd ../fortran @@ -4,5 +4,17 @@ cd ../fortran
gfortran -E ompgen.F90 -cpp -o omp.f90
f2py *.f90 -m _wrffortran -h wrffortran.pyf --overwrite-signature
cd ..
if [$CONDA_BUILD == 1]
if [ `uname` == Darwin ]; then
LDFLAGS="$LDFLAGS -undefined dynamic_lookup -bundle"
fi
$PYTHON setup.py clean --all
$PYTHON setup.py config_fc --f90flags="-mtune=generic" build_ext build
$PYTHON setup.py install --single-version-externally-managed --record=record.txt
else
python setup.py clean --all
python setup.py config_fc --f90flags="-mtune=generic" build_ext build
pip install .
fi

12
build_scripts/gnu_omp.sh

@ -4,6 +4,18 @@ cd ../fortran @@ -4,6 +4,18 @@ cd ../fortran
gfortran -E ompgen.F90 -fopenmp -cpp -o omp.f90
f2py *.f90 -m _wrffortran -h wrffortran.pyf --overwrite-signature
cd ..
if [$CONCDA_BUILD == 1]
if [ `uname` == Darwin ]; then
LDFLAGS="$LDFLAGS -undefined dynamic_lookup -bundle"
fi
$PYTHON setup.py clean --all
$PYTHON setup.py config_fc --f90flags="-mtune=generic -fopenmp" build_ext --libraries="gomp" build
$PYTHON setup.py install --single-version-externally-managed --record=record.txt
else
python setup.py clean --all
python setup.py config_fc --f90flags="-mtune=generic -fopenmp" build_ext --libraries="gomp" build
pip install .
fi

21
build_scripts/win_mingw_no_omp.bat

@ -3,11 +3,20 @@ CALL gfortran -E ompgen.F90 -cpp -o omp.f90 @@ -3,11 +3,20 @@ CALL gfortran -E ompgen.F90 -cpp -o omp.f90
REM Wildcards not working on Windows for some reason
CALL f2py -m _wrffortran -h wrffortran.pyf --overwrite-signature wrf_constants.f90 wrf_testfunc.f90 wrf_user.f90 rip_cape.f90 wrf_cloud_fracf.f90 wrf_fctt.f90 wrf_user_dbz.f90 wrf_relhl.f90 calc_uh.f90 wrf_user_latlon_routines.f90 wrf_pvo.f90 eqthecalc.f90 wrf_rip_phys_routines.f90 wrf_pw.f90 wrf_vinterp.f90 wrf_wind.f90 omp.f90
cd ..
CALL python setup.py clean --all
%PROCESSOR_ARCHITECTURE% == AMD64 (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -mfpmath=sse -msse2" build --compiler=mingw32 --fcompiler=gnu95
) else (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -mfpmath=sse -msse2 -mincoming-stack-boundary=2" build --compiler=mingw32 --fcompiler=gnu95
IF %CONDA_BUILD% == 1 (
IF %ARCH% == 64 (
CALL %PYTHON% setup.py config_fc --f90flags="-O2 -mtune=generic" build --compiler=mingw32 --fcompiler=gnu95
) ELSE (
CALL %PYTHON% setup.py config_fc --f90flags="-O2 -mtune=generic -mincoming-stack-boundary=2" build --compiler=mingw32 --fcompiler=gnu95
)
CALL %PYTHON% setup.py install --single-version-externally-managed --record=record.txt
) ELSE (
CALL python setup.py clean --all
IF %PROCESSOR_ARCHITECTURE% == AMD64 (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic" build --compiler=mingw32 --fcompiler=gnu95
) ELSE (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -mincoming-stack-boundary=2" build --compiler=mingw32 --fcompiler=gnu95
)
CALL pip install .
)
CALL python setup.py install --single-version-externally-managed --record=record.txt

18
build_scripts/win_mingw_omp.bat

@ -3,11 +3,21 @@ CALL gfortran -E ompgen.F90 -cpp -fopenmp -o omp.f90 @@ -3,11 +3,21 @@ CALL gfortran -E ompgen.F90 -cpp -fopenmp -o omp.f90
REM Wildcards not working on Windows for some reason
CALLf2py -m _wrffortran -h wrffortran.pyf --overwrite-signature wrf_constants.f90 wrf_testfunc.f90 wrf_user.f90 rip_cape.f90 wrf_cloud_fracf.f90 wrf_fctt.f90 wrf_user_dbz.f90 wrf_relhl.f90 calc_uh.f90 wrf_user_latlon_routines.f90 wrf_pvo.f90 eqthecalc.f90 wrf_rip_phys_routines.f90 wrf_pw.f90 wrf_vinterp.f90 wrf_wind.f90 omp.f90
cd ..
CALL python setup.py clean --all
%PROCESSOR_ARCHITECTURE% == AMD64 (
IF %CONDA_BUILD% == 1 (
IF %ARCH% == 64 (
CALL %PYTHON% setup.py config_fc --f90flags="-O2 -mtune=generic -fopenmp" build_ext --libraries="gomp" build --compiler=mingw32 --fcompiler=gnu95
) ELSE (
CALL %PYTHON% setup.py config_fc --f90flags="-O2 -mtune=generic -fopenmp -mincoming-stack-boundary=2" build_ext --libraries="gomp" build --compiler=mingw32 --fcompiler=gnu95
)
CALL %PYTHON% setup.py install --single-version-externally-managed --record=record.txt
) ELSE (
CALL python setup.py clean --all
IF %PROCESSOR_ARCHITECTURE% == AMD64 (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -fopenmp" build_ext --libraries="gomp" build --compiler=mingw32 --fcompiler=gnu95
) else (
) ELSE (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -fopenmp -mincoming-stack-boundary=2" build_ext --libraries="gomp" build --compiler=mingw32 --fcompiler=gnu95
)
CALL python setup.py install --single-version-externally-managed --record=record.txt
CALL pip install .
)

21
build_scripts/win_msvc_mingw_no_omp.bat

@ -3,11 +3,20 @@ CALL gfortran -E ompgen.F90 -cpp -o omp.f90 @@ -3,11 +3,20 @@ CALL gfortran -E ompgen.F90 -cpp -o omp.f90
REM Wildcards not working on Windows for some reason
CALL f2py -m _wrffortran -h wrffortran.pyf --overwrite-signature wrf_constants.f90 wrf_testfunc.f90 wrf_user.f90 rip_cape.f90 wrf_cloud_fracf.f90 wrf_fctt.f90 wrf_user_dbz.f90 wrf_relhl.f90 calc_uh.f90 wrf_user_latlon_routines.f90 wrf_pvo.f90 eqthecalc.f90 wrf_rip_phys_routines.f90 wrf_pw.f90 wrf_vinterp.f90 wrf_wind.f90 omp.f90
cd ..
CALL python setup.py clean --all
%PROCESSOR_ARCHITECTURE% == AMD64
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -mfpmath=sse -msse2" build --compiler=msvc --fcompiler=gnu95
) else (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -mfpmath=sse -msse2 -mincoming-stack-boundary=2" build --compiler=msvc --fcompiler=gnu95
IF %CONDA_BUILD% == 1 (
IF %ARCH% == 64 (
CALL %PYTHON% setup.py config_fc --f90flags="-O2 -mtune=generic" build --compiler=mingw32 --fcompiler=gnu95
) ELSE (
CALL %PYTHON% setup.py config_fc --f90flags="-O2 -mtune=generic -mincoming-stack-boundary=2" build --compiler=msvc --fcompiler=gnu95
)
CALL %PYTHON% setup.py install --single-version-externally-managed --record=record.txt
) ELSE (
CALL python setup.py clean --all
IF %PROCESSOR_ARCHITECTURE% == AMD64 (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic" build --compiler=mingw32 --fcompiler=gnu95
) ELSE (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -mincoming-stack-boundary=2" build --compiler=msvc --fcompiler=gnu95
)
CALL pip install .
)
CALL python setup.py install --single-version-externally-managed --record=record.txt

17
build_scripts/win_msvc_mingw_omp.bat

@ -3,11 +3,20 @@ CALL gfortran -E ompgen.F90 -cpp -fopenmp -o omp.f90 @@ -3,11 +3,20 @@ CALL gfortran -E ompgen.F90 -cpp -fopenmp -o omp.f90
REM Wildcards not working on Windows for some reason
CALL f2py -m _wrffortran -h wrffortran.pyf --overwrite-signature wrf_constants.f90 wrf_testfunc.f90 wrf_user.f90 rip_cape.f90 wrf_cloud_fracf.f90 wrf_fctt.f90 wrf_user_dbz.f90 wrf_relhl.f90 calc_uh.f90 wrf_user_latlon_routines.f90 wrf_pvo.f90 eqthecalc.f90 wrf_rip_phys_routines.f90 wrf_pw.f90 wrf_vinterp.f90 wrf_wind.f90 omp.f90
cd ..
CALL python setup.py clean --all
%PROCESSOR_ARCHITECTURE% == AMD64 (
IF %CONDA_BUILD% == 1 (
IF %ARCH% == 64 (
CALL %PYTHON% setup.py config_fc --f90flags="-O2 -mtune=generic -fopenmp" build_ext --libraries="gomp" build --compiler=msvc --fcompiler=gnu95
) ELSE (
CALL %PYTHON% setup.py config_fc --f90flags="-O2 -mtune=generic -fopenmp -mincoming-stack-boundary=2" build_ext --libraries="gomp" build --compiler=msvc --fcompiler=gnu95
)
CALL %PYTHON% setup.py install --single-version-externally-managed --record=record.txt
) ELSE (
CALL python setup.py clean --all
IF %PROCESSOR_ARCHITECTURE% == AMD64 (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -fopenmp" build_ext --libraries="gomp" build --compiler=msvc --fcompiler=gnu95
) else (
) ELSE (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -fopenmp -mincoming-stack-boundary=2" build_ext --libraries="gomp" build --compiler=msvc --fcompiler=gnu95
)
CALL python setup.py install --single-version-externally-managed --record=record.txt
CALL pip install .
)

9
conda_recipe/bld.bat

@ -1,8 +1,5 @@ @@ -1,8 +1,5 @@
%ARCH% == 64 (
%PYTHON% setup.py config_fc --f90flags="-O2 -mtune=generic -mfpmath=sse -msse2" build --compiler=mingw32 --fcompiler=gnu95
) else (
%PYTHON% setup.py config_fc --f90flags="-O2 -mtune=generic -mfpmath=sse -msse2 -mincoming-stack-boundary=2" build --compiler=mingw32 --fcompiler=gnu95
)
%PYTHON% setup.py install --single-version-externally-managed --record=record.txt
cd build_scripts
CALL win_msvc_mingw_omp.bat

8
conda_recipe/build.sh

@ -1,10 +1,6 @@ @@ -1,10 +1,6 @@
#!/bin/bash
if [ `uname` == Darwin ]; then
LDFLAGS="$LDFLAGS -undefined dynamic_lookup -bundle"
fi
$PYTHON setup.py config_fc --f90flags="-mtune=generic -mfpmath=sse" build
$PYTHON setup.py install --single-version-externally-managed --record=record.txt
cd build_scripts
sh gnu_omp.sh

20
conda_recipe/meta.yaml

@ -1,38 +1,40 @@ @@ -1,38 +1,40 @@
{% set version = "1.0.5" %}
{% set version = "1.1.0" %}
package:
name: wrf-python
version: {{ version }}
source:
fn: wrf-python-{{ version }}.tar.gz
url: https://github.com/NCAR/wrf-python/archive/{{ version }}.tar.gz
sha256: ea2202e1d8237c65b9d77a91f00da0f2e7a37ed6214ddd976872b619b9647b33
git_url: https://github.com/NCAR/wrf-python
git_branch: develop
build:
number: 0
detect_binary_files_with_prefix: true
skip: True # [(win and py>=35)]
requirements:
build:
- setuptools
- numpy x.x
- numpy 1.11.* # [unix]
- numpy 1.14.* # [win]
- wrapt
- mingwpy # [win]
- m2w64-toolchain # [win]
- gcc # [unix]
- python
run:
- numpy x.x
- setuptools
- numpy >=1.11
- python
- wrapt
- mingwpy # [win]
- m2w64-gcc-libs # [win]
- libgfortran # [unix]
- libgcc # [unix]
- xarray
test:
requires:
- setuptools
- netcdf4
- xarray
source_files:

58
conda_recipe/meta.yaml.develop

@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
{% set version = "1.1.0" %}
package:
name: wrf-python
version: {{ version }}
source:
git_url: https://github.com/NCAR/wrf-python
git_branch: develop
build:
number: 0
detect_binary_files_with_prefix: true
requirements:
build:
- setuptools
- numpy 1.11.* # [unix]
- numpy 1.14.* # [win]
- wrapt
- m2w64-toolchain # [win]
- gcc # [unix]
- python
run:
- setuptools
- numpy >=1.11
- python
- wrapt
- m2w64-gcc-libs # [win]
- libgfortran # [unix]
- libgcc # [unix]
- xarray
test:
requires:
- setuptools
- netcdf4
- xarray
source_files:
- test/ci_tests
imports:
- wrf
commands:
- cd test/ci_tests && python utests.py
about:
home: https://github.com/NCAR/wrf-python
license: "UCAR"
license_file: '{{ environ["RECIPE_DIR"] }}/LICENSE'
summary: "Diagnostic and interpolation routines for WRF-ARW data."
extra:
recipe-maintainers:
- bladwig1
- marylhaley
- david-ian-brown
- khallock

58
conda_recipe/meta.yaml.release

@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
{% set version = "1.1.0" %}
package:
name: wrf-python
version: {{ version }}
source:
fn: wrf-python-{{ version }}.tar.gz
url: https://github.com/NCAR/wrf-python/archive/{{ version }}.tar.gz
sha256: ea2202e1d8237c65b9d77a91f00da0f2e7a37ed6214ddd976872b619b9647b33
build:
number: 0
detect_binary_files_with_prefix: true
requirements:
build:
- setuptools
- numpy 1.11.* # [unix]
- numpy 1.14.* # [win]
- wrapt
- m2w64-toolchain # [win]
- gcc # [unix]
- python
run:
- setuptools
- numpy >=1.11
- python
- wrapt
- m2w64-gcc-libs # [win]
- libgfortran # [unix]
- libgcc # [unix]
- xarray
test:
requires:
- setuptools
- netcdf4
- xarray
source_files:
- test/ci_tests
imports:
- wrf
commands:
- cd test/ci_tests && python utests.py
about:
home: https://github.com/NCAR/wrf-python
license: "UCAR"
license_file: '{{ environ["RECIPE_DIR"] }}/LICENSE'
summary: "Diagnostic and interpolation routines for WRF-ARW data."
extra:
recipe-maintainers:
- bladwig1
- marylhaley
- david-ian-brown
- khallock
Loading…
Cancel
Save