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. 21
      build_scripts/win_mingw_no_omp.bat
  4. 22
      build_scripts/win_mingw_omp.bat
  5. 20
      build_scripts/win_msvc_mingw_no_omp.bat
  6. 22
      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. 4
      conda_recipe/meta.yaml

16
build_scripts/gnu_no_omp.sh

@ -5,16 +5,6 @@ gfortran -E ompgen.F90 -cpp -o omp.f90
f2py *.f90 -m _wrffortran -h wrffortran.pyf --overwrite-signature f2py *.f90 -m _wrffortran -h wrffortran.pyf --overwrite-signature
cd .. cd ..
python setup.py clean --all
if [$CONDA_BUILD == 1] python setup.py config_fc --f90flags="-mtune=generic" build_ext build
if [ `uname` == Darwin ]; then pip install .
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

16
build_scripts/gnu_omp.sh

@ -5,17 +5,7 @@ gfortran -E ompgen.F90 -fopenmp -cpp -o omp.f90
f2py *.f90 -m _wrffortran -h wrffortran.pyf --overwrite-signature f2py *.f90 -m _wrffortran -h wrffortran.pyf --overwrite-signature
cd .. cd ..
python setup.py clean --all
if [$CONCDA_BUILD == 1] python setup.py config_fc --f90flags="-mtune=generic -fopenmp" build_ext --libraries="gomp" build
if [ `uname` == Darwin ]; then pip install .
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

@ -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 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 ..
IF %CONDA_BUILD% == 1 ( CALL python setup.py clean --all
IF %ARCH% == 64 (
CALL %PYTHON% setup.py config_fc --f90flags="-O2 -mtune=generic" build --compiler=mingw32 --fcompiler=gnu95 IF %PROCESSOR_ARCHITECTURE% == AMD64 (
) ELSE ( CALL python setup.py config_fc --f90flags="-O2 -mtune=generic" build --compiler=mingw32 --fcompiler=gnu95
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 ( ) ELSE (
CALL python setup.py clean --all CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -mincoming-stack-boundary=2" build --compiler=mingw32 --fcompiler=gnu95
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 pip install .

22
build_scripts/win_mingw_omp.bat

@ -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 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 .. cd ..
IF %CONDA_BUILD% == 1 ( CALL python setup.py clean --all
IF %ARCH% == 64 (
CALL %PYTHON% setup.py config_fc --f90flags="-O2 -mtune=generic -fopenmp" build_ext --libraries="gomp" build --compiler=mingw32 --fcompiler=gnu95 IF %PROCESSOR_ARCHITECTURE% == AMD64 (
) ELSE ( CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -fopenmp" build_ext --libraries="gomp" build --compiler=mingw32 --fcompiler=gnu95
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 ( ) ELSE (
CALL python setup.py clean --all CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -fopenmp -mincoming-stack-boundary=2" build_ext --libraries="gomp" build --compiler=mingw32 --fcompiler=gnu95
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 (
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 .

20
build_scripts/win_msvc_mingw_no_omp.bat

@ -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 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 ..
IF %CONDA_BUILD% == 1 ( CALL python setup.py clean --all
IF %ARCH% == 64 (
CALL %PYTHON% setup.py config_fc --f90flags="-O2 -mtune=generic" build --compiler=mingw32 --fcompiler=gnu95 IF %PROCESSOR_ARCHITECTURE% == AMD64 (
) ELSE ( CALL python setup.py config_fc --f90flags="-O2 -mtune=generic" build --compiler=mingw32 --fcompiler=gnu95
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 ( ) ELSE (
CALL python setup.py clean --all CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -mincoming-stack-boundary=2" build --compiler=msvc --fcompiler=gnu95
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 pip install .
)

22
build_scripts/win_msvc_mingw_omp.bat

@ -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 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 ..
IF %CONDA_BUILD% == 1 ( CALL python setup.py clean --all
IF %ARCH% == 64 (
CALL %PYTHON% setup.py config_fc --f90flags="-O2 -mtune=generic -fopenmp" build_ext --libraries="gomp" build --compiler=msvc --fcompiler=gnu95 IF %PROCESSOR_ARCHITECTURE% == AMD64 (
) ELSE ( CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -fopenmp" build_ext --libraries="gomp" build --compiler=msvc --fcompiler=gnu95
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 ( ) ELSE (
CALL python setup.py clean --all CALL python setup.py config_fc --f90flags="-O2 -mtune=generic -fopenmp -mincoming-stack-boundary=2" build_ext --libraries="gomp" build --compiler=msvc --fcompiler=gnu95
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 (
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 @@
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 IF %ARCH% == 64 (
CALL win_msvc_mingw_omp.bat 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 @@
#!/bin/bash #!/bin/bash
cd build_scripts cd ./fortran
sh gnu_omp.sh 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

4
conda_recipe/meta.yaml

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

Loading…
Cancel
Save