visit_broadcast_string_callback detects a negative string lenght for a parallel simulation. #19219
Replies: 3 comments
-
Beta Was this translation helpful? Give feedback.
-
Is this your definition of the function? Else where are you getting this definition? Have you looked at any of the simulation examples for help in setting up your control loop? I see a difference in your setting of |
Beta Was this translation helpful? Give feedback.
-
@MuzafarWani Comments you added on January 5th seem to have been lost. I received the email, but they never showed up on github. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am tapping into a simulation data by fetching data from NetCDF functions in the simulation. For one rank the below loop works perfectly fine
_void controlloop(simulation_data *sim, int timestep, int *cts)
{
int blocking, visitstate = 0;
// sim->cycle = *cts;
// printf("DS: Timestep is %d\n",timestep);
if (sim->par_rank == 0)
{
fprintf(stderr, "command> ");
fflush(stderr);
}
}_
But once I add the code for more than 1 rank. It throws errors from the below function
static int visit_broadcast_string_callback(char *str, int len, int sender)
{
return MPI_Bcast(str, len, MPI_CHAR, sender, MPI_COMM_WORLD);
}
it detects a data len either as a negative number or a very large number which has no relation to the simulation.
I have changed the loop to below for more than 1 rank
_void controlloop(simulation_data *sim, int timestep, int *cts)
{
int blocking, visitstate = 0;
// sim->cycle = *cts;
// printf("DS: Timestep is %d\n",timestep);
if (sim->par_rank == 0)
{
fprintf(stderr, "command> ");
fflush(stderr);
}
}_
The above loop never enters the condition
if(VisItAttemptToCompleteConnection() == VISIT_OKAY)
but it does pass the condition check
else if(visitstate == 1)
It is able to detect the incoming connection but doesn't complete the same.
Can you let me know how to resolve it
Beta Was this translation helpful? Give feedback.
All reactions