diff --git a/.files b/.files index e566c40..a062e2a 100644 Binary files a/.files and b/.files differ diff --git a/.rev b/.rev index 44d531a..b200e2e 100644 --- a/.rev +++ b/.rev @@ -52,4 +52,22 @@ 821888 + + 8328dcf950ff65186956c5be7e1df2d9 + 1.13.1 + + dimstar_suse + - Add build support for gcc10 to HPC build (bsc#1174439). +- Add openmpi4 flavors. +- Add Fix-code-to-be-python3-compliant.patch: + * Remove python2 code and dependencies. + * Removed & Automated: fix_python_shebang.patch + * Make python3 the default for TW and SLE/Leap 15 +- Do not mark template files for HPC as %config. + +- Change 'Requires:' to other HPC packages to %requires_eq to depend + on the exact version. This should take care of HPC packages ignoring + proper ABI versioning. + 876983 + diff --git a/Fix-code-to-be-python3-compliant.patch b/Fix-code-to-be-python3-compliant.patch new file mode 100644 index 0000000..ab6b813 --- /dev/null +++ b/Fix-code-to-be-python3-compliant.patch @@ -0,0 +1,610 @@ +From: Egbert Eich +Date: Tue Feb 16 17:12:05 2021 +0100 +Subject: Fix code to be python3 compliant. +Patch-mainline: Not yet +Git-commit: 9379de3b97c245b238f1b0290cdd435b78bb4c68 +References: + +Signed-off-by: Egbert Eich +--- + utils/skel/bin/skel | 8 ++++---- + utils/skel/bin/skel_extract.py | 8 ++++---- + utils/skel/lib/adios.py | 8 ++++---- + utils/skel/lib/skel_bpls.py | 4 ++-- + utils/skel/lib/skel_bpy.py | 26 +++++++++++++------------- + utils/skel/lib/skel_makefile.py | 12 ++++++------ + utils/skel/lib/skel_params.py | 10 +++++----- + utils/skel/lib/skel_replay.py | 10 +++++----- + utils/skel/lib/skel_settings.py | 6 +++--- + utils/skel/lib/skel_source.py | 16 ++++++++-------- + utils/skel/lib/skel_submit.py | 10 +++++----- + utils/skel/lib/skel_suite.py | 4 ++-- + utils/skel/lib/skel_test_plan.py | 2 +- + utils/skel/lib/skel_xml.py | 6 +++--- + utils/skel/lib/skelconf.py | 2 +- + 15 files changed, 66 insertions(+), 66 deletions(-) +diff --git a/utils/skel/bin/skel b/utils/skel/bin/skel +index 9e37214..f74c73c 100755 +--- a/utils/skel/bin/skel ++++ b/utils/skel/bin/skel +@@ -58,7 +58,7 @@ def main(argv=None): + + # Look for skel help (or no args), and print the list of subcommands... + if (len(sys.argv) == 1) or (sys.argv[1] == 'help' and len(sys.argv) == 2): +- print parser.description ++ print (parser.description) + return 0 + + # install does not require a project, so let's just check for it directly +@@ -83,8 +83,8 @@ def main(argv=None): + elif sys.argv[2] == 'xml': + sys.argv = ["skel", "xml", "junk", "-h"] + else: +- print "Unknown help topic" +- print parser.description ++ print ("Unknown help topic") ++ print (parser.description) + exit(1) + + #args = parse_command_line() +@@ -154,7 +154,7 @@ def main(argv=None): + return 0 + + # Unrecognized subcommand, print the help message +- print parser.description ++ print (parser.description) + return 0 + + +diff --git a/utils/skel/bin/skel_extract.py b/utils/skel/bin/skel_extract.py +index 54bfaf5..8a7c755 100755 +--- a/utils/skel/bin/skel_extract.py ++++ b/utils/skel/bin/skel_extract.py +@@ -46,7 +46,7 @@ def extract (skel_output, dest, select, ranks): + # check the selected fields + for field in selected_fields: + if not field in keys: +- print 'Invalid selection, field ' + field ++ print ('Invalid selection, field ' + field) + return + + #Print the header +@@ -112,7 +112,7 @@ def extract_R (skel_output, select, ranks, iteration): + # check the selected fields + for field in selected_fields: + if not field in keys: +- print 'Invalid selection, field ' + field ++ print ('Invalid selection, field ' + field) + return + + #Print the header +@@ -153,13 +153,13 @@ def extract_R (skel_output, select, ranks, iteration): + def parse_iteration (filename): + #assume filename ends with .xml + if not filename.endswith (".xml"): +- print "Warning: filename does not meet expectations, should end with .xml" ++ print ("Warning: filename does not meet expectations, should end with .xml") + + filename = filename [:-4] + + iteration = filename.rsplit ("_", 1)[1] + +- print iteration ++ print (iteration) + + return iteration + +diff --git a/utils/skel/lib/adios.py b/utils/skel/lib/adios.py +index 0aed80d..da39623 100644 +--- a/utils/skel/lib/adios.py ++++ b/utils/skel/lib/adios.py +@@ -12,7 +12,7 @@ class adiosConfig: + doc = xml.dom.minidom.parse (config_file_name) + nodes = doc.childNodes + if (nodes.length != 1): +- print 'malformed adios config file, should contain only a single adios-config element' ++ print ('malformed adios config file, should contain only a single adios-config element') + raise SystemExit + self.config_node = nodes[0] + +@@ -47,7 +47,7 @@ class adiosConfig: + + def get_buffer (self): + #return the buffer info +- print 'implement get_buffer' ++ print ('implement get_buffer') + + def get_host_language (self): + return self.host_language +@@ -200,7 +200,7 @@ class fortranFormatter: + @staticmethod + def get_write_line (var): + retval = '\n call adios_write (adios_handle, "' + var.get_fullpath() + '", ' + var.get_gwrite() + ', adios_error)' +- #print retval ++ #print (retval) + return retval + + @staticmethod +@@ -281,7 +281,7 @@ class cFormatter: + var_prefix = '&' + + retval = '\nadios_write (adios_handle, "' + var.get_fullpath() + '", ' + var_prefix + var.get_gwrite() + ');' +- #print retval ++ #print (retval) + return retval + + @staticmethod +diff --git a/utils/skel/lib/skel_bpls.py b/utils/skel/lib/skel_bpls.py +index 3b67f88..299881a 100755 +--- a/utils/skel/lib/skel_bpls.py ++++ b/utils/skel/lib/skel_bpls.py +@@ -55,7 +55,7 @@ class bpls: + + + def get_dims (self, var): +- print "getting dims for %s" % var ++ print ("getting dims for %s" % var) + if var not in self.vars.keys(): + return None + return self.vars[var]['dims'] +@@ -73,7 +73,7 @@ def main(argv=None): + b = bpls (test) + + for var in b.get_vars(): +- print '%s %s' % (var, b.get_dims (var) ) ++ print ('%s %s' % (var, b.get_dims (var) )) + + + if __name__ == "__main__": +diff --git a/utils/skel/lib/skel_bpy.py b/utils/skel/lib/skel_bpy.py +index b1a520c..be7c186 100755 +--- a/utils/skel/lib/skel_bpy.py ++++ b/utils/skel/lib/skel_bpy.py +@@ -11,7 +11,7 @@ class skel_bpy: + stream = file (filename, 'r') + self.doc = yaml.load(stream) + +- #print self.doc ++ #print (self.doc) + + if self.get_language().lower() == "fortran": + flip = True +@@ -22,7 +22,7 @@ class skel_bpy: + for v in self.doc['variables']: + name = v ['name'] + self.vars [name] = var (name, v, flip) +- #print "Added variable %s\n" % name ++ #print ("Added variable %s\n" % name) + + def get_num_procs (self): + return self.doc['procs'] +@@ -74,7 +74,7 @@ class var: + + if self.is_scalar(): + # This is a scalar +- #print "%s is a scalar" % name ++ #print ("%s is a scalar" % name) + return + + # If we're writing fortran, we need to flip the order of the dimensions, as they were reported by the C API +@@ -108,12 +108,12 @@ class var: + + # Sanity check + if len(dp) != len(gd): +- print 'Dimensional mismatch, exiting' ++ print ('Dimensional mismatch, exiting') + exit(13) + for i in range(len(dp)): + #divides evenly + if gd[i] % dp[i] != 0: +- print 'irregular decomposition not supported, exiting' ++ print ('irregular decomposition not supported, exiting') + exit(17) + + # Calculate individual blocks +@@ -150,13 +150,13 @@ class var: + end2 = (k+1) * self.vardict['dims'][2] - 1 + self.vardict['decomposition'].append([[start0,end0],[start1,end1],[start2,end2]]) + else: +- print "Failed sanity check, more than 3 dimensions specified" ++ print ("Failed sanity check, more than 3 dimensions specified") + exit (13) + + # Case 3, no decomposition given + else: + #What to do here? PANIC! +- print "No decomposition found, exiting." ++ print ("No decomposition found, exiting.") + exit(11) + + +@@ -171,7 +171,7 @@ class var: + return self.vardict['type'] + + def get_lang_type (self, lang): +- #print "getting type for lang" ++ #print ("getting type for lang") + if lang == 'C' or lang == 'c': + return self.get_c_type() + else: +@@ -316,7 +316,7 @@ class var: + # This gives the size of one element of this type + def get_unit_size (self): + +- #print "Checking size of %s\n" % self.get_type() ++ #print ("Checking size of %s\n" % self.get_type()) + + type = self.get_type() + +@@ -358,7 +358,7 @@ class var: + if size is not None: + return "%i" % size + else: +- print "Unknown type: %s in get_unit_size()" % self.get_type() ++ print ("Unknown type: %s in get_unit_size()" % self.get_type()) + sys.exit() + + +@@ -435,14 +435,14 @@ class var: + + def main(argv=None): + b = skel_bpy ("test.yaml") +- print "Num Procs is %d\n" % b.get_num_procs() ++ print ("Num Procs is %d\n" % b.get_num_procs()) + + vardict = b.get_vars() +- print vardict ++ print (vardict) + + for vname in vardict: + v = vardict [vname] +- print "%s: %s, %s\n" % (v.get_name(), v.get_type(), v.get_dims() ) ++ print ("%s: %s, %s\n" % (v.get_name(), v.get_type(), v.get_dims() )) + + + if __name__ == "__main__": +diff --git a/utils/skel/lib/skel_makefile.py b/utils/skel/lib/skel_makefile.py +index 3085d98..8283f4c 100644 +--- a/utils/skel/lib/skel_makefile.py ++++ b/utils/skel/lib/skel_makefile.py +@@ -38,7 +38,7 @@ def generate_makefiles_with_args (parent_parser): + try: + config = adios.adiosConfig (args.project + '_skel.xml') + except (IOError): +- print "XXError reading " + args.project + "_skel.xml. Try running skel xml " + args.project + " first." ++ print ("XXError reading " + args.project + "_skel.xml. Try running skel xml " + args.project + " first.") + return 1 + + +@@ -49,8 +49,8 @@ def generate_makefiles_with_args (parent_parser): + try: + params = skelconf.skelConfig (args.project + '_params.xml') + except (IOError): +- print "Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first," +- print "then check that " + args.project + "_params.xml exists." ++ print ("Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first,") ++ print ("then check that " + args.project + "_params.xml exists.") + return + + generate_makefiles (params, config) +@@ -65,7 +65,7 @@ def generate_makefile_from_yaml (args): + + # Only proceed if outfilename does not already exist, or if -f was used + if os.path.exists (outfilename) and not args.force: +- print "%s exists, aborting. Delete the file or use -f to overwrite." % outfilename ++ print ("%s exists, aborting. Delete the file or use -f to overwrite." % outfilename) + return 999 + + skel_file = open (outfilename, 'w') +@@ -201,10 +201,10 @@ def main(argv=None): + + lang = config.get_host_language () + if 'c' == lang or 'C' == lang: +- print 'generating C flavored Makefile' ++ print ('generating C flavored Makefile') + generate_makefiles_c (params) + else: +- print 'generating fortran flavored Makefile' ++ print ('generating fortran flavored Makefile') + generate_makefiles_fortran (params) + + +diff --git a/utils/skel/lib/skel_params.py b/utils/skel/lib/skel_params.py +index 08ac257..ad7754b 100644 +--- a/utils/skel/lib/skel_params.py ++++ b/utils/skel/lib/skel_params.py +@@ -35,7 +35,7 @@ def generate_param_file_with_args (parent_parser): + try: + config = adios.adiosConfig (args.project + '_skel.xml') + except (IOError): +- print "XXError reading " + args.project + "_skel.xml. Try running skel xml " + args.project + " first." ++ print ("XXError reading " + args.project + "_skel.xml. Try running skel xml " + args.project + " first.") + return 1 + + +@@ -43,13 +43,13 @@ def generate_param_file_with_args (parent_parser): + + # Only proceed if outfilename does not already exist, or if -f was used + if os.path.exists (outfilename) and not args.force: +- print "%s exists, aborting. Delete the file or use -f to overwrite." % outfilename ++ print ("%s exists, aborting. Delete the file or use -f to overwrite." % outfilename) + return 999 + + try: + config = adios.adiosConfig (args.project + '_skel.xml') + except (IOError): +- print "Error reading " + args.project + "_skel.xml. Try running skel xml " + args.project + " first." ++ print ("Error reading " + args.project + "_skel.xml. Try running skel xml " + args.project + " first.") + return 1 + + generate_param_file (args.project, outfilename, config, args.group, args.bpls) +@@ -60,7 +60,7 @@ def generate_param_file (app, outfile, config, groupname, bplsfile=None): + param_file = open (outfile, 'w') + + if bplsfile is not None: +- print "Using bpls data in %s" % bplsfile ++ print ("Using bpls data in %s" % bplsfile) + bpdata = skel_bpls.bpls (open (bplsfile, 'r') ) + + #Write the file header +@@ -164,7 +164,7 @@ def main(argv=None): + + # Only proceed if outfilename does not already exist. + if os.path.exists (outfilename): +- print "%s exists, aborting. Delete the file or use '-f' to overwrite." ++ print ("%s exists, aborting. Delete the file or use '-f' to overwrite.") + return 999 + + generate_param_file (args.project, outfilename, config, args.group) +diff --git a/utils/skel/lib/skel_replay.py b/utils/skel/lib/skel_replay.py +index dbde945..188bfd6 100644 +--- a/utils/skel/lib/skel_replay.py ++++ b/utils/skel/lib/skel_replay.py +@@ -45,15 +45,15 @@ def do_replay_with_args (parent_parser): + do_replay_from_yaml (args) + return + +- print "No bp file or yaml file specified, exiting" ++ print ("No bp file or yaml file specified, exiting") + return + + # else: + # try: + # params = skelconf.skelConfig (args.project + '_params.xml') + # except (IOError): +-# print "Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first," +-# print "then check that " + args.project + "_params.xml exists." ++# print ("Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first,") ++# print ("then check that " + args.project + "_params.xml exists.") + # return + + # generate_makefiles (params, config) +@@ -62,7 +62,7 @@ def do_replay_with_args (parent_parser): + + + def do_replay_from_bpfile (args): +- print "Replaying using %s" % args.bpfile ++ print ("Replaying using %s" % args.bpfile) + + # First, call skeldump to get the yamlfile + sdcmd = "skeldump %s > %s.yaml" % (args.bpfile, args.project) +@@ -76,7 +76,7 @@ def do_replay_from_bpfile (args): + + + def do_replay_from_yaml (args): +- print "Replaying using %s" % args.yamlfile ++ print ("Replaying using %s" % args.yamlfile) + + replay_file_name = "%s_replay.sh" % args.project + replay_file = open (replay_file_name, "w") +diff --git a/utils/skel/lib/skel_settings.py b/utils/skel/lib/skel_settings.py +index 4f172c0..6eda7f6 100644 +--- a/utils/skel/lib/skel_settings.py ++++ b/utils/skel/lib/skel_settings.py +@@ -20,8 +20,8 @@ class skel_settings: + continue + split_line = line.split('=') + if not len (split_line) == 2: +- print 'Malformed configuration line: ' + line +- print 'Ignoring' ++ print ('Malformed configuration line: ' + line) ++ print ('Ignoring') + continue + self.settings_dict[split_line[0]] = split_line[1] + +@@ -55,7 +55,7 @@ def create_settings_dir_if_needed(): + if not os.path.exists (skel_settings_dir_name): + bindir = os.path.dirname (sys.argv[0]) + shutil.copytree (bindir + '/../etc/skel', skel_settings_dir_name) +- print 'Created ' + skel_settings_dir_name ++ print ('Created ' + skel_settings_dir_name) + + + def main(argv=None): +diff --git a/utils/skel/lib/skel_source.py b/utils/skel/lib/skel_source.py +index 6806d5b..93389dd 100644 +--- a/utils/skel/lib/skel_source.py ++++ b/utils/skel/lib/skel_source.py +@@ -27,7 +27,7 @@ def generate_c_write (outfile, config, params, test): + outfile = outfile.replace ('.c', '_write.c') + measure = test.get_measure() + +- #print 'opening ' + outfile ++ #print ('opening ' + outfile) + c_file = open (outfile, 'w') + + # Look at all of the groups, Generate the code when we find the requested group +@@ -662,7 +662,7 @@ def pparse_command_line (parent_parser): + + + def create_source_from_yaml (args, config): +- #print "Using yaml file" ++ #print ("Using yaml file") + + # Determine the target language + if config.host_language == "C" or config.host_language =="c": +@@ -676,14 +676,14 @@ def create_source_from_yaml (args, config): + + # Determine outfile name + +- #print bpy.get_group_name() ++ #print (bpy.get_group_name()) + + extension = '_skel_' + bpy.get_group_name() + outfilename = args.project + extension + filetype + + # Only proceed if outfilename does not already exist, or if -f was used + if os.path.exists (outfilename) and not args.force: +- print "%s exists, aborting. Delete the file or use -f to overwrite." % outfilename ++ print ("%s exists, aborting. Delete the file or use -f to overwrite." % outfilename) + return 999 + + skel_file = open (outfilename, 'w') +@@ -707,7 +707,7 @@ def create_sources_with_args (parent_parser): + try: + config = adios.adiosConfig (args.project + '_skel.xml') + except (IOError): +- print "XXError reading " + args.project + "_skel.xml. Try running skel xml " + args.project + " first." ++ print ("XXError reading " + args.project + "_skel.xml. Try running skel xml " + args.project + " first.") + return 1 + + +@@ -715,7 +715,7 @@ def create_sources_with_args (parent_parser): + create_source_from_yaml(args, config) + else: + if args.noxml: +- print "NOXML generation only supported with yaml input. Generating XML based code." ++ print ("NOXML generation only supported with yaml input. Generating XML based code.") + create_source_from_xml (args, config) + + +@@ -724,8 +724,8 @@ def create_source_from_xml (args, config): + try: + params = skelconf.skelConfig (args.project + '_params.xml') + except (IOError): +- print "Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first," +- print "then check that " + args.project + "_params.xml exists." ++ print ("Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first,") ++ print ("then check that " + args.project + "_params.xml exists.") + return + + # Determine the target language +diff --git a/utils/skel/lib/skel_submit.py b/utils/skel/lib/skel_submit.py +index 7a57626..a6b2412 100644 +--- a/utils/skel/lib/skel_submit.py ++++ b/utils/skel/lib/skel_submit.py +@@ -114,7 +114,7 @@ def submit_line_template_replace (template_line, params, batch, test, settings): + + + def generate_submit_scripts_from_yaml (args): +- #print "Generating submission script using yaml file" ++ #print ("Generating submission script using yaml file") + + bpy = skel_bpy.skel_bpy (args.yamlfile) + +@@ -123,7 +123,7 @@ def generate_submit_scripts_from_yaml (args): + + # Only proceed if outfilename does not already exist, or if -f was used + if os.path.exists (outfilename) and not args.force: +- print "%s exists, aborting. Delete the file or use -f to overwrite." % outfilename ++ print ("%s exists, aborting. Delete the file or use -f to overwrite." % outfilename) + return 999 + + skel_file = open (outfilename, 'w') +@@ -154,7 +154,7 @@ def generate_submit_scripts_with_args (parent_parser): + try: + config = adios.adiosConfig (args.project + '_skel.xml') + except (IOError): +- print "XXError reading " + args.project + "_skel.xml. Try running skel xml " + args.project + " first." ++ print ("XXError reading " + args.project + "_skel.xml. Try running skel xml " + args.project + " first.") + return 1 + + +@@ -164,8 +164,8 @@ def generate_submit_scripts_with_args (parent_parser): + try: + params = skelconf.skelConfig (args.project + '_params.xml') + except (IOError): +- print "Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first," +- print "then check that " + args.project + "_params.xml exists." ++ print ("Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first,") ++ print ("then check that " + args.project + "_params.xml exists.") + return 1 + + generate_submit_scripts_from_xml (params) +diff --git a/utils/skel/lib/skel_suite.py b/utils/skel/lib/skel_suite.py +index 8dd6e4f..e21040a 100644 +--- a/utils/skel/lib/skel_suite.py ++++ b/utils/skel/lib/skel_suite.py +@@ -35,7 +35,7 @@ def pparse_command_line (parent_parser): + def gen_suite_with_args (parent_parser): + args = pparse_command_line (parent_parser) + +- print "Generating test suite using %s" % args.yamlfile ++ print ("Generating test suite using %s" % args.yamlfile) + + suite_gen_file_name = "%s_gen_suite.sh" % args.project + suite_gen_file = open (suite_gen_file_name, "w") +@@ -60,7 +60,7 @@ def gen_suite_with_args (parent_parser): + os.chmod (suite_gen_file_name, stat.S_IXUSR | stat.S_IWUSR | stat.S_IRUSR) + + # Run it +- #print "Run ./%s [disabled]" % suite_gen_file_name ++ #print ("Run ./%s [disabled]" % suite_gen_file_name) + subprocess.check_call ("./%s" % suite_gen_file_name) + + +diff --git a/utils/skel/lib/skel_test_plan.py b/utils/skel/lib/skel_test_plan.py +index 0fc8ab8..ef6dcef 100755 +--- a/utils/skel/lib/skel_test_plan.py ++++ b/utils/skel/lib/skel_test_plan.py +@@ -59,7 +59,7 @@ class test: + def main(argv=None): + b = skel_test_plan ("test_plan.yaml") + +- print b.get_tests() ++ print (b.get_tests()) + + + if __name__ == "__main__": +diff --git a/utils/skel/lib/skel_xml.py b/utils/skel/lib/skel_xml.py +index dd8d143..fdca00b 100644 +--- a/utils/skel/lib/skel_xml.py ++++ b/utils/skel/lib/skel_xml.py +@@ -62,13 +62,13 @@ def create_skel_xml (parent_parser): + + + def create_from_yaml (project,args): +- #print "using yaml file" ++ #print ("using yaml file") + + outfilename = project + '_skel.xml' + + # Only proceed if outfilename does not already exist, or if -f was used + if os.path.exists (outfilename) and not args.force: +- print "%s exists, aborting. Delete the file or use -f to overwrite." % outfilename ++ print ("%s exists, aborting. Delete the file or use -f to overwrite." % outfilename) + return 999 + + skel_file = open (outfilename, 'w') +@@ -91,7 +91,7 @@ def create_from_xml (project, args): + + # Only proceed if outfilename does not already exist, or if -f was used + if os.path.exists (outfilename) and not args.force: +- print "%s exists, aborting. Delete the file or use -f to overwrite." % outfilename ++ print ("%s exists, aborting. Delete the file or use -f to overwrite." % outfilename) + return 999 + + skel_file = open (outfilename, 'w') +diff --git a/utils/skel/lib/skelconf.py b/utils/skel/lib/skelconf.py +index 2cda422..93a537a 100644 +--- a/utils/skel/lib/skelconf.py ++++ b/utils/skel/lib/skelconf.py +@@ -10,7 +10,7 @@ class skelConfig: + + nodes = doc.childNodes + if (nodes.length != 1): +- print 'malformed param file, should contain only a single skel-config element' ++ print ('malformed param file, should contain only a single skel-config element') + raise SystemExit + self.config_node = nodes[0] + diff --git a/_multibuild b/_multibuild index 3650c26..2ef916a 100644 --- a/_multibuild +++ b/_multibuild @@ -2,9 +2,11 @@ openmpi openmpi2 openmpi3 + openmpi4 gnu-openmpi-hpc gnu-openmpi2-hpc gnu-openmpi3-hpc + gnu-openmpi4-hpc gnu-mpich-hpc gnu-mvapich2-hpc diff --git a/adios.changes b/adios.changes index 8b9fad8..bbf8573 100644 --- a/adios.changes +++ b/adios.changes @@ -1,4 +1,22 @@ ------------------------------------------------------------------- +Fri Feb 5 20:38:28 UTC 2021 - Egbert Eich + +- Add build support for gcc10 to HPC build (bsc#1174439). +- Add openmpi4 flavors. +- Add Fix-code-to-be-python3-compliant.patch: + * Remove python2 code and dependencies. + * Removed & Automated: fix_python_shebang.patch + * Make python3 the default for TW and SLE/Leap 15 +- Do not mark template files for HPC as %config. + +------------------------------------------------------------------- +Wed Feb 3 19:03:57 UTC 2021 - Egbert Eich + +- Change 'Requires:' to other HPC packages to %requires_eq to depend + on the exact version. This should take care of HPC packages ignoring + proper ABI versioning. + +------------------------------------------------------------------- Mon Jul 20 12:16:03 UTC 2020 - Stefan BrĂ¼ns - Adapt to HPC module netcdf naming change (boo#1174291). diff --git a/adios.spec b/adios.spec index d09b276..e77fafc 100644 --- a/adios.spec +++ b/adios.spec @@ -1,7 +1,7 @@ # # spec file for package adios # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -37,6 +37,9 @@ ExcludeArch: s390 s390x %if !0%{?is_opensuse} && 0%{?sle_version:1} && 0%{?sle_version} < 150200 %define DisOMPI3 ExclusiveArch: do_not_build %endif +%if 0%{?sle_version:1} && 0%{?sle_version} < 150300 +%define DisOMPI4 ExclusiveArch: do_not_build +%endif # this is a non-HPC build %if "%{flavor}" == "openmpi" @@ -59,6 +62,13 @@ ExcludeArch: s390 s390x %bcond_with hpc %endif +%if "%{flavor}" == "openmpi4" +%{?DisOMPI4} +%global mpi_flavor openmpi +%define mpi_ver 4 +%bcond_with hpc +%endif + # All the HPC builds are below %if "%{flavor}" == "gnu-openmpi-hpc" %{?DisOMPI1} @@ -86,6 +96,15 @@ ExcludeArch: s390 s390x %define mpi_ver 3 %endif +%if "%{flavor}" == "gnu-openmpi4-hpc" +%{?DisOMPI4} +%bcond_without hpc +%define compiler_family gnu +%undefine c_f_ver +%global mpi_flavor openmpi +%define mpi_ver 4 +%endif + %if "%{flavor}" == "gnu-mvapich2-hpc" %bcond_without hpc %define compiler_family gnu @@ -127,6 +146,15 @@ ExcludeArch: s390 s390x %define mpi_ver 3 %endif +%if "%{flavor}" == "gnu7-openmpi4-hpc" +%{?DisOMPI4} +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 7 +%global mpi_flavor openmpi +%define mpi_ver 4 +%endif + %if "%{flavor}" == "gnu7-mvapich2-hpc" %bcond_without hpc %define compiler_family gnu @@ -167,6 +195,15 @@ ExcludeArch: s390 s390x %define mpi_ver 3 %endif +%if "%{flavor}" == "gnu8-openmpi4-hpc" +%{?DisOMPI4} +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 8 +%global mpi_flavor openmpi +%define mpi_ver 4 +%endif + %if "%{flavor}" == "gnu8-mvapich2-hpc" %bcond_without hpc %define compiler_family gnu @@ -207,6 +244,15 @@ ExcludeArch: s390 s390x %define mpi_ver 3 %endif +%if "%{flavor}" == "gnu9-openmpi4-hpc" +%{?DisOMPI4} +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 9 +%global mpi_flavor openmpi +%define mpi_ver 4 +%endif + %if "%{flavor}" == "gnu9-mvapich2-hpc" %bcond_without hpc %define compiler_family gnu @@ -220,6 +266,55 @@ ExcludeArch: s390 s390x %define c_f_ver 9 %global mpi_flavor mpich %endif +# +%if "%{flavor}" == "gnu10-openmpi-hpc" +%{?DisOMPI1} +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 10 +%global mpi_flavor openmpi +%define mpi_ver 1 +%endif + +%if "%{flavor}" == "gnu10-openmpi2-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 10 +%global mpi_flavor openmpi +%define mpi_ver 2 +%endif + +%if "%{flavor}" == "gnu10-openmpi3-hpc" +%{?DisOMPI3} +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 10 +%global mpi_flavor openmpi +%define mpi_ver 3 +%endif + +%if "%{flavor}" == "gnu10-openmpi4-hpc" +%{?DisOMPI4} +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 10 +%global mpi_flavor openmpi +%define mpi_ver 4 +%endif + +%if "%{flavor}" == "gnu10-mvapich2-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 10 +%global mpi_flavor mvapich2 +%endif + +%if "%{flavor}" == "gnu10-mpich-hpc" +%bcond_without hpc +%define compiler_family gnu +%define c_f_ver 10 +%global mpi_flavor mpich +%endif %if !0%{?is_opensuse} && !0%{?with_hpc:1} ExclusiveArch: do_not_build @@ -246,9 +341,6 @@ ExclusiveArch: do_not_build %define pkg_skeldir %{hpc_prefix}/etc/skel/ %define package_name %{hpc_package_name %{_vers}} %define libname(l:s:) lib%{pname}%{-l*}%{hpc_package_name_tail %{?_vers}} -# This will avoid rpmlint errors when non-python3 scripts are detected. -# It needs to be addressed at some point. This needs to come after hpc_init. - %undefine _hpc_python3 %else %global pkg_suffix %{?mpi_flavor:-%{mpi_flavor}%{?mpi_ext}} %define pkg_prefix %{_libdir}/mpi/gcc/%{mpi_flavor}%{?mpi_ext} @@ -262,6 +354,10 @@ ExclusiveArch: do_not_build %define libname(l:s:) lib%{pname}%{!-l:%{-s:-}}%{-l*}%{-s*}%{?pkg_suffix} %endif +%if 0%{?suse_version} >= 1500 +%define my_py_version 3 +%endif + Name: %{package_name} Version: %{vers} Release: 0 @@ -271,13 +367,13 @@ Group: Productivity/Scientific/Other URL: https://www.olcf.ornl.gov/center-projects/adios/ Source0: https://users.nccs.gov/~pnorbert/adios-%{version}.tar.gz Patch0: adios-correct-func-ret.patch -Patch1: fix_python_shebang.patch +Patch1: Fix-code-to-be-python3-compliant.patch %{?with_hpc:BuildRequires: suse-hpc >= 0.3} BuildRequires: autoconf BuildRequires: fdupes BuildRequires: libbz2-devel BuildRequires: liblz4-devel -BuildRequires: python +BuildRequires: python%{?my_py_version} BuildRequires: zlib-devel %if %{without hpc} BuildRequires: %{mpi_flavor}%{?mpi_ext}-devel @@ -293,8 +389,8 @@ BuildRequires: lua-lmod BuildRequires: netcdf-%{compiler_family}%{?c_f_ver}%{?with_mpi:-%{mpi_flavor}%{?mpi_ver}}-hpc-devel %{hpc_requires} %endif # ?hpc -Requires: python2-PyYAML -Requires: python2-xml +Requires: python%{?my_py_version}-PyYAML +Requires: python%{?my_py_version}-xml %description The Adaptable IO System (ADIOS) provides a way for scientists to @@ -319,9 +415,9 @@ Requires: netcdf%{?pkg_suffix}-devel Provides: %{pname}%-openmpi-devel %endif %else # hpc -Requires: hdf5-%{compiler_family}%{?c_f_ver}%{?with_mpi:-%{mpi_flavor}%{?mpi_ver}}-hpc-devel +%{requires_eq hdf5-%{compiler_family}%{?c_f_ver}%{?with_mpi:-%{mpi_flavor}%{?mpi_ver}}-hpc-devel} Requires: lua-lmod -Requires: netcdf-%{compiler_family}%{?c_f_ver}%{?with_mpi:-%{mpi_flavor}%{?mpi_ver}}-hpc-devel +%{requires_eq netcdf-%{compiler_family}%{?c_f_ver}%{?with_mpi:-%{mpi_flavor}%{?mpi_ver}}-hpc-devel} %hpc_requires_devel %endif # ?hpc @@ -415,6 +511,9 @@ make V=1 %{?_smp_mflags} %{hpc_setup} %endif %make_install +for i in %{buildroot}/%{pkg_bindir}/{skel,*.py} %{buildroot}/%{pkg_libdir}/python/*.py; do + sed -e '1s@^\(#!.*\)\(python\)[23]*\( *.*\)@\1\2%{?my_py_version}\3@' -e '1s@/\env @/@' -i $i +done %fdupes -s %{buildroot}/%{pkg_skeldir}/templates %if %{with hpc} @@ -467,7 +566,7 @@ EOF %{hpc_modules_files} %endif %{pkg_bindir} -%config %{pkg_sysconfdir}/* +%{!?with_hpc:%config} %{pkg_sysconfdir}/* %dir %{pkg_prefix}/etc %{pkg_skeldir} %{pkg_libdir}/python diff --git a/fix_python_shebang.patch b/fix_python_shebang.patch deleted file mode 100644 index 7235fe4..0000000 --- a/fix_python_shebang.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Ana Guerrero Lopez -Date: 2018-01-24 16:00:00 +0200 -Subject: fix shebangs -Upstream: no - -diff -Nrua adios-1.13.1.original/utils/skel/bin/skel adios-1.13.1/utils/skel/bin/skel ---- adios-1.13.1.original/utils/skel/bin/skel 2018-01-22 23:57:57.000000000 +0100 -+++ adios-1.13.1/utils/skel/bin/skel 2019-01-25 09:27:24.564764182 +0100 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - - import sys - import os.path -diff -Nrua adios-1.13.1.original/utils/skel/bin/skel_cat.py adios-1.13.1/utils/skel/bin/skel_cat.py ---- adios-1.13.1.original/utils/skel/bin/skel_cat.py 2018-01-22 23:57:57.000000000 +0100 -+++ adios-1.13.1/utils/skel/bin/skel_cat.py 2019-01-25 09:27:17.444808921 +0100 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - - import argparse - import os -diff -Nrua adios-1.13.1.original/utils/skel/bin/skel_extract.py adios-1.13.1/utils/skel/bin/skel_extract.py ---- adios-1.13.1.original/utils/skel/bin/skel_extract.py 2018-01-22 23:57:57.000000000 +0100 -+++ adios-1.13.1/utils/skel/bin/skel_extract.py 2019-01-25 09:27:44.976635924 +0100 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - - import argparse - import xml.dom.minidom