Skip to content

Commit

Permalink
Merge branch 'develop' into feature/mathomp4/fixes-for-ifx
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 authored Dec 5, 2024
2 parents aa313a0 + 69d34a2 commit f22ece9
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fixed issue of some Baselibs builds appearing to support zstandard. This is not possible due to Baselibs building HDF5 and netCDF as static libraries
- Workaround ifx bug in `pfio/ArrayReference.F90` (NOTE: This currently targets all versions of ifx, but will need to be qualified or removed in the future)
- Updates to support llvm-flang
- Trajectory sampler: fix a bug when group_name does not exist in netCDF file and a bug that omitted the first time point
- Fixed a bug where the periodicity around the earth of the lat-lon grid was not being set properly when grid did not span from pole to pole

Expand Down
7 changes: 4 additions & 3 deletions generic/AbstractComponent.F90
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module mapl_AbstractComponent
use pFlogger, only: t_Logger => Logger
implicit none
private

Expand Down Expand Up @@ -96,7 +97,7 @@ subroutine i_RunChild(this, name, clock, phase, unusable, rc)
end subroutine i_RunChild

subroutine i_SetLogger(this, logger)
use pfl_logger, only: t_Logger => Logger
import t_Logger
import AbstractComponent
implicit none
class(AbstractComponent), intent(inout) :: this
Expand All @@ -105,13 +106,13 @@ subroutine i_SetLogger(this, logger)
end subroutine i_SetLogger

function i_GetLogger(this) result(logger)
use pfl_logger, only: t_Logger => Logger
import t_Logger
import AbstractComponent
implicit none
class(t_Logger), pointer :: logger
class(AbstractComponent), intent(in) :: this
end function i_GetLogger

end interface

end module mapl_AbstractComponent
4 changes: 3 additions & 1 deletion generic/MAPL_Generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9805,8 +9805,10 @@ subroutine READIT(WHICH)
if (io_rank == 0) then
print *,'Using parallel IO for reading file: ',trim(DATAFILE)

#ifdef __NAG_COMPILER_RELEASE
#if defined( __NAG_COMPILER_RELEASE)
_FAIL('NAG does not provide ftell. Convert to stream I/O')
#elif defined(__flang__)
_FAIL('flang does not provide ftell. Convert to stream I/O')
#else
offset = _FTELL(UNIT)+4
#endif
Expand Down
1 change: 0 additions & 1 deletion gridcomps/History/Sampler/MAPL_EpochSwathMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ module MAPL_EpochSwathMod
use MAPL_TimeDataMod
use MAPL_VerticalDataMod
use MAPL_Constants
use pFIO
use MAPL_GriddedIOItemVectorMod
use MAPL_GriddedIOItemMod
use MAPL_ExceptionHandling
Expand Down
6 changes: 5 additions & 1 deletion include/unused_dummy.H
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
#ifdef _UNUSED_DUMMY
# undef _UNUSED_DUMMY
#endif
#define _UNUSED_DUMMY(x) if (.false.) then; associate (q____ => x); end associate; endif
#if defined(__flang__)
# define _UNUSED_DUMMY(x) if (.false.) then; print*, shape(x); endif
#else
# define _UNUSED_DUMMY(x) if (.false.) then; associate (q____ => x); end associate; endif
#endif
9 changes: 9 additions & 0 deletions pfio/AbstractServer.F90
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ subroutine set_status(this,status)

!$omp critical (counter_status)
this%status = status
! llvm-flang has an issue with omp flush of complex data structures
#if !defined(__flang__)
!$omp flush (this)
#endif
!$omp end critical (counter_status)
end subroutine set_status

Expand All @@ -217,7 +220,10 @@ subroutine update_status(this, rc)
!$omp critical (counter_status)
this%status = this%status -1
status = this%status
! llvm-flang has an issue with omp flush of complex data structures
#if !defined(__flang__)
!$omp flush (this)
#endif
!$omp end critical (counter_status)
if (status /= 0) then
_RETURN(_SUCCESS)
Expand Down Expand Up @@ -290,7 +296,10 @@ subroutine set_AllBacklogIsEmpty(this,status)

!$omp critical (backlog_status)
this%all_backlog_is_empty = status
! llvm-flang has an issue with omp flush of complex data structures
#if !defined(__flang__)
!$omp flush (this)
#endif
!$omp end critical (backlog_status)
end subroutine set_AllBacklogIsEmpty

Expand Down

0 comments on commit f22ece9

Please sign in to comment.