Home
last modified time | relevance | path

Searched refs:os (Results 1 – 25 of 337) sorted by relevance

12345678910>>...14

/petsc/src/benchmarks/
H A Ddaemon.py23 import os # Miscellaneous OS interfaces.
37 if (hasattr(os, "devnull")):
38 REDIRECT_TO = os.devnull
47 if not workDir is None and os.path.isdir(workDir):
56 pid = os.fork()
64 os.setsid()
104 pid = os.fork() # Fork a second child.
112 os.chdir(WORKDIR)
115 os.umask(UMASK)
118 os._exit(0) # Exit parent (the first child) of the second child.
[all …]
/petsc/lib/petsc/bin/maint/
H A Dbk2hg.py14 import os
21 cur_path=os.path.abspath(os.path.curdir)
22 os.chdir(hg_repo)
23 fd=os.popen('hg tip -v')
26 os.chdir(cur_path)
46 bk_repo = os.path.realpath(bk_repo)
47 hg_repo = os.path.realpath(hg_repo)
51 os.environ['HGMERGE'] = '/bin/true'
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)
[all …]
H A Dbk2darcs.py14 import os
33 bk_repo = os.path.realpath(bk_repo)
34 darcs_repo = os.path.realpath(darcs_repo)
37 if not os.path.exists(bk_repo):
43 if os.path.exists(darcs_repo):
49 os.mkdir(darcs_repo)
50 os.chdir(darcs_repo)
51 os.system("darcs initialize")
58 os.chdir(bk_repo)
59 if os.system("bk changes -r+ > /dev/null 2>&1"):
[all …]
H A Dtestharness_util.py4 import os
9 thisfile = os.path.abspath(inspect.getfile(inspect.currentframe()))
10 pdir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(thisfile)))))
11 sys.path.insert(0, os.path.join(pdir, 'config'))
40 for root, dirs, files in os.walk(top, topdown=False):
49 ext=os.path.splitext(exfile)[1]
53 fullex = os.path.join(root, exfile)
78 fulldfile=os.path.join(datafilespath,dfile)
79 if not os.path.exists(fulldfile):
80 dl_dir=os.path.dirname(fulldfile)
[all …]
H A Dabicheck.py14 import os, sys
46 petscconf = os.path.join(petsc_dir, petsc_arch, 'include', 'petscconf.h')
61 libname_so = os.path.join(petsc_dir, petsc_arch, 'lib', libname+'.so')
62 libname_dylib = os.path.join(petsc_dir, petsc_arch, 'lib', libname+'.dylib')
63 libname_a = os.path.join(petsc_dir, petsc_arch, 'lib', libname+'.a')
65 if os.path.isfile(libname_so):
67 elif os.path.isfile(libname_dylib):
69 elif os.path.isfile(libname_a):
76 header = os.path.join(petsc_dir,'include',name+'.h')
77 if not os.path.isfile(header):
[all …]
H A Dgenerateetags.py11 import os
35 DEVNULL = open(os.devnull, 'w')
50 if os.path.dirname(line).endswith(b'custom') and not line.endswith(b'.h'):
53 line = os.path.basename(line)
73 frlist = [os.path.relpath(path,os.getcwd()) for path in flist]
131 if newls: flist.extend([os.path.join(dirpath,name) for name in newls])
135 if exname in dirnames and os.path.realpath(dirpath) == os.path.realpath(os.getcwd()):
145 filename=os.path.join(dirpath,name)
151 if os.path.isdir(os.path.join(dirpath,name,'petsc','conf')):
168 if files: flist.extend([os.path.join(dirname,name) for name in files])
[all …]
/petsc/config/
H A Dinstall.py3 import os, re, shutil, sys
6 if 'PETSC_DIR' in os.environ:
7 PETSC_DIR = os.environ['PETSC_DIR']
9 fd = open(os.path.join('lib','petsc','conf','petscvariables'))
15 if 'PETSC_ARCH' in os.environ:
16 PETSC_ARCH = os.environ['PETSC_ARCH']
18 fd = open(os.path.join('lib','petsc','conf','petscvariables'))
23 sys.path.insert(0, os.path.join(PETSC_DIR, 'config'))
24 sys.path.insert(0, os.path.join(PETSC_DIR, 'config', 'BuildSystem'))
37 argDB.saveFilename = os.path.join(PETSC_DIR, PETSC_ARCH, 'lib','petsc','conf', 'RDict.db')
[all …]
H A Dconfigure.py3 import os
14 if lang in os.environ and os.environ[lang] != '':
15 lv = os.environ[lang]
21 os.environ[lang] = lv
84 filename = os.path.basename(sys.argv[0])
86 petsc_arch=os.path.splitext(os.path.basename(sys.argv[0]))[0]
208 if b"\r\n" in open(os.path.join('lib','petsc','bin','petscmpiexec'),"rb").read():
217 …if os.path.exists('/usr/bin/cygcheck.exe') and os.path.exists('/usr/bin/link.exe') and chkwincompi…
228 if os.path.exists('/usr/bin/cygcheck.exe'):
229 buf = os.popen('/usr/bin/cygcheck.exe -c cygwin').read()
[all …]
H A Dquery_tests.py5 import os
11 thisfile = os.path.abspath(inspect.getfile(inspect.currentframe()))
12 petscdir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(thisfile…
13 sys.path.insert(0, os.path.join(petscdir, 'config'))
45 ext=os.path.splitext(maybeFile)[1]
59 prefix=os.path.dirname(path).replace("/","_")
60 suffix=os.path.splitext(os.path.basename(path))[0]
164 fname=nameSpace(defroot,os.path.relpath(root,srcdir))
198 pkl_file=os.path.join(testdir,'datatest.pkl')
200 if not os.path.exists(pkl_file):
[all …]
/petsc/config/BuildSystem/config/packages/
H A DBlasLapack.py5 import os
20 …self.libDirs = [os.path.join('lib','64'),os.path.join('lib','ia64'),os.path.join('lib'…
21 … 'ia64','em64t','intel64', os.path.join('lib','32'),os.path.join('lib','ia32'),'32','ia32','']
238 libDir = os.path.join(self.f2cblaslapack.directory,'lib')
239 f2cBlas = [os.path.join(libDir,'libf2cblas.a')]
243 f2cLapack = [os.path.join(libDir,'libf2clapack.a')]
250 libDir = os.path.join(self.netliblapack.directory,'lib')
252 …ld ('netliblapack', [os.path.join(libDir,'libcblas.a'), os.path.join(libDir,'libblas.a')], [os.pat…
254 …yield ('netliblapack', [os.path.join(libDir,'libnblas.a')], [os.path.join(libDir,'libnlapack.a')],…
259 libDir = os.path.join(self.fblaslapack.directory,'lib')
[all …]
H A DAMReX.py2 import os
68 args.append('-DPETSC_DIR='+os.path.abspath(os.path.expanduser(self.argDB['prefix'])))
70 args.append('-DHYPRE_ROOT='+os.path.abspath(os.path.expanduser(self.argDB['prefix'])))
72 args.append('-DPETSC_DIR='+os.path.join(self.petscdir.dir))
74 args.append('-DHYPRE_ROOT='+os.path.join(self.petscdir.dir,self.arch))
76 args.append('-DHYPRE_ROOT='+os.path.abspath(os.path.expanduser(self.argDB['prefix'])))
78 args.append('-DHYPRE_ROOT='+os.path.join(self.petscdir.dir,self.arch))
82 import os
92 conffile = os.path.join(self.packageDir,self.package+'.petscconf')
103 folder = os.path.join(self.packageDir, 'petsc-build')
[all …]
/petsc/config/PETSc/options/
H A DinstallDir.py3 import os
36 self.dir = os.path.abspath(os.path.expanduser(self.framework.argDB['prefix']))
40 os.makedirs(os.path.join(self.dir,'PETScTestDirectory'))
41 os.rmdir(os.path.join(self.dir,'PETScTestDirectory'))
46 self.dir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))
50 self.confDir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))
54 dir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))
55 if not os.path.exists(dir):
56 os.makedirs(dir)
57 for i in ['include','lib','bin',os.path.join('lib','petsc','conf')]:
[all …]
H A DdataFilesPath.py3 import os
31 homeloc = os.path.join(os.getenv('HOME', '.'), 'datafiles')
32 parentloc = os.path.join(self.petscdir.dir,'..','datafiles')
36 …if os.path.isdir(self.framework.argDB['DATAFILESPATH']) and os.path.isdir(os.path.join(self.framew…
40 elif os.path.isdir(homeloc) and os.path.isdir(os.path.join(homeloc,'matrices')):
42 elif os.path.isdir(parentloc) and os.path.isdir(os.path.join(parentloc,'matrices')):
44 …elif os.path.isdir(os.path.join(self.petscdir.dir, '..', '..','Datafiles')) & os.path.isdir(os.pa…
45 self.datafilespath = os.path.join(self.petscdir.dir, '..','..', 'Datafiles')
H A Dpetscdir.py2 import os
25 self.dir = os.path.normpath(self.framework.argDB['PETSC_DIR'])
28 elif 'PETSC_DIR' in os.environ:
29 self.dir = os.path.normpath(os.environ['PETSC_DIR'])
33 self.dir = os.getcwd()
41 elif not os.path.isabs(self.dir):
42 …. Use absolute path - i.e: {2} PETSC_DIR={3}'.format(msg1, self.dir, msg2, os.path.abspath(self.di…
43 elif not os.path.isdir(self.dir):
45 elif os.path.realpath(self.dir) != os.path.realpath(os.getcwd()):
46 …imeError('{0} PETSC_DIR={1} MUST be the current directory {2}'.format(msg1, self.dir, os.getcwd()))
[all …]
/petsc/doc/
H A Dbuild_man_pages.py4 import os
32 doctext_path = os.path.join(build_dir,'manualpages','doctext')
34 if os.path.isfile(os.path.join(dir,'makefile')):
35 lmansec = findlmansec(os.path.join(dir,'makefile'))
38 for file in os.listdir(dir):
40 …if os.path.isfile(os.path.join(dir,file)) and pathlib.Path(file).suffix in ['.c', '.cxx', '.h', '.…
43 llmansec = findlmansec(os.path.join(dir,file))
45 …if not os.path.isdir(os.path.join(build_dir,'manualpages',llmansec)): os.mkdir(os.path.join(build_…
49 '-mpath', os.path.join(build_dir,'manualpages',llmansec),
51 '-defn', os.path.join(build_dir,'manualpages','doctext','myst.def'),
[all …]
H A Dbuild_c2html.py4 import os
24 os.chdir(petsc_dir)
27 …with open('htmlmap.tmp', "w") as fdw, open(os.path.join(build_dir,'manualpages','htmlmap'), "r") a…
29 …with open('htmlmap.tmp', "a") as fdw, open(os.path.join(build_dir,'manualpages','mpi.www.index'), …
36 for root, dirs, files in chain.from_iterable(os.walk(path) for path in [petsc_dir]):
40 if not os.path.isdir(os.path.join(loc,root)): os.makedirs(os.path.join(loc,root))
41 …allfiles.extend([os.path.join(loc,root,f+'.html') for f in files if any([s for s in SUFFIXES if f.…
44 with open(os.path.join(loc,root,'index.html'),'w') as fdw:
49 if os.path.isfile(os.path.join(root,'makefile')):
50 with open(os.path.join(root,'makefile')) as mklines:
[all …]
H A Dconf.py7 import os
15 sys.path.append(os.getcwd())
16 sys.path.append(os.path.abspath('./ext'))
26 if not os.path.isdir("images"):
42 includedir = os.path.join('..', 'include', 'petscversion.h')
43 if not os.path.isfile(includedir): includedir = os.path.join('..', '..', 'include', 'petscversion.h…
100 html_logo_light = os.path.join('images', 'logos', 'PETSc_TAO_logos', 'PETSc-TAO', 'web', 'PETSc-TAO…
101 html_logo_dark = os.path.join('images', 'logos', 'PETSc_TAO_logos', 'PETSc-TAO', 'web', 'PETSc-TAO_…
124 "image_light": os.path.basename(html_logo_light),
125 "image_dark": os.path.basename(html_logo_dark)
[all …]
H A Dbuild_c2html_file.py4 import os
11 with open(os.path.join(rel_dir,file), "r") as fd:
38 if os.path.isfile(includename):
40 elif os.path.isfile(os.path.join('include',includename)):
41 …line = linenumber+'#include <A href="'+os.path.relpath(os.path.join(rel_dot,'include',includename)…
42 elif os.path.isfile(os.path.join(includename)):
43 …line = linenumber+'#include <A href="'+os.path.relpath(os.path.join(rel_dot,includename))+'.html">…
46 with open(os.path.join(loc,rel_dir,file+'.html'), "w") as fdw:
51 …main(sys.argv[1],sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5],os.path.dirname(sys.argv[6]),os.p…
/petsc/systems/Apple/iOS/bin/
H A Diosbuilder.py19 import os, sys
21 sys.path.insert(0, os.path.join(os.environ['PETSC_DIR'], 'config'))
22 sys.path.insert(0, os.path.join(os.environ['PETSC_DIR'], 'config', 'BuildSystem'))
29 import os
32 …argDB.saveFilename = os.path.join(os.environ['PETSC_DIR'], os.environ['PETSC_ARCH'], 'lib','petsc'…
63 …help.addArgument('RepManager', '-rootDir', nargs.ArgDir(None, os.environ['PETSC_DIR'], 'The root d…
112 os.chdir(dirname)
113 l = len(os.environ['PETSC_DIR'])
114 basedir = os.path.join(os.environ['PETSC_DIR'],os.environ['PETSC_ARCH'],'xcode-links')
124 for f in os.listdir(dirname):
[all …]
/petsc/config/BuildSystem/config/
H A DcompilersFortran.py4 import os
250os.path.abspath('base_module.mod'), os.path.abspath('BASE_MODULE.mod'), os.path.join(os.path.dirna…
251 if os.path.isfile(f): os.remove(f)
293 cobj = os.path.join(self.tmpDir, 'fooobj.o')
298 if not os.path.isfile(self.compilerObj):
299 self.logPrint('Cannot locate object file: '+os.path.abspath(self.compilerObj), 3, 'compilers')
301 os.rename(self.compilerObj, cobj)
332 if os.path.isfile(cobj):
333 os.remove(cobj)
354 testdir = os.path.join(self.tmpDir, 'confdir')
[all …]
/petsc/src/binding/petsc4py/docs/source/
H A Dconf.py13 import os
27 sys.path.insert(0, os.path.abspath('.'))
38 docdir = os.path.abspath(os.path.dirname(__file__))
39 topdir = os.path.abspath(os.path.join(docdir, *[os.path.pardir] * 2))
43 with open(os.path.join(topdir, 'src', package, '__init__.py')) as f:
50 if topdir.endswith(os.path.join(os.path.sep, 'src', 'binding', package)):
51 rootdir = os.path.abspath(os.path.join(topdir, *[os.path.pardir] * 3))
53 version_h = os.path.join(rootdir, 'include', f'{rootname}version.h')
54 if os.path.exists(version_h) and os.path.isfile(version_h):
164 if 'LOC' in os.environ and os.path.isfile(
[all …]
/petsc/
H A Dsetup.py36 import os
86 PETSC_DIR = os.path.abspath(os.getcwd())
88 os.environ['PETSC_DIR'] = PETSC_DIR
89 os.environ['PETSC_ARCH'] = PETSC_ARCH
90 sys.path.insert(0, os.path.join(PETSC_DIR, 'config'))
91 sys.path.insert(0, os.path.join(PETSC_DIR, 'lib','petsc','conf'))
94 pkgdir = os.path.join('config', 'pypi')
95 os.makedirs(pkgdir, exist_ok=True)
100 with open(os.path.join(pkgdir, pyfile), 'w') as fh:
104 options = os.environ.get('PETSC_CONFIGURE_OPTIONS', '')
[all …]
/petsc/lib/petsc/bin/
H A Dpetsc_conf.py14 import sys, os
19 if 'PETSC_DIR' in os.environ:
20 petscdir = os.environ['PETSC_DIR']
25 if os.path.isfile(os.path.join(petscdir,'lib','petsc','conf','petscrules')):
27 petscvariables = os.path.join(petscdir,'lib','petsc','conf','petscvariables')
28 petscconfinclude = os.path.join(petscdir,'include','petscconf.h')
30 if 'PETSC_ARCH' in os.environ:
31 petscarch = os.environ['PETSC_ARCH']
32 if os.path.isfile(os.path.join(petscdir,petscarch,'lib','petsc','conf','petscrules')):
34 … petscvariables = os.path.join(petscdir,petscarch,'lib','petsc','conf','petscvariables')
[all …]
/petsc/config/examples/
H A Darch-ci-linux-gcc-ifc-cmplx.py3 import os
4 petsc_hash_pkgs=os.path.join(os.getenv('HOME'),'petsc-hash-pkgs')
8 ifort_lib_dir=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(which('ifort')))),'compi…
10 mpich_lib_dir=os.path.join(mpich_install_dir,'lib')
39 import sys,os
40 sys.path.insert(0,os.path.abspath('config'))
H A Darch-alcfci-theta-intel-opt.py3 import os
4 petsc_hash_pkgs=os.path.join(os.getenv('HOME'),'petsc-hash-pkgs')
18 '--with-blaslapack-lib=-mkl -L'+os.path.join(os.environ['MKLROOT'],'lib','intel64'),
28 '--with-netcdf-dir='+os.environ['CRAY_NETCDF_HDF5PARALLEL_PREFIX'],
29 '--with-pnetcdf-dir='+os.environ['CRAY_PARALLEL_NETCDF_PREFIX'],
36 import sys,os
37 sys.path.insert(0,os.path.abspath('config'))

12345678910>>...14