diff --git a/Common/read_field_indices.F90 b/Common/read_field_indices.F90 index 93f012d42c20c3102220118c622a9902efaca917..c906f41f1e2d55b6eebd3e3ab811750707120821 100644 --- a/Common/read_field_indices.F90 +++ b/Common/read_field_indices.F90 @@ -7,13 +7,15 @@ contains subroutine read_field_indices(hshp, rank) ! Libraries: +#ifdef HAVE_MPI use ezmpi, only: ezmpi_bcast +#endif use shapelib_03, only: dbf_get_field_index_03 use derived_types, only: shpc TYPE(shpc), intent(inout):: hshp - integer, intent(in):: rank + integer, intent(in):: rank ! should be 0 if not in MPI program !--------------------------------------------------------------------- @@ -35,6 +37,7 @@ contains call dbf_get_field_index_03(hshp%max_speed, "ssh", hshp%max_speed_ssh) end if +#ifdef HAVE_MPI call ezmpi_bcast(hshp%extr_ssh, root = 0) call ezmpi_bcast(hshp%extr_date, root = 0) call ezmpi_bcast(hshp%extr_eddy_index, root = 0) @@ -45,6 +48,7 @@ contains call ezmpi_bcast(hshp%out_radius4, root = 0) call ezmpi_bcast(hshp%max_speed_r_eq_area, root = 0) call ezmpi_bcast(hshp%max_speed_ssh, root = 0) +#endif end subroutine read_field_indices diff --git a/Common/shpc_open.F90 b/Common/shpc_open.F90 index 7639b1f08bb82edae7b1b5e75e7fe914a7f49173..a887ae0d13f5d8027833f5baf8824d14f231827e 100644 --- a/Common/shpc_open.F90 +++ b/Common/shpc_open.F90 @@ -7,7 +7,9 @@ contains subroutine shpc_open(hshp, shpc_dir, rank) ! Libraries: +#ifdef HAVE_MPI use ezmpi, only: ezmpi_bcast +#endif USE jumble, only: new_unit use shapelib_03, only: shp_open_03 @@ -16,7 +18,7 @@ contains TYPE(shpc), intent(out):: hshp character(len = *), intent(in):: shpc_dir - integer, intent(in):: rank + integer, intent(in):: rank ! should be 0 if not in MPI program ! Local: integer unit @@ -41,7 +43,9 @@ contains hshp%cyclone = trim(adjustl(orientation)) == "cyclones" end if +#ifdef HAVE_MPI call ezmpi_bcast(hshp%cyclone, root = 0) +#endif end subroutine shpc_open