Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 171) sorted by relevance

1234567

/petsc/lib/petsc/bin/
H A Dgeneratefortranbindings.py81 …pen(os.path.join(petscarch, 'include', pkgname, 'finclude', file.replace('.h90', '.h')),'a') as fd:
82 fd.write('#define ' + funname + '(')
85 if cnt > 0: fd.write(', ')
86 fd.write(k.name)
88 fd.write(', ierr) ' + funname + 'Cptr(')
91 if cnt > 0: fd.write(', ')
94 fd.write('petscFtnCtx')
96 fd.write(k.name)
98 fd.write(', ierr); call c_f_pointer(petscFtnCtx, ' + name + ')\n')
100 with open(ofile,"a") as fd:
[all …]
/petsc/lib/petsc/bin/maint/
H A DprettyprintAPI.py38 with open(os.path.join('doc','objects.md'),"w") as fd:
39 fd.write(':html_theme.sidebar_secondary.remove: true\n')
40 fd.write('::::{tab-set}\n\n')
42 fd.write(':::{tab-item} PETSc objects\n')
44 fd.write('- '+i+'\n')
46 fd.write(' - '+j+str(classes[i][j])+'\n')
47 fd.write(':::\n')
49 fd.write(':::{tab-item} Typedefs to basic types\n')
53 fd.write('- '+i+' = '+typedefs[i].value+'\n')
54 fd.write(':::\n')
[all …]
H A Dbk2hg.py23 fd=os.popen('hg tip -v')
24 buf = fd.read()
25 fd.close()
53 fd,tmp_file = tempfile.mkstemp()
54 err=os.write(fd,'d\nd\nd\nd\nd\nd\nd\nd\nd\nd\nd\nd\nd\nd\nd\nd\nd\nd\nd\nd\nd\nd\nd\nd\n')
55 os.close(fd)
96 fd=os.popen('bk changes -k -r+')
97 bk_cset_max=fd.read().strip()
98 fd.close()
102 fd=os.popen('hg tip -v')
[all …]
H A Dbk2darcs.py70 fd=os.popen('bk changes -k -r+')
71 bk_cset_max=fd.read().strip()
72 fd.close()
76 fd=os.popen('darcs changes --last=1')
77 buf=fd.read()
78 fd.close()
95 fd=os.popen('bk changes -end:KEY: -f -r'+'"'+bk_cset_min+'".."'+bk_cset_max+'"')
96 buf=fd.read()
97 fd.close()
110 fd=os.popen('bk changes -and:I: -r'+revq)
[all …]
H A Drunjobs.py53 with open('.gitlab-ci.yml','r') as fd:
54 ci = fd.read()
93 with open('.gitlab-ci.yml','w') as fd:
94 fd.write(File_Header)
95 fd.write(Run_CMD)
111 fd.write(a+'\n\n')
113 fd.write(a+'\n\n')
115 fd.write(a+'\n\n')
116 if not alljobs: fd.write(extraJob)
/petsc/src/sys/fileio/ftn-custom/
H A Dzsysiof.c48 PETSC_EXTERN void petscbinarywriteint_(int *fd, void *p, PetscInt *n, PetscDataType *type, int *ier… in petscbinarywriteint_() argument
50 *ierr = PetscBinaryWrite(*fd, p, *n, *type); in petscbinarywriteint_()
53 PETSC_EXTERN void petscbinarywritereal_(int *fd, void *p, PetscInt *n, PetscDataType *type, int *ie… in petscbinarywritereal_() argument
55 *ierr = PetscBinaryWrite(*fd, p, *n, *type); in petscbinarywritereal_()
58 PETSC_EXTERN void petscbinarywritecomplex_(int *fd, void *p, PetscInt *n, PetscDataType *type, int … in petscbinarywritecomplex_() argument
60 *ierr = PetscBinaryWrite(*fd, p, *n, *type); in petscbinarywritecomplex_()
63 PETSC_EXTERN void petscbinarywriteint1_(int *fd, void *p, PetscInt *n, PetscDataType *type, int *ie… in petscbinarywriteint1_() argument
65 *ierr = PetscBinaryWrite(*fd, p, *n, *type); in petscbinarywriteint1_()
68 PETSC_EXTERN void petscbinarywritereal1_(int *fd, void *p, PetscInt *n, PetscDataType *type, int *i… in petscbinarywritereal1_() argument
70 *ierr = PetscBinaryWrite(*fd, p, *n, *type); in petscbinarywritereal1_()
[all …]
/petsc/doc/
H A Dbuild_man_index.py26 with open(headfilename, "r") as fd:
27 headbuf = fd.read()
34 with open(outfilename, "w") as fd:
37 fd.write(':html_theme.sidebar_secondary.remove: true\n')
38 fd.write(headbuf)
39 fd.write('\n')
45 fd.write('\n## No %s routines\n' % level)
48 fd.write('\n## %s\n' % title)
49 fd.write('```{hlist}\n')
50 fd.write("---\n")
[all …]
H A Dbuild_c2html.py27 … open('htmlmap.tmp', "w") as fdw, open(os.path.join(build_dir,'manualpages','htmlmap'), "r") as fd:
28 fdw.write(fd.read().replace('man+manualpages/','man+HTML_ROOT/manualpages/'))
29 …'htmlmap.tmp', "a") as fdw, open(os.path.join(build_dir,'manualpages','mpi.www.index'), "r") as fd:
30 fdw.write(fd.read())
54 with open(os.path.join('doc','manualpages','MANSECHeaders',mansec)) as fd:
55 fdw.write(fd.read())
66 with open(os.path.join(root,f)) as fd:
67 line = fd.readline()
91 with open(os.path.join(petsc_dir,'c2html.mk'),'w') as fd:
92 fd.write('files = ')
[all …]
/petsc/src/mat/matfd/ftn-custom/
H A Dzfdmatrixf.c34 static PetscErrorCode ourmatfdcoloringfunctionts(TS ts, PetscReal t, Vec x, Vec y, MatFDColoring fd) in ourmatfdcoloringfunctionts() argument
37 …*, PetscReal *, Vec *, Vec *, void *, PetscErrorCode *))fd->ftn_func_pointer)(&ts, &t, &x, &y, fd-… in ourmatfdcoloringfunctionts()
41 static PetscErrorCode ourmatfdcoloringfunctionsnes(SNES snes, Vec x, Vec y, MatFDColoring fd) in ourmatfdcoloringfunctionsnes() argument
44 …void (*)(SNES *, Vec *, Vec *, void *, PetscErrorCode *))fd->ftn_func_pointer)(&snes, &x, &y, fd->… in ourmatfdcoloringfunctionsnes()
56 PETSC_EXTERN void matfdcoloringsetfunctionts_(MatFDColoring *fd, void (*f)(TS *, double *, Vec *, V… in matfdcoloringsetfunctionts_() argument
58 (*fd)->ftn_func_pointer = (PetscFortranCallbackFn *)f; in matfdcoloringsetfunctionts_()
59 (*fd)->ftn_func_cntx = ctx; in matfdcoloringsetfunctionts_()
61 …*ierr = MatFDColoringSetFunction(*fd, (MatFDColoringFn *)(PetscVoidFn *)ourmatfdcoloringfunctionts… in matfdcoloringsetfunctionts_()
64 PETSC_EXTERN void matfdcoloringsetfunction_(MatFDColoring *fd, void (*f)(SNES *, Vec *, Vec *, void… in matfdcoloringsetfunction_() argument
66 (*fd)->ftn_func_pointer = (PetscFortranCallbackFn *)f; in matfdcoloringsetfunction_()
[all …]
/petsc/share/petsc/matlab/
H A DPetscBagRead.m1 function bag = PetscBagRead(fd)
10 bagsize = read(fd,1,'int32'); % no longer used after petsc-3.2 just here for backward compatibili…
11 count = read(fd,1,'int32');
13 bag.bag_name = deblank(char(read(fd,name_len,'uchar')'));
14 bag.help.bag_help = deblank(char(read(fd,help_len,'uchar')'));
17 offsetdtype = read(fd,2,'int32');
19 name = strclean(deblank(char(read(fd,name_len,'uchar')')));
20 help = deblank(char(read(fd,help_len,'uchar')'));
21 msize = read(fd,1,'int32');
24 val = read(fd,msize,'int32');
[all …]
H A DPetscBinaryRead.m18 % For example: fd = PetscOpenFile('filename');
19 % a = PetscBinaryRead(fd);
20 % b = PetscBinaryRead(fd);
31 fd = PetscOpenSocket(); variable
33 fd = PetscOpenFile(inarg); variable
35 fd = PetscOpenSocket(inarg); variable
37 fd = inarg; variable
70 fd = PetscOpenFile([inarg '_double']); variable
81 header = double(read(fd,1,indices));
93 header = double(read(fd,3,indices));
[all …]
H A DPetscReadBinaryTrajectory.m31 fd = PetscOpenFile(fullname); variable
32 n = read(fd,1,indices);
33 sizes = read(fd,n,indices);
36 names{i} = deblank(char(read(fd,sizes(i),'uchar')))';
48 fd = PetscOpenFile(fullname); variable
49 header = double(read(fd,1,indices));
58 m = double(read(fd,1,indices));
62 v = read(fd,m,precision);
66 t(stepnum) = read(fd,1,precision);
69 close(fd);
/petsc/src/sys/fileio/
H A Dmpiuopen.c34 FILE *fd; in PetscFOpen() local
43 if (isstdout || !name) fd = PETSC_STDOUT; in PetscFOpen()
44 else if (isstderr) fd = PETSC_STDERR; in PetscFOpen()
52 fd = fopen(fname, mode); in PetscFOpen()
53 PetscCheck(fd, PETSC_COMM_SELF, PETSC_ERR_FILE_OPEN, "Unable to open file %s", fname); in PetscFOpen()
55 } else fd = NULL; in PetscFOpen()
56 *fp = fd; in PetscFOpen()
74 PetscErrorCode PetscFClose(MPI_Comm comm, FILE *fd) in PetscFClose() argument
81 if (rank == 0 && fd != PETSC_STDOUT && fd != PETSC_STDERR) { in PetscFClose()
82 err = fclose(fd); in PetscFClose()
[all …]
H A Dfretrieve.c124 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()
[all …]
H A Dsmatlab.c29 FILE *fd; in PetscStartMatlab() local
39 PetscCall(PetscPOpen(comm, machine, "/usr/ucb/ps -ugxww | grep matlab | grep -v grep", "r", &fd)); in PetscStartMatlab()
41 if (rank == 0) found = fgets(buf, 1024, fd); in PetscStartMatlab()
43 PetscCall(PetscPClose(comm, fd)); in PetscStartMatlab()
52 PetscCall(PetscPOpen(comm, machine, command, "r", &fd)); in PetscStartMatlab()
53 PetscCall(PetscPClose(comm, fd)); in PetscStartMatlab()
/petsc/src/mat/tests/
H A Dex136.c10 PetscViewer fd; in main() local
21 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, file, FILE_MODE_READ, &fd)); in main()
28 PetscCall(MatLoad(A, fd)); in main()
29 PetscCall(PetscViewerDestroy(&fd)); in main()
34 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "fileoutput", FILE_MODE_WRITE, &fd)); in main()
35 PetscCall(PetscViewerBinarySetFlowControl(fd, 3)); in main()
39 PetscCall(MatView(A, fd)); in main()
40 PetscCall(PetscViewerDestroy(&fd)); in main()
43 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "fileoutput", FILE_MODE_READ, &fd)); in main()
46 PetscCall(MatLoad(B, fd)); in main()
[all …]
H A Dex191.c8 PetscViewer fd; in main() local
23 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "ex191matrix", FILE_MODE_WRITE, &fd)); in main()
24 PetscCall(PetscViewerPushFormat(fd, PETSC_VIEWER_NATIVE)); in main()
25 PetscCall(MatView(A, fd)); in main()
27 PetscCall(PetscViewerPopFormat(fd)); in main()
28 PetscCall(PetscViewerDestroy(&fd)); in main()
37 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "ex191matrix", FILE_MODE_READ, &fd)); in main()
38 PetscCall(MatLoad(A, fd)); in main()
39 PetscCall(PetscViewerDestroy(&fd)); in main()
H A Dex198.c11 PetscViewer fd; in main() local
28 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, file[0], FILE_MODE_READ, &fd)); in main()
30 PetscCall(MatLoad(A, fd)); in main()
31 PetscCall(PetscViewerDestroy(&fd)); in main()
33 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, file[1], FILE_MODE_READ, &fd)); in main()
35 PetscCall(MatLoad(B, fd)); in main()
36 PetscCall(PetscViewerDestroy(&fd)); in main()
38 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, file[2], FILE_MODE_READ, &fd)); in main()
40 PetscCall(MatLoad(C, fd)); in main()
41 PetscCall(PetscViewerDestroy(&fd)); in main()
H A Dex206.c7 PetscViewer fd; /* viewer */ in main() local
19 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, file, FILE_MODE_READ, &fd)); in main()
20 PetscCall(MatLoad(A, fd)); in main()
21 PetscCall(PetscViewerDestroy(&fd)); in main()
26 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, file, FILE_MODE_READ, &fd)); in main()
27 PetscCall(MatLoad(A, fd)); in main()
28 PetscCall(PetscViewerDestroy(&fd)); in main()
/petsc/config/
H A Dgmakegen.py198 def gen_gnumake(self, pkg_arch,fd): argument
201fd.write('%(stem)s.%(lang)s := %(srcs)s\n' % dict(stem=stem, lang=lang.replace('_','.'), srcs=' '.…
207 def gen_ninja(self, fd): argument
214fd.write('build %(obj)s : %(lang)s_COMPILE %(src)s\n' % dict(obj=obj, lang=lang.upper(), src=os.pa…
216 fd.write('\n')
217fd.write('build $libdir/libpetsc.so : %s_LINK_SHARED %s\n\n' % ('CF'[self.have_fortran], ' '.join(…
218 fd.write('build petsc : phony || $libdir/libpetsc.so\n\n')
222 with open(arch_files, 'w') as fd:
223 gendeps = petsc.gen_gnumake(pkg_arch,fd)
224 fd.write('\n')
[all …]
/petsc/src/sys/utils/
H A Dmpitr.c26 PetscErrorCode PetscMPIDump(FILE *fd) in PetscMPIDump() argument
33 if (!fd) fd = PETSC_STDOUT; in PetscMPIDump()
38 …PetscCall(PetscFPrintf(PETSC_COMM_SELF, fd, "[%d]You have not waited on all non-blocking sends and… in PetscMPIDump()
39 …PetscCall(PetscFPrintf(PETSC_COMM_SELF, fd, "[%d]Number non-blocking sends %g receives %g number o… in PetscMPIDump()
40 PetscCall(PetscFFlush(fd)); in PetscMPIDump()
49 …PetscCall(PetscFPrintf(PETSC_COMM_SELF, fd, "Total number sends %g not equal receives %g\n", tsend… in PetscMPIDump()
50 PetscCall(PetscFFlush(fd)); in PetscMPIDump()
57 PetscErrorCode PetscMPIDump(FILE *fd) in PetscMPIDump() argument
/petsc/src/sys/ftn-mod/
H A Dpetscsysmod.F90317 subroutine petscbinaryreadcomplex(fd, data, num, count, type, z)
320 integer4 fd
327 subroutine petscbinaryreadreal(fd, data, num, count, type, z)
330 integer4 fd
337 subroutine petscbinaryreadint(fd, data, num, count, type, z)
340 integer4 fd
347 subroutine petscbinaryreadcomplex1(fd, data, num, count, type, z)
350 integer4 fd
357 subroutine petscbinaryreadreal1(fd, data, num, count, type, z)
360 integer4 fd
[all …]
/petsc/src/sys/classes/viewer/impls/vu/
H A Dpetscvu.c12 FILE *fd; member
27 PetscCall(PetscFClose(PetscObjectComm((PetscObject)viewer), vu->fd)); in PetscViewerFileClose_VU()
28 vu->fd = NULL; in PetscViewerFileClose_VU()
53 if (rank == 0) PetscCall(PetscFFlush(((PetscViewer_VU *)viewer->data)->fd)); in PetscViewerFlush_VU()
99 vu->fd = fopen(fname, "r"); in PetscViewerFileSetName_VU()
102 vu->fd = fopen(fname, "w"); in PetscViewerFileSetName_VU()
105 vu->fd = fopen(fname, "a"); in PetscViewerFileSetName_VU()
108 vu->fd = fopen(fname, "r+"); in PetscViewerFileSetName_VU()
109 if (!vu->fd) vu->fd = fopen(fname, "w+"); in PetscViewerFileSetName_VU()
115 vu->fd = fopen(fname, "r+"); in PetscViewerFileSetName_VU()
[all …]
/petsc/config/BuildSystem/config/packages/
H A Dopencascade.py38 fd = open(modfile, 'w')
39 fd.write('''\
48 fd.close()
50 fd = open(toolfile, 'w')
51 fd.write('')
52 fd.close()
54 fd = open(sampfile, 'w')
55 fd.write('')
56 fd.close()
/petsc/src/mat/tutorials/
H A Dex10.c15 PetscViewer fd; /* viewer */ in main() local
34 PetscCall(PetscViewerCreate(PETSC_COMM_WORLD, &fd)); in main()
35 PetscCall(PetscViewerSetType(fd, PETSCVIEWERBINARY)); in main()
36 PetscCall(PetscViewerSetFromOptions(fd)); in main()
38 if (flg) PetscCall(PetscViewerPushFormat(fd, format)); in main()
39 PetscCall(PetscViewerFileSetMode(fd, FILE_MODE_READ)); in main()
40 PetscCall(PetscViewerFileSetName(fd, file)); in main()
51 PetscCall(MatLoad(A, fd)); in main()
52 PetscCall(PetscViewerDestroy(&fd)); in main()

1234567