Precice error message: data is not marked as read

Hi,
I am writing a dummy structural adapter to couple with A fluid solver for testing. I have done the other way round (a dummy fluid solver) and anything works. Now, when I initialize the interface and write:

   if self.interface.is_action_required(precice.action_write_initial_data()):
       self.interface.write_block_vector_data(self.displacementID, self.nodeVertexIDs, self.displacement)
       self.interface.mark_action_fulfilled(precice.action_write_initial_data())
   self.interface.initialize_data()
   if self.interface.is_read_data_available():
       self.force = self.interface.read_block_vector_data(self.forceID, self.nodeVertexIDs)

It enters in “is_read_data_available” but gives me the following error:

—[precice] initializeData is skipped since no data has to be initialized
—[precice] ERROR: Data is not marked as read! 3

What’s happening?
Thank you
Claudio

Hi Claudio,

You are trying to read a data field that in the preCICE configuration is listed as “write” for this participant. In your case, self.forceID is not a data field that the dummy structure solver reads. Please check your config file and your getDataID.

Please note that is_read_data_available can still be true. You are simply accessing the wrong data.

The error message could be better. We are working on improving error messages including this one: https://github.com/precice/precice/issues/680 and https://github.com/precice/precice/issues/698.

Benjamin

Hi Benjamin,
thank you for your answer. It solved my problem. I was pointing to the wrong data.
Claudio