From 204e3891956a3833895909b9a7e3370e5e8c7937 Mon Sep 17 00:00:00 2001 From: Bart Janssens Date: Mon, 1 Jul 2024 12:17:45 +0100 Subject: [PATCH] [FLEXPART] Version 10.4.2 (#9002) --- F/FLEXPART/build_tarballs.jl | 19 +++-- .../bundled/patches/flexpart-makefile.patch | 81 +++++++++---------- .../bundled/patches/flexpart-parmod.patch | 4 +- 3 files changed, 52 insertions(+), 52 deletions(-) diff --git a/F/FLEXPART/build_tarballs.jl b/F/FLEXPART/build_tarballs.jl index d7d3d2b24c0..4cc3a52e4dc 100644 --- a/F/FLEXPART/build_tarballs.jl +++ b/F/FLEXPART/build_tarballs.jl @@ -4,11 +4,11 @@ using BinaryBuilder, Pkg name = "FLEXPART" -version = v"10.4" +version = v"10.4.2" # Collection of sources required to complete build sources = [ - GitSource("https://www.flexpart.eu/gitmob/flexpart", "3d7eebf7c4909f59db5ec32c524f88fb846e9fe5"), + GitSource("https://www.flexpart.eu/gitmob/flexpart", "8ad70c708b59dad8f4adabf7ab51dd110ace76d1"), DirectorySource("./bundled"), ] @@ -25,10 +25,14 @@ cp FLEXPART $bindir install_license ../LICENSE """ -platforms = [ - Platform("x86_64", "linux"; libc = "glibc") -] +platforms = supported_platforms() +# 32 bit platforms are not supported by dependency eccodes +filter!(p -> nbits(p) == 64, platforms) platforms = expand_gfortran_versions(platforms) +filter!(p -> libgfortran_version(p) != v"3", platforms) # Also for eccodes compatibility +filter!(p -> arch(p) != "powerpc64le" && !Sys.isfreebsd(p) && libc(p) != "musl", platforms) # Fliter for netcdff platforms +filter!(!Sys.iswindows, platforms) # Excluded because of "Error: value of ... too large for field of 4 bytes at ..." +filter!(!Sys.isapple, platforms) # Excluded because of "invalid variant" errors # The products that we will ensure are always built products = [ @@ -38,8 +42,9 @@ products = [ # Dependencies that must be installed before this package can be built dependencies = [ Dependency("CompilerSupportLibraries_jll"), - Dependency("eccodes_jll"), - Dependency("NetCDFF_jll"), + Dependency("eccodes_jll"; compat="2.36.0"), + Dependency("NetCDFF_jll"; compat="4.6.1"), + Dependency("JasPer_jll"; compat="2.0.33"), ] # Build the tarballs, and possibly a `build.jl` as well. diff --git a/F/FLEXPART/bundled/patches/flexpart-makefile.patch b/F/FLEXPART/bundled/patches/flexpart-makefile.patch index 02b1ebf4f86..e39ce3cb662 100644 --- a/F/FLEXPART/bundled/patches/flexpart-makefile.patch +++ b/F/FLEXPART/bundled/patches/flexpart-makefile.patch @@ -1,44 +1,39 @@ -diff --git a/src/makefile b/src/makefile -index 43d335d..3668d11 100644 ---- a/src/makefile -+++ b/src/makefile -@@ -62,14 +62,13 @@ ifeq ($(gcc), 4.9) - LIBPATH1 = ${ROOT_DIR}/lib - else - # Compiled libraries under user ~flexpart, gfortran v5.4 -- ROOT_DIR = /homevip/flexpart/ -+ ROOT_DIR = ${prefix} - -- F90 = /usr/bin/gfortran -+ F90 = gfortran - MPIF90 = /usr/bin/mpifort - -- INCPATH1 = ${ROOT_DIR}/gcc-5.4.0/include -- INCPATH2 = /usr/include -- LIBPATH1 = ${ROOT_DIR}/gcc-5.4.0/lib +diff --color -ur flexpart-orig/src/makefile flexpart/src/makefile +--- flexpart-orig/src/makefile 2024-06-28 12:00:25.488456542 +0200 ++++ flexpart/src/makefile 2024-06-28 12:08:25.775123497 +0200 +@@ -91,13 +91,9 @@ + F90 = gfortran + MPIF90 = mpifort + +- INCPATH1 = /usr/include/ + INCPATH1 = ${includedir} -+ LIBPATH1 = ${libdir} - endif - - -@@ -87,16 +86,16 @@ VPATH = gributils/ - - - ## OPTIMIZATION LEVEL --O_LEV = 0 # [0,1,2,3,g,s,fast] -+O_LEV = 3 # [0,1,2,3,g,s,fast] - O_LEV_DBG = g # [0,g] - - ## LIBRARIES - #LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper -lnetcdff --LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper $(NCOPT) -+LIBS = -leccodes_f90 -leccodes -lm $(NCOPT) - --FFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -g -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER) #-Warray-bounds -fcheck=all # -march=native -+FFLAGS = -I$(INCPATH1) -O$(O_LEV) -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -O$(O_LEV) $(NCOPT) $(FUSER) #-Warray-bounds -fcheck=all # -march=native - --DBGFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV_DBG) -g3 -ggdb3 -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV_DBG) $(NCOPT) -fbacktrace -Wall -fdump-core $(FUSER) # -ffpe-trap=invalid,overflow,denormal,underflow,zero -Warray-bounds -fcheck=all -+DBGFLAGS = -I$(INCPATH1) -O$(O_LEV_DBG) -g3 -ggdb3 -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -O$(O_LEV_DBG) $(NCOPT) -fbacktrace -Wall -fdump-core $(FUSER) # -ffpe-trap=invalid,overflow,denormal,underflow,zero -Warray-bounds -fcheck=all - - LDFLAGS = $(FFLAGS) -L$(LIBPATH1) -Wl,-rpath,$(LIBPATH1) $(LIBS) #-L$(LIBPATH2) - LDDEBUG = $(DBGFLAGS) -L$(LIBPATH1) $(LIBS) #-L$(LIBPATH2) + INCPATH2 = ./ +- LIBPATH1 = /usr/lib/ +- +- INCPATH2 = /opt/eccodes/include/ +-# INCPATH2 = ./ +- LIBPATH2 = /opt/eccodes/lib/ ++ LIBPATH1 = ${libdir} + + # the following works on a Debian buster (and probably newer) machine + # F90 = gfortran +@@ -128,9 +124,7 @@ + #LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper $(NCOPT) + LIBS = -leccodes_f90 -leccodes -lm -ljasper $(NCOPT) + +-FFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -g -cpp -m64 -mcmodel=medium \ +- -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 \ +- -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER) #-Warray-bounds -fcheck=all # -march=native ++FFLAGS = -I$(INCPATH1) -O$(O_LEV) -cpp -mcmodel=large -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -O$(O_LEV) $(NCOPT) $(FUSER) + + DBGFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV_DBG) -g3 -ggdb3 -cpp \ + -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 \ +@@ -138,7 +134,7 @@ + -fbacktrace -Wall -fdump-core $(FUSER) -fcheck=all #\ + # -ffpe-trap=invalid,overflow,denormal,underflow,zero + +-LDFLAGS = $(FFLAGS) -L$(LIBPATH1) -L$(LIBPATH2) -Wl,-rpath,$(LIBPATH1) $(LIBS) ++LDFLAGS = $(FFLAGS) -L$(LIBPATH1) -Wl,-rpath,$(LIBPATH1) $(LIBS) + LDDEBUG = $(DBGFLAGS) -L$(LIBPATH1) $(LIBS) + + MODOBJS = \ diff --git a/F/FLEXPART/bundled/patches/flexpart-parmod.patch b/F/FLEXPART/bundled/patches/flexpart-parmod.patch index f1a4df438b0..15c1879794d 100644 --- a/F/FLEXPART/bundled/patches/flexpart-parmod.patch +++ b/F/FLEXPART/bundled/patches/flexpart-parmod.patch @@ -2,7 +2,7 @@ diff --git a/src/par_mod.f90 b/src/par_mod.f90 index 776996f..0419fa3 100644 --- a/src/par_mod.f90 +++ b/src/par_mod.f90 -@@ -134,12 +134,12 @@ module par_mod +@@ -137,12 +137,12 @@ module par_mod ! integer,parameter :: nxmax=361,nymax=181,nuvzmax=92,nwzmax=92,nzmax=92,nxshift=359 ! 1.0 degree 92 level ! integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=0 ! 1.0 degree 138 level ! integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=359 ! 1.0 degree 138 level @@ -18,7 +18,7 @@ index 776996f..0419fa3 100644 !********************************************* -@@ -204,7 +204,7 @@ module par_mod +@@ -207,7 +207,7 @@ module par_mod ! Maximum number of particles, species, and similar !**************************************************