ECC-1094: Implement a way to check if an instance of ecCodes has been compiled with thread support

This commit is contained in:
Shahram Najm 2020-03-22 19:54:43 +00:00
parent c0f9493684
commit f67c83b287
5 changed files with 86 additions and 69 deletions

View File

@ -30,6 +30,14 @@ program get_product_kind
call codes_get_api_version(version)
write(*,*) 'API version: ',version
write(*,*) 'ecCodes settings: '
write(*,*) ' ECCODES_POSIX_THREADS: ',ECCODES_SETTINGS_POSIX_THREADS
write(*,*) ' ECCODES_OMP_THREADS: ',ECCODES_SETTINGS_OMP_THREADS
write(*,*) ' ECCODES_SETTINGS_MEMFS: ',ECCODES_SETTINGS_MEMFS
write(*,*) ' ECCODES_SETTINGS_JPEG: ',ECCODES_SETTINGS_JPEG
write(*,*) ' ECCODES_SETTINGS_PNG: ',ECCODES_SETTINGS_PNG
write(*,*) ' ECCODES_SETTINGS_AEC: ',ECCODES_SETTINGS_AEC
! the first message is loaded from file
! ihandle is the message id to be used in subsequent calls
call codes_new_from_file(ifile,ihandle,CODES_PRODUCT_ANY,iret)

View File

@ -1,5 +1,7 @@
if( HAVE_FORTRAN )
configure_file( eccodes_settings.h.in eccodes_settings.h @ONLY )
set( srcdir ${CMAKE_CURRENT_SOURCE_DIR} )
set( bindir ${CMAKE_CURRENT_BINARY_DIR} )

View File

@ -15,6 +15,7 @@ module eccodes
implicit none
include "eccodes_constants.h"
include "eccodes_visibility.h"
include "eccodes_settings.h"
real(8), parameter,public :: CODES_MISSING_DOUBLE = -1.D+100
integer(4), parameter,public :: CODES_MISSING_LONG = 2147483647

View File

@ -0,0 +1,6 @@
integer, parameter, public :: ECCODES_SETTINGS_POSIX_THREADS = @HAVE_ECCODES_THREADS@
integer, parameter, public :: ECCODES_SETTINGS_OMP_THREADS = @HAVE_ECCODES_OMP_THREADS@
integer, parameter, public :: ECCODES_SETTINGS_MEMFS = @HAVE_MEMFS@
integer, parameter, public :: ECCODES_SETTINGS_JPEG = @HAVE_JPEG@
integer, parameter, public :: ECCODES_SETTINGS_PNG = @HAVE_PNG@
integer, parameter, public :: ECCODES_SETTINGS_AEC = @HAVE_AEC@