Lines Matching +full:linux +full:- +full:cuda +full:- +full:pkgs
27 banner_middle = '=' * (logger.get_global_divider_length() - 2 * len(banner_ends))
40 …help.addArgument('PETSc', '-prefix=<dir>', nargs.Arg(None, '', 'Spec…
41 …help.addArgument('PETSc', '-with-prefetch=<bool>', nargs.ArgBool(None, 1,'En…
42 …help.addArgument('Windows','-with-windows-graphics=<bool>', nargs.ArgBool(None, 1,'En…
43 …help.addArgument('PETSc', '-with-default-arch=<bool>', nargs.ArgBool(None, 1, 'A…
44 …p.addArgument('PETSc','-with-single-library=<bool>', nargs.ArgBool(None, 1,'Put a…
45 …help.addArgument('PETSc','-with-fortran-bindings=<bool>', nargs.ArgBool(None, 1,'Bu…
46 …help.addArgument('PETSc', '-with-library-name-suffix=<string>', nargs.Arg(None, '', 'Add …
47 …help.addArgument('PETSc', '-with-ios=<bool>', nargs.ArgBool(None, 0, 'B…
48 …help.addArgument('PETSc', '-with-display=<x11display>', nargs.Arg(None, '', 'Spec…
49 …help.addArgument('PETSc', '-with-package-scripts=<pyscripts>', nargs.ArgFileList(None,No…
50 …addArgument('PETSc', '-with-coverage=<bool>', nargs.ArgFuzzyBool(None, value…
51 …-with-coverage-exec=<executable>', nargs.ArgExecutable(None, value='default-auto', must…
52 …help.addArgument('PETSc', '-with-tau-perfstubs=<bool>', nargs.ArgBool(None, 1,'En…
53 …-with-strict-petscerrorcode=<bool>', nargs.ArgFuzzyBool(None, value=0, help='Enable stric…
132 if 'with-package-scripts' in self.framework.argDB:
133 for script in self.framework.argDB['with-package-scripts']:
135 … configure package script format should be specified! Invalid option -with-package-scripts='+scrip…
164 ''' Create a pkg-config file '''
168 cflags_inc = ['-I${includedir}']
173 cflags_inc.append('-I' + os.path.join(self.petscdir.dir, 'include'))
193 with self.setCompilers.Language('CUDA'):
196 p = self.framework.require('config.packages.CUDA')
214 …fd.write('Libs: '+self.libraries.toStringNoDupes(['-L${libdir}', self.petsclib], with_rpath=False)…
216 # pkg-config --variable=ldflag_rpath and pkg-config --libs-only-L
239 puts stderr "This module sets the path and environment variables for petsc-%s"
243 module-whatis "PETSc - Portable, Extensible Toolkit for Scientific Computation"
250 prepend-path PATH "%s"
257 # eventually everything between -- should be gone
261 …self.executeShellCommand('rm -rf '+os.path.join(self.petscdir.dir,self.arch.arch,'include','mpi*'…
264 # Test for compiler-specific macros that need to be defined.
278 output = self.executeShellCommand(compiler + ' -show', log = self.log)[0]
286 #--------------------------------------------------------------------------------------------------…
337 if self.framework.argDB['with-fortran-bindings']:
341 …raise RuntimeError('Error! Fortran compiler "'+self.compilers.FC+'" does not have a C-interoperabl…
366 else: # for non-f90 compilers like g77
367 self.addMakeMacro('FC_MODULE_FLAG', '-I')
374 self.setCompilers.pushLanguage('CUDA')
409 #--------------------------------------------------------------------------------------------------…
421 if self.framework.argDB['with-batch']:
424 #--------------------------------------------------------------------------------------------------…
437 … raise RuntimeError('Cannot use --with-devicelanguage=C with the device package ' + i.name)
439 …self.addDefine('HAVE_'+i.PACKAGE.replace('-','_'), 1) # ONLY list package if it is used directly …
443 self.addMakeMacro(i.PACKAGE.replace('-','_')+'_LIB', self.libraries.toStringNoDupes(i.lib))
448 … self.addMakeMacro(i.PACKAGE.replace('-','_')+'_INCLUDE',self.headers.toStringNoDupes(i.include))
451 raise RuntimeError('Cannot use --with-devicelanguage=C++ without a valid C++ compiler')
477 self.LIB_NAME_SUFFIX = self.framework.argDB['with-library-name-suffix']
481 if self.framework.argDB['with-single-library']:
482 self.petsclib = '-lpetsc'+self.LIB_NAME_SUFFIX
486 …cro('PETSC_WITH_EXTERNAL_LIB',self.libraries.toStringNoDupes(['-L'+PREINSTALL_LIB_DIR, '-lpetsc'+s…
497 pkgs = ['ml', 'tao', 'ts', 'snes', 'ksp', 'dm', 'mat', 'vec', 'sys']
499 return [ '-lpetsc'+lib+self.LIB_NAME_SUFFIX for lib in libs]
501 …return self.libraries.toStringNoDupes(['-L'+PREINSTALL_LIB_DIR]+liblist_basic(libs)+self.packageli…
502 self.petsclib = ' '.join(liblist_basic(pkgs))
503 self.addMakeMacro('PETSC_SYS_LIB', liblist(pkgs[-1:]))
504 self.addMakeMacro('PETSC_VEC_LIB', liblist(pkgs[-2:]))
505 self.addMakeMacro('PETSC_MAT_LIB', liblist(pkgs[-3:]))
506 self.addMakeMacro('PETSC_DM_LIB', liblist(pkgs[-4:]))
507 self.addMakeMacro('PETSC_KSP_LIB', liblist(pkgs[-5:]))
508 self.addMakeMacro('PETSC_SNES_LIB',liblist(pkgs[-6:]))
509 self.addMakeMacro('PETSC_TS_LIB', liblist(pkgs[-7:]))
510 self.addMakeMacro('PETSC_TAO_LIB', liblist(pkgs[-8:]))
511 self.addMakeMacro('PETSC_ML_LIB', liblist(pkgs[-9:]))
519 if self.framework.argDB['with-display']:
520 self.addMakeMacro('DISPLAY',self.framework.argDB['with-display'])
525 if self.framework.argDB['with-tau-perfstubs']:
550 fd.write('\"-----------------------------------------\\n\"\n')
559 fd.write('\"-----------------------------------------\\n\";\n')
568 fd.write('\"-----------------------------------------\\n\";\n')
571 fd.write('\"-----------------------------------------\\n\";\n')
580 …fd.write('\"Using libraries: %s%s -L%s %s %s\\n\"\n' % (escape(self.setCompilers.CSharedLinkerFlag…
581 fd.write('\"-----------------------------------------\\n\";\n')
587 …figure.isSolaris(self.log) or self.framework.argDB['with-ios'] or not self.framework.argDB['with-p…
618 # The value of rw is a compile-time constant one or zero; one
621 # preparing for a read. The value locality must be a compile-time
629 # Here we adopt Intel's x86/x86-64 naming scheme for the locality
662 if self.framework.argDB['with-ios']:
675 if not self.framework.argDB['with-batch']:
704 …nt('configureDeprecated: Intel has conspired to make a supremely environment-sensitive compiler. T…
733 char assert_aligned[(sizeof(struct mystruct)==16)*2-1];
775 …lf.checkCompile(inc, ('#define STATIC_ASSERT(cond) char negative_length_if_false[2*(!!(cond))-1]\n'
826 flag = getattr(self.setCompilers, self.language[-1]+'SharedLinkerFlag')
830 self.compilers.LIBS += ' -L/usr/ucblib'
845 '''Linux specific stuff'''
851 '''Win32 non-cygwin specific stuff'''
862 if self.framework.argDB['with-windows-graphics']:
908 …(petscdir,error,status) = self.executeShellCommand('cygpath -w '+self.installdir.petscDir, log = s…
910 …(petscdir,error,status) = self.executeShellCommand('cygpath -m '+self.installdir.petscDir, log = s…
913 …(datafilespath,error,status) = self.executeShellCommand('cygpath -m '+self.dataFilesPath.datafiles…
928 … Check that a compiler accepts code-coverage flags. If the compiler does accept code-coverage flags
929 try to set debugging flags equivalent to -Og.
932 - lang: the language to check the coverage flag for
933 - extra_coverage_flags: a list of extra flags to use when checking the coverage flags
934 - extra_debug_flags: a list of extra flags to try when setting debug flags
937 - defines PETSC_USE_COVERAGE to 1
963 …w how to add coverage for compiler {}. Only know how to add coverage for gnu-like compilers (eithe…
966 coverage_flags = make_flag_list('--coverage', extra_coverage_flags)
1011 allowed_opt_flags = re.compile(r'|'.join((r'-O[01g]', r'-g[1-9]*')))
1018 …will work, but may be less accurate. Suggest removing the flag and/or using -Og (or equivalent) in…
1025 debug_flags = make_flag_list('-Og', extra_debug_flags)
1045 - defines PETSC_USE_COVERAGE to 1
1048 - If no compilers supported the coverage flag, throws RuntimeError
1049 -
1069 argdb_flag = 'with-coverage'
1076 for LANG in ['C', 'Cxx', 'CUDA', 'HIP', 'SYCL', 'FC']:
1080 if LANG in {'CUDA'}:
1092 '-Xcompiler --coverage -Xcompiler -fPIC --keep --keep-dir={}'.format(nvcc_tmp_dir)
1097 # for whatever reason this works if you dont use the --keep and --keep-dir
1099 kwargs['extra_coverage_flags'].append('-arch=native')
1100 kwargs['extra_debug_flags'] = ['-Xcompiler -Og']
1107 'Coverage was requested (--{}={}) but none of the compilers supported it:\n{}\n'.format(
1109 … '\n'.join([' - {} ({})'.format(self.getCompiler(lang=lang), lang) for lang in tested_langs])
1115 # "undefined reference to __gcov_flush()" but if we add -lgcov we get:
1129 log_print('Checking if compilers can cross-link disparate coverage libraries')
1134 log_print('No fortran compiler detected. No need to check cross-linking!')
1140 …log_print('C-language ({}) compiler is not clang, assuming it is GCC, so cross-linking with FC ({}…
1148 # Now we check if we can cross-link
1157 log_print('Trying to cross-link WITHOUT extra libs')
1159 log_print('Successfully cross-linked WITHOUT extra libs')
1160 # success, we already can cross-link
1163 extra_libs = ['-lgcov']
1164 log_print('Trying to cross-link with extra libs: {}'.format(extra_libs))
1167 'Successfully cross-linked using extra libs: {}, adding them to LIBS'.format(extra_libs)
1172 …y cross-link covered code between {} and FC. Sometimes this is a false positive. Assuming this doe…
1177 Check that a code-coverage collecting tool exists and is on PATH.
1180 - Adds PETSC_COVERAGE_EXEC make macro containing the full path to the coverage tool executable.
1183 - User explicitly requests auto-detection of the coverage tool from command line, and this
1185 - The routine fails to find the tool, and --with-coverage is true
1194 required = bool(self.argDB['with-coverage'])
1195 arg_opt = self.argDB['with-coverage-exec']
1200 if arg_opt in {'auto', 'default-auto', '1'}:
1204 …log_print('User did not explicitly set coverage exec (got {}), trying to auto-detect based on comp…
1206 compiler_version_re = re.compile(r'[gG][cC\+\-]+[0-9]* \(.+\) (\d+)\.(\d+)\.(\d+)')
1210 exec_names = ['llvm-cov']
1212 # macOS masquerades llvm-cov as just 'gcov', so we add this to the list in case
1213 # bare llvm-cov does not work
1215 elif arg_opt == 'default-auto' and not required:
1216 # default-auto implies the user did not set it via command line!
1217 …log_print('Could not auto-detect coverage tool for {}, not a gnuish compiler. Bailing since user d…
1222 …raise RuntimeError('Could not auto-detect coverage tool for {}, please set coverage tool name expl…
1233 # form [llvm-cov-14, llvm-cov-14.0, llvm-cov, etc.]
1236 # llvm-cov-14
1237 '{}-{}'.format(cov_exec_name, compiler_version.group(1)),
1238 # llvm-cov-14.0
1239 '{}-{}.{}'.format(cov_exec_name, compiler_version.group(1), compiler_version.group(2))
1245 # arg_opt is path-like, we should only search the provided directory when we go
1252 log_print('Checking for coverage tool(s):\n{}'.format('\n'.join('- '+t for t in exec_names)))
1265 if 'llvm-cov' in found_exec_name and 'gcov' not in found_exec_name:
1266 # llvm-cov needs to be called as 'llvm-cov gcov' to work
1274 If --with-strict-petscerrorcode = 1:
1275 - defines PETSC_USE_STRICT_PETSCERRORCODE to 1
1278 - deletes any prior PETSC_USE_STRICT_PETSCERRORCODE definitions (if they exist)
1281 if self.argDB['with-strict-petscerrorcode']:
1288 #--------------------------------------------------------------------------------------------------…
1290 '''Cygwin version <= 1.7.18 had issues with pipes and long commands invoked from gnu-make
1291 http://cygwin.com/ml/cygwin/2013-05/msg00340.html '''
1295 r=re.compile("([0-9]+).([0-9]+).([0-9]+)")
1304 #--------------------------------------------------------------------------------------------------…
1307 if self.framework.argDB['with-default-arch']:
1321 #--------------------------------------------------------------------------------------------------…
1326 …scriptName = os.path.join(self.arch.arch,'lib','petsc','conf', 'reconfigure-'+self.arch.arch+'.py')
1328 if 'with-clean' in args:
1329 del args['with-clean']
1365 ['-@echo "========================================="',
1366 '-@echo "Now to install the libraries do:"',
1367 …'-@echo "%s${MAKE_USER} PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} install"' % self.installdi…
1368 '-@echo "========================================="'])
1371 ['-@echo "========================================="',
1372 '-@echo "Now to check if the libraries are working do:"',
1373 '-@echo "${MAKE_USER} PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} check"',
1374 '-@echo "========================================="'])
1384 …# tacky fix for dependency of Aluimia on Pflotran; requested via petsc-dev Matt provide a correct …
1401 if hasattr(self.compilers, 'FC') and self.framework.argDB['with-fortran-bindings']:
1411 if 'package-prefix-hash' in self.argDB:
1425 …raise RuntimeError('Incorrect option --prefix='+self.framework.argDB['prefix']+' specified. It can…
1426 if self.framework.argDB['prefix'] and self.framework.argDB['prefix'].find(' ') > -1:
1427 …raise RuntimeError('Your --prefix '+self.framework.argDB['prefix']+' has spaces in it; this is not…
1429 …raise RuntimeError('Incorrect option --prefix='+self.framework.argDB['prefix']+' specified. It can…
1437 …('PETSc requires a functional math library. Please send configure.log to petsc-maint@mcs.anl.gov.')