Browse Source

Updated build scripts.

lon0
Bill Ladwig 7 years ago
parent
commit
014be8d49e
  1. 16
      build_scripts/gnu_no_omp.sh
  2. 16
      build_scripts/gnu_omp.sh
  3. 19
      build_scripts/win_mingw_no_omp.bat
  4. 20
      build_scripts/win_mingw_omp.bat
  5. 18
      build_scripts/win_msvc_mingw_no_omp.bat
  6. 20
      build_scripts/win_msvc_mingw_omp.bat
  7. 1424
      conda_recipe/blah.txt
  8. 14
      conda_recipe/bld.bat
  9. 14
      conda_recipe/build.sh
  10. 2
      conda_recipe/meta.yaml

16
build_scripts/gnu_no_omp.sh

@ -5,16 +5,6 @@ gfortran -E ompgen.F90 -cpp -o omp.f90 @@ -5,16 +5,6 @@ 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
python setup.py clean --all
python setup.py config_fc --f90flags="-mtune=generic" build_ext build
pip install .

16
build_scripts/gnu_omp.sh

@ -5,17 +5,7 @@ gfortran -E ompgen.F90 -fopenmp -cpp -o omp.f90 @@ -5,17 +5,7 @@ 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
python setup.py clean --all
python setup.py config_fc --f90flags="-mtune=generic -fopenmp" build_ext --libraries="gomp" build
pip install .

19
build_scripts/win_mingw_no_omp.bat

@ -4,19 +4,12 @@ REM Wildcards not working on Windows for some reason @@ -4,19 +4,12 @@ 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 ..
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 clean --all
IF %PROCESSOR_ARCHITECTURE% == AMD64 (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic" build --compiler=mingw32 --fcompiler=gnu95
) ELSE (
) ELSE (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -mincoming-stack-boundary=2" build --compiler=mingw32 --fcompiler=gnu95
)
CALL pip install .
)
CALL pip install .

20
build_scripts/win_mingw_omp.bat

@ -4,20 +4,14 @@ REM Wildcards not working on Windows for some reason @@ -4,20 +4,14 @@ 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 ..
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 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 pip install .
)
CALL pip install .

18
build_scripts/win_msvc_mingw_no_omp.bat

@ -4,19 +4,11 @@ REM Wildcards not working on Windows for some reason @@ -4,19 +4,11 @@ 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 ..
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 clean --all
IF %PROCESSOR_ARCHITECTURE% == AMD64 (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic" build --compiler=mingw32 --fcompiler=gnu95
) ELSE (
) ELSE (
CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -mincoming-stack-boundary=2" build --compiler=msvc --fcompiler=gnu95
)
CALL pip install .
)
CALL pip install .

20
build_scripts/win_msvc_mingw_omp.bat

@ -4,19 +4,13 @@ REM Wildcards not working on Windows for some reason @@ -4,19 +4,13 @@ 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 ..
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 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 pip install .
)
CALL pip install .

1424
conda_recipe/blah.txt

File diff suppressed because it is too large Load Diff

14
conda_recipe/bld.bat

@ -1,5 +1,15 @@ @@ -1,5 +1,15 @@
cd ./fortran
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 ..
cd build_scripts
CALL win_msvc_mingw_omp.bat
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

14
conda_recipe/build.sh

@ -1,6 +1,16 @@ @@ -1,6 +1,16 @@
#!/bin/bash
cd build_scripts
sh gnu_omp.sh
cd ./fortran
gfortran -E ompgen.F90 -fopenmp -cpp -o omp.f90
f2py *.f90 -m _wrffortran -h wrffortran.pyf --overwrite-signature
cd ..
if [ `uname` == Darwin ]; then
LDFLAGS="$LDFLAGS -undefined dynamic_lookup -bundle"
fi
$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

2
conda_recipe/meta.yaml

@ -16,12 +16,12 @@ build: @@ -16,12 +16,12 @@ build:
requirements:
build:
- setuptools
- python
- numpy 1.11.* # [unix]
- numpy 1.14.* # [win]
- wrapt
- m2w64-toolchain # [win]
- gcc # [unix]
- python
run:
- setuptools
- numpy >=1.11

Loading…
Cancel
Save