Lines Matching refs:fd
124 FILE *fd; in PetscSharedTmp() local
171 fd = fopen(filename, "w"); in PetscSharedTmp()
172 … PetscCheck(fd, PETSC_COMM_SELF, PETSC_ERR_FILE_OPEN, "Unable to open test file %s", filename); in PetscSharedTmp()
173 err = fclose(fd); in PetscSharedTmp()
178 fd = fopen(filename, "r"); in PetscSharedTmp()
179 if (fd) cnt = 1; in PetscSharedTmp()
181 if (fd) { in PetscSharedTmp()
182 err = fclose(fd); in PetscSharedTmp()
243 FILE *fd; in PetscSharedWorkingDirectory() local
284 fd = fopen(filename, "w"); in PetscSharedWorkingDirectory()
285 … PetscCheck(fd, PETSC_COMM_SELF, PETSC_ERR_FILE_OPEN, "Unable to open test file %s", filename); in PetscSharedWorkingDirectory()
286 err = fclose(fd); in PetscSharedWorkingDirectory()
291 fd = fopen(filename, "r"); in PetscSharedWorkingDirectory()
292 if (fd) cnt = 1; in PetscSharedWorkingDirectory()
294 if (fd) { in PetscSharedWorkingDirectory()
295 err = fclose(fd); in PetscSharedWorkingDirectory()
406 FILE *fd; in PetscFileRetrieve() local
410 fd = fopen(localname, "r"); in PetscFileRetrieve()
411 …PetscCheck(fd, PETSC_COMM_SELF, PETSC_ERR_PLIB, "PetscTestFile() indicates %s exists but fopen() c… in PetscFileRetrieve()
412 str = fgets(buf, sizeof(buf) - 1, fd); in PetscFileRetrieve()
418 str = fgets(buf, sizeof(buf) - 1, fd); in PetscFileRetrieve()
420 fclose(fd); in PetscFileRetrieve()