Projects
OpenHPC3:3.2:Factory
plasma-intel
_service:extract_file:plasma-21.8.29-tools.patch
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:extract_file:plasma-21.8.29-tools.patch of Package plasma-intel
--- plasma-21.8.29/tools/checklist.py (original) +++ plasma-21.8.29/tools/checklist.py (refactored) @@ -25,12 +25,12 @@ ''' global first, filename if (first): - print "====", filename + print("====", filename) first = False if (lineno): - print "%4d: %s: %s" % (lineno, help, line) + print("%4d: %s: %s" % (lineno, help, line)) else: - print help + print(help) # end # ------------------------------------------------------------------------------ @@ -42,12 +42,12 @@ Prints error for all lines that match regexp (using flags), and don't match exclude, if given. ''' - if (not regexps.has_key( regexp )): + if (regexp not in regexps): regexps[ regexp ] = re.compile( regexp, flags=flags ) regexp = regexps[ regexp ] if (exclude): - if (not regexps.has_key( exclude )): + if (exclude not in regexps): regexps[ exclude ] = re.compile( exclude ) exclude = regexps[ exclude ] # end @@ -281,7 +281,7 @@ # end hdr if (not first): - print + print() # end # ------------------------------------------------------------------------------ --- plasma-21.8.29/tools/codegen.py (original) +++ plasma-21.8.29/tools/codegen.py (refactored) @@ -7,7 +7,7 @@ # # Tested with python 2.7.9 and 3.4.3. -from __future__ import print_function + description = '''\ Generates different precisions of files based on substitutions in subs.py @@ -119,7 +119,7 @@ try: subs_search = {} subs_replace = {} - for key in subs.keys(): + for key in list(subs.keys()): nrow = len( subs[key] ) ncol = len( subs[key][0] ) subs_search [key] = [ [ None for j in range(ncol) ] for i in range(nrow) ] @@ -255,7 +255,7 @@ ''' if precision: if isinstance( precision, (list, tuple) ): - ps = filter( lambda x: x in self._dsts, precision ) + ps = [x for x in precision if x in self._dsts] elif precision in self._dsts: ps = [ precision ] else: --- plasma-21.8.29/tools/fortran_gen.py (original) +++ plasma-21.8.29/tools/fortran_gen.py (refactored) @@ -174,7 +174,7 @@ parts = string.split() if (len(parts) < 2 or len(parts) > 3): - print("Error: Cannot detect type for ", string) + print(("Error: Cannot detect type for ", string)) type_part = str.strip(parts[0]) @@ -198,7 +198,7 @@ pointer_part = "*" name_part = str.strip(parts[2]) else: - print("Error: Too many parts for ", string) + print(("Error: Too many parts for ", string)) name_part = name_part.strip() @@ -259,7 +259,7 @@ name_string = re.sub(r"(?m),", "", name_string) name_string = name_string.strip() else: - print("Error: Cannot detect name for ", proto) + print(("Error: Cannot detect name for ", proto)) name_string = "name_not_recognized" args_list = args_string.split(",") @@ -303,14 +303,14 @@ # swap the entries if (definedLater): - print("Swapping " + struct_list[istruct][0][2] + " and " + struct_list[index][0][2]) + print(("Swapping " + struct_list[istruct][0][2] + " and " + struct_list[index][0][2])) tmp = struct_list[index] struct_list[index] = struct_list[istruct] struct_list[istruct] = tmp goAgain = True break else: - print("Error: Cannot find a derived type " + type_name + " in imported structs.") + print(("Error: Cannot find a derived type " + type_name + " in imported structs.")) if (goAgain): break @@ -780,7 +780,7 @@ # export the module modulefilename = write_module(opts.prefix, module_name, enum_list, struct_list, function_list) - print("Exported file: " + modulefilename) + print(("Exported file: " + modulefilename)) # execute the program main() --- plasma-21.8.29/tools/makespackrelease.py (original) +++ plasma-21.8.29/tools/makespackrelease.py (refactored) @@ -11,7 +11,7 @@ def log(*args): - print(*args) + print((*args)) def trashit(filename): --- plasma-21.8.29/tools/plasma_testing.py (original) +++ plasma-21.8.29/tools/plasma_testing.py (refactored) @@ -45,7 +45,7 @@ pipe=p.stdout if r != 0: - print "---- TESTING " + cmdline.split()[3] + "... FAILED(" + str(p.returncode) +") !" + print("---- TESTING " + cmdline.split()[3] + "... FAILED(" + str(p.returncode) +") !") err = p.returncode for line in pipe.readlines(): f.write(str(line)) @@ -59,7 +59,7 @@ #print line, err = 0 if found == 0: - print cmdline.split()[0] + " " + cmdline.split()[3] + ": FAILED(Unexpected error)" + print(cmdline.split()[0] + " " + cmdline.split()[3] + ": FAILED(Unexpected error)") f.flush(); err = "Unexpected error" @@ -70,9 +70,9 @@ # plot the results right to the stdout f = sys.stdout -print " " -print "----- Testing the subset of double precision PLASMA Routines related to INTERTWinE project -----" -print " " +print(" ") +print("----- Testing the subset of double precision PLASMA Routines related to INTERTWinE project -----") +print(" ") # only double precision routines are part of the benchmark dtypes = ( @@ -91,9 +91,9 @@ transpose = dtypes[3][dtype] - print " " - print "------------------------- %s ------------------------" % name - print " " + print(" ") + print("------------------------- %s ------------------------" % name) + print(" ") # play the strings game #binary = path_to_plasma_tests + "/" + "%stesting" % letter @@ -107,36 +107,36 @@ # check the binary exists if (os.path.exists(binary) and os.access(binary,os.X_OK)): # geqrf - print "------------------------- %s ------------------------" % geqrf + print("------------------------- %s ------------------------" % geqrf) test = local_popen(f, binary + " " + geqrf + " --outer=y --dim=1000"); errors.append(test); # potrf - print "------------------------- %s ------------------------" % potrf + print("------------------------- %s ------------------------" % potrf) test = local_popen(f, binary + " " + potrf + " --outer=y --dim=1000"); errors.append(test); # getrf - print "------------------------- %s ------------------------" % getrf + print("------------------------- %s ------------------------" % getrf) test = local_popen(f, binary + " " + getrf + " --outer=y --dim=500:2000:500x1000"); errors.append(test); # gels - print "------------------------- %s ------------------------" % gels + print("------------------------- %s ------------------------" % gels) test = local_popen(f, binary + " " + gels + " --outer=y --dim=500:2000:500x1000 --hmode=f,t --trans=n," + transpose); errors.append(test); sys.stdout.flush() else: - print "The file for testing:", binary, "does not exist or does not have execute rights." - print "Have you build PLASMA by make in the PLASMA directory:", plasma_dir, "?" + print("The file for testing:", binary, "does not exist or does not have execute rights.") + print("Have you build PLASMA by make in the PLASMA directory:", plasma_dir, "?") -print "----- Testing the subset of PLASMA Routines -----" +print("----- Testing the subset of PLASMA Routines -----") if (any(errors)): - print "At least one test FAILED." + print("At least one test FAILED.") sys.exit(1) else: if (len(errors) == 0): - print "Tests FAILED, no test were actually run for some reason." + print("Tests FAILED, no test were actually run for some reason.") sys.exit(2) else: - print "All tests were SUCCESSFUL." + print("All tests were SUCCESSFUL.") sys.exit(0) sys.exit(3)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.