diff --git a/pyclient/pymtt.py b/pyclient/pymtt.py index 5bc609fa2..5c4692e16 100755 --- a/pyclient/pymtt.py +++ b/pyclient/pymtt.py @@ -29,7 +29,7 @@ # define the cmd line arguments parser = argparse.ArgumentParser(description="usage: %prog [options] testfile1 testfile2 ...") -parser.add_argument('ini_files', action='append', metavar='FILE', nargs='+', help = ".ini file to be used") +parser.add_argument('ini_files', action='append', metavar='FILE', nargs='*', help = ".ini file to be used") infoGroup = parser.add_argument_group('InfoGroup','Informational Options') infoGroup.add_argument("-v", "--version", diff --git a/pylib/Stages/Reporter/IUDatabase.py b/pylib/Stages/Reporter/IUDatabase.py old mode 100644 new mode 100755 index 29005ef80..8e936eba3 --- a/pylib/Stages/Reporter/IUDatabase.py +++ b/pylib/Stages/Reporter/IUDatabase.py @@ -76,20 +76,20 @@ def execute(self, log, keyvals, testDef): return try: if cmds['pwfile'] is not None: - if os.path.exists(cmds['pwfile'][0]): - f = open(cmds['pwfile'][0], 'r') + if os.path.exists(cmds['pwfile']): + f = open(cmds['pwfile'], 'r') password = f.readline().strip() f.close() else: log['status'] = 1; - log['stderr'] = "Password file " + cmds['pwfile'][0] + " does not exist" + log['stderr'] = "Password file " + cmds['pwfile'] + " does not exist" return elif cmds['password'] is not None: password = cmds['password'] except KeyError: try: if cmds['password'] is not None: - password = cmds['password'][0] + password = cmds['password'] except KeyError: pass # @@ -340,7 +340,7 @@ def _submit_test_build(self, logger, lg, metadata, s, url, httpauth=None): for entry in full_log: if 'compiler' in entry: data['compiler_name'] = entry['compiler']['compiler'] - data['compiler_version'] = entry['compiler']['version'] + data['compiler_version'] = entry['compiler']['version'] break else: data['compiler_name'] = None @@ -481,7 +481,7 @@ def _submit_install(self, logger, lg, metadata, s, url, httpauth=None): for entry in full_log: if 'compiler' in entry: data['compiler_name'] = entry['compiler']['compiler'] - data['compiler_version'] = entry['compiler']['version'] + data['compiler_version'] = entry['compiler']['version'] break else: data['compiler_name'] = None diff --git a/pylib/Tools/Build/Autotools.py b/pylib/Tools/Build/Autotools.py old mode 100644 new mode 100755 index 426e97cba..343262ae9 --- a/pylib/Tools/Build/Autotools.py +++ b/pylib/Tools/Build/Autotools.py @@ -167,7 +167,7 @@ def execute(self, log, keyvals, testDef): compilerLog = {} plugin.execute(compilerLog, testDef) log['compiler'] = compilerLog - print(log['compiler']) + testDef.logger.verbose_print(log['compiler']) # Find MPI information for IUDatabase plugin plugin = None diff --git a/pylib/Tools/Launcher/OpenMPI.py b/pylib/Tools/Launcher/OpenMPI.py old mode 100644 new mode 100755 index 14cdcc28d..ee491d029 --- a/pylib/Tools/Launcher/OpenMPI.py +++ b/pylib/Tools/Launcher/OpenMPI.py @@ -228,8 +228,8 @@ def execute(self, log, keyvals, testDef): # get the "skip" exit status skipStatus = int(cmds['skipped']) # assemble the command - cmdargs = [cmds['command']] - if cmds['np'] is not None: + cmdargs = cmds['command'].split() + if ['np'] is not None: cmdargs.append("-np") cmdargs.append(cmds['np']) if cmds['hostfile'] is not None: @@ -276,8 +276,8 @@ def execute(self, log, keyvals, testDef): log['numSkip'] = numSkip log['numFail'] = numFail try: - log['np'] = cmds['np'] + log['np'] = cmds['np'] except KeyError: - log['np'] = None + log['np'] = None os.chdir(cwd) return diff --git a/pylib/Utilities/MPIVersion.py b/pylib/Utilities/MPIVersion.py old mode 100644 new mode 100755 index 2886343ed..b3e2a452a --- a/pylib/Utilities/MPIVersion.py +++ b/pylib/Utilities/MPIVersion.py @@ -35,7 +35,7 @@ def execute(self, log, testDef): log['name'] = 'None' log['version'] = 'Unknown' return - + name = None version = None @@ -60,7 +60,7 @@ def execute(self, log, testDef): name = 'MVAPICH2' version = version_str.split('MVAPICH2 Version')[1].split(':')[1].split('\n')[0].strip() # Intel MPI - # Example Output: + # Example Output: # Intel(R) MPI Library 5.1.3 for Linux* OS elif 'Intel' in version_str: name = 'Intel MPI' @@ -87,10 +87,11 @@ def get_version_string(self, testDef): #include int main(int argc, char **argv) { MPI_Init(NULL, NULL); - char version[1000]; + char version[3000]; int resultlen; MPI_Get_library_version(version, &resultlen); printf("%s\\n", version); + MPI_Finalize(); return 0; }""") fh.close() @@ -107,7 +108,7 @@ def get_version_string(self, testDef): if os.path.exists("mpi_get_version.c"): os.remove("mpi_get_version.c") os.chdir("..") return None - + if os.path.exists("mpi_get_version"): os.remove("mpi_get_version") if os.path.exists("mpi_get_version.c"): os.remove("mpi_get_version.c") os.chdir("..")