Skip to content

Commit f52c197

Browse files
committed
Merge branch 'release-v4.7.1'
2 parents eeacb82 + e2b6137 commit f52c197

File tree

13 files changed

+83
-44
lines changed

13 files changed

+83
-44
lines changed

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
WRF Model Version 4.7.0
1+
WRF Model Version 4.7.1
22

33
https://www2.mmm.ucar.edu/wrf/users/
44

chem/KPP/util/write_decomp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ all:
2828
$(MAKE) comp
2929
./write_decomp.exe
3030
$(MAKE) integr_edit
31-
./integr_edit.exe $(MECH) module_kpp_$(MECH)_Integr.F decomp_$(MODEL).inc $(MODEL)_new
31+
./integr_edit.exe $(MECH) module_kpp_$(MECH)_Integr.F decomp_$(MECH).inc $(MECH)_new
3232
$(MAKE) clean
3333

3434

chem/module_input_chem_data.F

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3843,8 +3843,8 @@ SUBROUTINE bdy_chem_value_top_pv ( chem,xlat, &
38433843

38443844
REAL, DIMENSION(ims:ime,kms:kme,jms:jme,num_chem ), &
38453845
intent(INOUT) :: chem
3846-
REAL, DIMENSION( ims:ime , jms:jme ), intent(IN) :: xlat ! for determination of O3/PV p\
3847-
roportionality constant
3846+
REAL, DIMENSION( ims:ime , jms:jme ), intent(IN) :: xlat ! for determination of O3/PV proportionality constant
3847+
38483848
REAL :: pv2o3_con ! for determination of O3/PV proportionality constant
38493849
REAL, DIMENSION(ims:ime , kms:kme , jms:jme), intent(IN) :: pv,pb,p
38503850
REAL :: preshPa

cmake/c_preproc.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ macro( wrf_c_preproc_fortran )
2929
# Generate compile command and file outputs
3030
set( WRF_PP_F_OUTPUT )
3131
set( WRF_PP_F_COMMANDS )
32+
set( WRF_PP_F_DEPENDS )
3233
foreach( WRF_PP_F_SOURCE_FILE ${WRF_PP_F_SOURCES} )
3334
get_filename_component( WRF_PP_F_INPUT_SOURCE ${WRF_PP_F_SOURCE_FILE} REALPATH )
3435
get_filename_component( WRF_PP_F_INPUT_SOURCE_FILE_ONLY ${WRF_PP_F_SOURCE_FILE} NAME )
@@ -52,6 +53,10 @@ macro( wrf_c_preproc_fortran )
5253
APPEND WRF_PP_F_OUTPUT
5354
${WRF_PP_F_OUTPUT_FILE}
5455
)
56+
list(
57+
APPEND WRF_PP_F_DEPENDS
58+
${WRF_PP_F_INPUT_SOURCE}
59+
)
5560

5661
# # Tell all targets that eventually use this file that it is generated - this is useful if this macro is used in a
5762
# # different directory than where the target dependency is set
@@ -78,7 +83,7 @@ macro( wrf_c_preproc_fortran )
7883
COMMAND ${CMAKE_COMMAND} -E make_directory ${WRF_PP_F_OUTPUT_DIR}
7984
${WRF_PP_F_COMMANDS}
8085
COMMENT "Preprocessing ${WRF_PP_F_TARGET_NAME}"
81-
DEPENDS ${WRF_PP_F_DEPENDENCIES}
86+
DEPENDS ${WRF_PP_F_DEPENDENCIES} ${WRF_PP_F_DEPENDS}
8287
)
8388

8489
add_custom_target(

cmake/m4_preproc.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ macro( wrf_m4_preproc_fortran )
2323
# Generate compile command and file outputs
2424
set( WRF_PP_M4_OUTPUT )
2525
set( WRF_PP_M4_COMMANDS )
26+
set( WRF_PP_M4_DEPENDS )
2627
foreach( WRF_PP_M4_SOURCE_FILE ${WRF_PP_M4_SOURCES} )
2728
get_filename_component( WRF_PP_M4_INPUT_SOURCE ${WRF_PP_M4_SOURCE_FILE} REALPATH )
2829
get_filename_component( WRF_PP_M4_INPUT_SOURCE_FILE_ONLY ${WRF_PP_M4_SOURCE_FILE} NAME )
@@ -46,6 +47,10 @@ macro( wrf_m4_preproc_fortran )
4647
APPEND WRF_PP_M4_OUTPUT
4748
${WRF_PP_M4_OUTPUT_FILE}
4849
)
50+
list(
51+
APPEND WRF_PP_M4_DEPENDS
52+
${WRF_PP_M4_INPUT_SOURCE}
53+
)
4954

5055
# # Tell all targets that eventually use this file that it is generated - this is useful if this macro is used in a
5156
# # different directory than where the target dependency is set
@@ -72,7 +77,7 @@ macro( wrf_m4_preproc_fortran )
7277
COMMAND ${CMAKE_COMMAND} -E make_directory ${WRF_PP_M4_OUTPUT_DIR}
7378
${WRF_PP_M4_COMMANDS}
7479
COMMENT "Preprocessing ${WRF_PP_M4_TARGET_NAME}"
75-
DEPENDS ${WRF_PP_M4_DEPENDENCIES}
80+
DEPENDS ${WRF_PP_M4_DEPENDENCIES} ${WRF_PP_M4_DEPENDS}
7681
)
7782

7883
add_custom_target(

confcheck/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,23 @@ wrf_conf_check(
55
SOURCES ${PROJECT_SOURCE_DIR}/tools/fortran_2003_ieee_test.F
66
MESSAGE "Some IEEE Fortran 2003 features missing, removing usage of these features"
77
)
8+
set(Fortran_2003_IEEE ${Fortran_2003_IEEE} PARENT_SCOPE)
89

910
wrf_conf_check(
1011
RUN
1112
RESULT_VAR Fortran_2003_ISO_C
1213
SOURCES ${PROJECT_SOURCE_DIR}/tools/fortran_2003_iso_c_test.F
1314
MESSAGE "Some ISO_C Fortran 2003 features missing, removing usage ISO_C and stubbing code dependent on it"
1415
)
16+
set(Fortran_2003_ISO_C ${Fortran_2003_ISO_C} PARENT_SCOPE)
1517

1618
wrf_conf_check(
1719
RUN
1820
RESULT_VAR Fortran_2003_FLUSH
1921
SOURCES ${PROJECT_SOURCE_DIR}/tools/fortran_2003_flush_test.F
2022
MESSAGE "Standard FLUSH routine Fortran 2003 features missing, checking for alternate Fortran_2003_FFLUSH"
2123
)
24+
set(Fortran_2003_FLUSH ${Fortran_2003_FLUSH} PARENT_SCOPE)
2225

2326
if ( NOT ${Fortran_2003_FLUSH} )
2427
wrf_conf_check(
@@ -27,6 +30,7 @@ if ( NOT ${Fortran_2003_FLUSH} )
2730
SOURCES ${PROJECT_SOURCE_DIR}/tools/fortran_2003_fflush_test.F
2831
MESSAGE "Standard FFLUSH routine Fortran 2003 features missing, no alternate to FLUSH found, feature stubbed out"
2932
)
33+
set(Fortran_2003_FFLUSH ${Fortran_2003_FFLUSH} PARENT_SCOPE)
3034
endif()
3135

3236
wrf_conf_check(
@@ -35,6 +39,7 @@ wrf_conf_check(
3539
SOURCES ${PROJECT_SOURCE_DIR}/tools/fortran_2008_gamma_test.F
3640
MESSAGE "Some Fortran 2003 features missing, removing usage gamma function intrinsic and stubbing code dependent on it"
3741
)
42+
set(Fortran_2003_GAMMA ${Fortran_2003_GAMMA} PARENT_SCOPE)
3843

3944

4045

@@ -46,6 +51,7 @@ wrf_conf_check(
4651
COMPILE_DEFINITIONS -DTEST_FSEEKO64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -DFILE_TO_TEST="${PROJECT_SOURCE_DIR}/CMakeLists.txt"
4752
MESSAGE "fseeko64 not supported, checking alternate fseeko"
4853
)
54+
set(FSEEKO64 ${FSEEKO64} PARENT_SCOPE)
4955

5056
if ( NOT "${FSEEKO64}" )
5157
wrf_conf_check(
@@ -56,6 +62,7 @@ if ( NOT "${FSEEKO64}" )
5662
COMPILE_DEFINITIONS -DTEST_FSEEKO -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -DFILE_TO_TEST="${PROJECT_SOURCE_DIR}/CMakeLists.txt"
5763
MESSAGE "fseeko not supported, compiling with fseek (caution with large files)"
5864
)
65+
set(FSEEKO ${FSEEKO} PARENT_SCOPE)
5966
endif()
6067

6168
# Unsure if this is even necessary. Defines littered throughout configure.defaults
@@ -77,4 +84,4 @@ endif()
7784
# EXTENSION .c
7885
# MESSAGE "MPI_Init_thread() not supported"
7986
# )
80-
# endif()
87+
# endif()

external/RSL_LITE/rsl_bcast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static int destroy_par_info ( p )
8282

8383
static int destroy_list( list, dfcn )
8484
rsl_list_t ** list ; /* pointer to pointer to list */
85-
int (*dfcn)() ; /* pointer to function for destroying
85+
int (*dfcn)(void *) ; /* pointer to function for destroying
8686
the data field of the list */
8787
{
8888
rsl_list_t *p, *trash ;

external/io_grib1/MEL_grib1/pack_spatial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ int pack_spatial ( pt_cnt, bit_cnt, pack_null, fbuff, ppbitstream,
8888
float max_grid; /* maximum value in grid */
8989
float ftemp; /* temporary float containing grid value */
9090
unsigned long *pBitstream;
91-
unsigned long grib_local_ibm();
91+
unsigned long grib_local_ibm(double);
9292
int wordnum;
9393
int zero_cnt;
9494
int prec_too_high = 0;

frame/collect_on_comm.c

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,47 @@
3737
#endif
3838

3939

40+
#if defined( DM_PARALLEL ) && ! defined( STUBMPI )
41+
void
42+
temp_errhandler( MPI_Comm *comm_ptr, int *errcode, ... )
43+
{
44+
// do nothing...
45+
}
46+
47+
MPI_Datatype
48+
get_datatype_from_typesize( int *typesize )
49+
{
50+
MPI_Errhandler errhandler;
51+
MPI_Errhandler previous;
52+
MPI_Datatype dtype;
53+
int ierr = -1;
54+
55+
// MPI critically aborts on trivial errors caused by this call so replace error
56+
// handler temporarily
57+
ierr = MPI_Comm_create_errhandler( &temp_errhandler, &errhandler );
58+
ierr = MPI_Comm_get_errhandler( MPI_COMM_WORLD, &previous );
59+
ierr = MPI_Comm_set_errhandler( MPI_COMM_WORLD, errhandler );
60+
61+
/* handle different sized data types appropriately. */
62+
ierr = MPI_Type_match_size (MPI_TYPECLASS_REAL, *typesize, &dtype);
63+
if (MPI_SUCCESS != ierr) {
64+
ierr = MPI_Type_match_size (MPI_TYPECLASS_INTEGER, *typesize, &dtype);
65+
if (MPI_SUCCESS != ierr) {
66+
#ifndef MS_SUA
67+
fprintf(stderr,"%s %d FATAL ERROR: unhandled typesize = %d!!\n", __FILE__,__LINE__,*typesize) ;
68+
#endif
69+
MPI_Abort(MPI_COMM_WORLD,1) ;
70+
}
71+
}
72+
73+
// Reinstate the previous error handler and clear ours
74+
ierr = MPI_Comm_set_errhandler( MPI_COMM_WORLD, previous );
75+
ierr = MPI_Errhandler_free( &errhandler );
76+
77+
return dtype;
78+
}
79+
#endif
80+
4081
int col_on_comm ( int *, int *, void *, int *, void *, int *, int);
4182
int dst_on_comm ( int *, int *, void *, int *, void *, int *, int);
4283

@@ -115,17 +156,7 @@ col_on_comm ( int * Fcomm, int * typesize ,
115156

116157
}
117158

118-
/* handle different sized data types appropriately. */
119-
ierr = MPI_Type_match_size (MPI_TYPECLASS_REAL, *typesize, &dtype);
120-
if (MPI_SUCCESS != ierr) {
121-
ierr = MPI_Type_match_size (MPI_TYPECLASS_INTEGER, *typesize, &dtype);
122-
if (MPI_SUCCESS != ierr) {
123-
#ifndef MS_SUA
124-
fprintf(stderr,"%s %d FATAL ERROR: unhandled typesize = %d!!\n", __FILE__,__LINE__,*typesize) ;
125-
#endif
126-
MPI_Abort(MPI_COMM_WORLD,1) ;
127-
}
128-
}
159+
dtype = get_datatype_from_typesize( typesize );
129160

130161
ierr = MPI_Gatherv( inbuf , *ninbuf, dtype,
131162
outbuf , recvcounts , displace, dtype,
@@ -204,17 +235,7 @@ dst_on_comm ( int * Fcomm, int * typesize ,
204235
}
205236
}
206237

207-
/* handle different sized data types appropriately. */
208-
ierr = MPI_Type_match_size (MPI_TYPECLASS_REAL, *typesize, &dtype);
209-
if (MPI_SUCCESS != ierr) {
210-
ierr = MPI_Type_match_size (MPI_TYPECLASS_INTEGER, *typesize, &dtype);
211-
if (MPI_SUCCESS != ierr) {
212-
#ifndef MS_SUA
213-
fprintf(stderr,"%s %d FATAL ERROR: unhandled typesize = %d!!\n", __FILE__,__LINE__,*typesize) ;
214-
#endif
215-
MPI_Abort(MPI_COMM_WORLD,1) ;
216-
}
217-
}
238+
dtype = get_datatype_from_typesize( typesize );
218239

219240
MPI_Scatterv( inbuf, sendcounts, displace, dtype,
220241
outbuf, *noutbuf, dtype,

inc/version_decl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
CHARACTER (LEN=*), PARAMETER :: release_version = 'V4.7.0'
1+
CHARACTER (LEN=*), PARAMETER :: release_version = 'V4.7.1'

0 commit comments

Comments
 (0)