You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pdc.h"
int
main(int argc, char **argv)
{
pdcid_t pdc_id, cont_id, cont_prop, cont_id2;
int rank = 0, size = 1;
int ret_value = 0;
// create a pdc
#ifdef ENABLE_MPI
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
#endif
pdc_id = PDCinit("pdc");
cont_prop = PDCprop_create(PDC_CONT_CREATE, pdc_id);
if (cont_prop <= 0)
printf("Fail to create container property @ line %d!\n", __LINE__);
// create a container
cont_id = PDCcont_create("VPIC_cont", cont_prop);
if (cont_id <= 0)
printf("Fail to create container @ line %d!\n", __LINE__);
cont_id2 = PDCcont_create("VPIC_cont", cont_prop);
if (cont_id2 <= 0)
printf("Fail to create container @ line %d!\n", __LINE__);
PDCclose(pdc_id);
#ifdef ENABLE_MPI
MPI_Finalize();
#endif
return ret_value;
}
The text was updated successfully, but these errors were encountered:
gerzytet
changed the title
Attempting to create a container with a duplicate name will return the existing container's id instead returning FAIL
Attempting to create a container with a duplicate name will return the existing container's id instead of returning 0
Jun 28, 2022
This is sort of an (unintended) feature, for all the PDC parallel tests, all ranks call PDCcont_create() at the beginning, assuming one rank sends the create request to the server, which creates a container, the rest of the ranks would just "open" the container without getting a failure.
To make PDCcont_create() fail when there exists a container with the same name we will need to change the test codes to use a collective version of the PDCcont_create().
code to reproduce:
The text was updated successfully, but these errors were encountered: