Opened 10 years ago
Closed 10 years ago
#58 closed defect (fixed)
wrong result for "xios_is_valid_context" call
Reported by: | ymipsl | Owned by: | rlacroix |
---|---|---|---|
Priority: | minor | Component: | XIOS |
Version: | 1.0 | Keywords: | |
Cc: | mike.rezny@… |
Description
From Mike Rezny :
The following program does not give the result I was expecting:
PROGRAM test1
USE xios
USE mod_wait
USE mpi
IMPLICIT NONE
- CHARACTER(len=*),PARAMETER
- id = "client"
- CHARACTER(len=128)
- value
- TYPE(xios_time)
- dtime
- TYPE(xios_context)
- ctx_hdl
- TYPE(xios_domain)
- domain_hdl
- TYPE(xios_axis)
- axis_hdl
- TYPE(xios_grid)
- grid_hdl
- TYPE(xios_fieldgroup)
- fieldgroup_hdl
- TYPE(xios_field)
- field_hdl
- TYPE(xios_file)
- file_hdl
- INTEGER
- comm, rank, size, ierr
- LOGICAL
- ok CALL MPI_INIT(ierr) CALL init_wait CALL xios_initialize(id, return_comm = comm) CALL MPI_COMM_RANK(comm, rank, ierr) CALL MPI_COMM_SIZE(comm, size, ierr) CALL xios_context_initialize("test", comm) CALL xios_get_handle("test", ctx_hdl) CALL xios_set_current_context(ctx_hdl) CALL xios_get_handle("domain_A", domain_hdl) CALL xios_get_handle("axis_A", axis_hdl) CALL xios_get_handle("grid_A", grid_hdl) PRINT *, 'valid context [test]: ', xios_is_valid_context("test") PRINT *, 'valid domain [domain_A]: ', xios_is_valid_domain("domain_A") PRINT *, 'valid axis [axis_A]: ', xios_is_valid_axis("axis_A") PRINT *, 'valid grid [grid_A]: ', xios_is_valid_grid("grid_A") CALL xios_close_context_definition() CALL xios_context_finalize() CALL xios_finalize() CALL MPI_FINALIZE(ierr)
The program output is:
valid context [test]: F
valid domain [domain_A]: T
valid axis [axis_A]: T
valid grid [grid_A]: T
Why is the program returning FALSE for the context ‘test’? I was expecting TRUE.
I am sure that I do not understand something.
Here is the XML input file:
<?xml version="1.0"?>
<simulation>
<context id="test" calendar_type="Gregorian" start_date="2012-03-01 15:00:00" >
<domain_definition>
<domain id="domain_A" />
</domain_definition>
<axis_definition>
<axis id="axis_A" />
</axis_definition>
<grid_definition>
<grid id = "grid_A" />
</grid_definition>
<field_definition level="1" enabled=".FALSE." >
<field id="field_A" operation="average" freq_op="3600s"
grid_ref="grid_A" />
</field_definition>
<file_definition
type = "multiple_file"
par_access = "collective"
output_freq = "6h"
output_level = "10"
enabled = ".TRUE." >
<file id="output" name="output" >
<field field_ref="field_A" />
</file>
</file_definition>
</context>
<context id="xios">
<variable_definition>
<variable_group id="buffer">
buffer_size = 8000000
buffer_server_factor_size = 2
</variable_group>
<variable_group id="parameters" >
<variable id="using_server" type="boolean" >
false
</variable>
<variable id="info_level" type="int" >
50
</variable>
</variable_group>
</variable_definition>
</context>
</simulation>
kindest regards
Mike
Change History (2)
comment:1 Changed 10 years ago by rlacroix
- Owner changed from ymipsl to rlacroix
- Status changed from new to assigned
comment:2 Changed 10 years ago by rlacroix
- Resolution set to fixed
- Status changed from assigned to closed
Fixed by r520 and r521.