4
<description>This script checks out mpich and builds it and the test suites </description>
7
helpstring = "build mpich and the test suites"
13
helpstring = "build mpich, the test suites, and the batch files to run the tests"
19
helpstring = "run the test suites"
25
helpstring = "check out mpich using the version tag specified"
31
helpstring = "build and run the tests specified: c++, mpich, intel, mpich"
37
helpstring = "build the fortran tests"
43
helpstring = "channel to build"
48
name = "remove-cvs-dirs"
49
helpstring = "delete the directories before checking them out"
55
helpstring = "path to mpich"
61
helpstring = "path to installed mpich"
66
name = "test_installed"
67
helpstring = "test the installed mpich"
73
helpstring = "make mpich or use existing build"
79
helpstring = "configure mpich or use existing configuration"
85
helpstring = "path to mpich test suite"
91
helpstring = "path to c++ test suite"
97
helpstring = "path to intel test suite"
103
helpstring = "user name to use with ssh commands"
109
helpstring = "ssh command name - default = ssh"
115
helpstring = "cvs host to use - cvs -d username@cvs_host:rootdir co mpichallWithMPE"
121
helpstring = "generate batch files and don't execute any tests"
127
helpstring = "add compiler options for VS 2005 to minimize warnings"
133
helpstring = "create batch files for each test suite"
139
helpstring = "add -localonly to the mpiexec command"
145
helpstring = "create the summary directory by parsing the previously created tests.output files"
151
helpstring = "use the win64 include directory"
156
<object id="f" progid="Scripting.FileSystemObject" />
157
<object id="WshShell" progid="WScript.Shell" />
158
<object id="WshNetwork" progid="WScript.Network" />
159
<script language="VBScript">
163
'Set WshShell = CreateObject("WScript.Shell")
164
'Set WshNetwork = WScript.CreateObject("WScript.Network")
165
set env = WshShell.Environment("PROCESS")
166
'Set f = WScript.CreateObject("Scripting.FileSystemObject")
167
Set root_folder = f.GetFolder(".")
168
hostname = WshNetwork.ComputerName
177
bCheckoutMPICH = true
178
bConfigureMPICH = true
179
bConfigureMPICHTests = true
181
bCheckoutMPICH = true
183
bCheckoutINTEL = true
185
pathMPICHInstalled = ""
189
username = env("USERNAME")
195
CPPFLAGS = " /nologo /EHsc /W4 /DHAVE_MPI_CXX /DUSE_STDARG /DHAVE_WINDOWS_H /DHAVE_LONG_LONG_INT /DHAVE_LONG_DOUBLE /DHAVE_MPI_DARRAY_SUBARRAY"
196
CFLAGS = " /nologo /W4 /DUSE_STDARG /DHAVE_WINDOWS_H /DHAVE_LONG_LONG_INT /DHAVE_LONG_DOUBLE /DHAVE_MPI_DARRAY_SUBARRAY /DMPICH_SKIP_MPICXX"
197
'mpichlib = "mpichd.lib"
199
fmpichlib = "fmpich.lib"
200
cppmpichlib = "cxx.lib"
203
cvs_host = "harley.mcs.anl.gov"
204
cvs_root_dir = "/home/MPI/cvsMaster"
205
temp_out_name = "tempout.txt"
210
testdirname = "testmpich"
212
timeoutarg = " -timeout 180"
213
bCommandsOnly = False
214
commands_filename = "runcommands.bat"
217
bBatchFilesOnly = false
220
' er.xsl file contents required to display the summary.xml files
222
"<?xml version='1.0' ?>" & vbCrLf & _
223
"<!-- <xsl:stylesheet xmlns:xsl=""http://www.w3.org/TR/WD-xsl""> -->" & vbCrLf & _
224
"<xsl:stylesheet xmlns:xsl=""http://www.w3.org/1999/XSL/Transform"" version=""1.0"">" & vbCrLf & _
225
"<!-- <xsl:output method=""html""/>-->" & vbCrLf & _
226
"<xsl:template match=""/"">" & vbCrLf & _
228
"<html>" & vbCrLf & _
229
"<head>" & vbCrLf & _
230
"<title>MPICH Error Report</title>" & vbCrLf & _
231
"</head>" & vbCrLf & _
232
"<body>" & vbCrLf & _
233
" <h1> Error Report </h1>" & vbCrLf & _
234
" <table border=""2"" bgcolor=""Green"">" & vbCrLf & _
235
" <xsl:apply-templates select=""MPITESTRESULTS""/>" & vbCrLf & _
236
" </table>" & vbCrLf & _
237
"</body>" & vbCrLf & _
238
"</html>" & vbCrLf & _
239
"</xsl:template>" & vbCrLf & _
241
"<xsl:template match=""MPITESTRESULTS"">" & vbCrLf & _
242
" <xsl:apply-templates select=""DATE""/>" & vbCrLf & _
243
" <xsl:apply-templates select=""MPITEST""/>" & vbCrLf & _
244
"</xsl:template>" & vbCrLf & _
246
"<xsl:template match=""DATE"">" & vbCrLf & _
247
" <tr><td bgcolor=""white"" colspan=""4"">Test run on <xsl:value-of select="".""/></td></tr>" & vbCrLf & _
248
"</xsl:template>" & vbCrLf & _
250
"<xsl:template match=""MPITEST"">" & vbCrLf & _
251
" <tr bgcolor=""white"">" & vbCrLf & _
252
" <td valign=""top"">" & vbCrLf & _
253
" <xsl:value-of select=""NAME""/>" & vbCrLf & _
254
" </td><td valign=""top"">" & vbCrLf & _
255
" <xsl:value-of select=""STATUS""/>" & vbCrLf & _
256
" </td><td WIDTH=""40%""><pre>" & vbCrLf & _
257
" <xsl:value-of select=""TESTDIFF""/>" & vbCrLf & _
258
" </pre>" & vbCrLf & _
259
" </td>" & vbCrLf & _
260
" <td valign=""top"">" & vbCrLf & _
261
" <pre>" & vbCrLf & _
262
" <xsl:value-of select=""TRACEBACK""/>" & vbCrLf & _
263
" </pre>" & vbCrLf & _
264
" </td>" & vbCrLf & _
265
" </tr>" & vbCrLf & _
266
"</xsl:template>" & vbCrLf & _
268
"<xsl:template match=""TRACEBACK"">" & vbCrLf & _
270
" <xsl:attribute name=""HREF"">" & vbCrLf & _
271
" <xsl:value-of select="".""/>" & vbCrLf & _
272
" </xsl:attribute>" & vbCrLf & _
273
" Traceback" & vbCrLf & _
275
"</xsl:template>" & vbCrLf & _
278
"</xsl:stylesheet>" & vbCrLf
281
' check if we are running cscript or wscript
283
If InStr(1, LCase(WScript.FullName), "cscript") > 0 Then
291
num_chars = Len(str) / 2
292
if num_chars > 4096 then
295
WScript.Echo Left(str, num_chars) & vbCrLf & "..." & vbCrLf
296
WScript.Echo Right(str, num_chars)
301
' parse the command line arguments
303
if WScript.Arguments.Named.Exists("noexecute") then
305
if WScript.Arguments.Named.Item("noexecute") <> "" then
306
commands_filename = WScript.Arguments.Named.Item("noexecute")
308
set commands_file = f.CreateTextFile(commands_filename, true)
311
if WScript.Arguments.Named.Exists("vs05") then
312
CPPFLAGS = CPPFLAGS & " /D_CRT_SECURE_NO_DEPRECATE"
313
CFLAGS = CFLAGS & " /D_CRT_SECURE_NO_DEPRECATE"
316
if WScript.Arguments.Named.Exists("buildonly") then
320
if WScript.Arguments.Named.Exists("buildbatch") then
321
bBatchFilesOnly = true
325
if WScript.Arguments.Named.Exists("testonly") then
329
if WScript.Arguments.Named.Exists("summarize") then
335
if WScript.Arguments.Named.Exists("localonly") then
336
mpiexec_args = mpiexec_args & " -localonly"
339
if WScript.Arguments.Named.Exists("batch") then
340
bBatch = WScript.Arguments.Named.Item("batch")
343
if WScript.Arguments.Named.Exists("remove-cvs-dirs") then
347
if WScript.Arguments.Named.Exists("fortran") then
348
bFortran = WScript.Arguments.Named.Item("fortran")
351
if WScript.Arguments.Named.Exists("tag") then
352
cvsTag = WScript.Arguments.Named.Item("tag")
355
if WScript.Arguments.Named.Exists("ch") then
356
Select Case WScript.Arguments.Named.Item("ch")
359
channel = "ch3ssmDebug"
361
channel = "ch3essmDebug"
363
channel = "ch3shmDebug"
365
channel = "ch3sshmDebug"
367
channel = "ch3ibDebug"
371
if WScript.Arguments.Named.Exists("mpich") then
372
bCheckoutMPICH = false
374
bConfigureMPICH = false
375
bConfigureMPICHTests = false
376
pathMPICH = WScript.Arguments.Named.Item("mpich")
377
mpiexec = pathMPICH & "\bin\mpiexec.exe"
380
if WScript.Arguments.Named.Exists("mpichi") then
382
bConfigureMPICH = false
383
pathMPICHInstalled = WScript.Arguments.Named.Item("mpichi")
384
mpiexec = pathMPICHInstalled & "\bin\mpiexec.exe"
387
if WScript.Arguments.Named.Exists("test_installed") then
389
bConfigureMPICH = false
391
pathMPICHInstalled = WshShell.RegRead("HKLM\Software\MPICH\Path")
393
cEcho "MPICH not installed on this machine."
396
if Right(pathMPICHInstalled, 1) = "\" then
397
pathMPICHInstalled = Left(pathMPICHInstalled, Len(pathMPICHInstalled) - 1)
399
mpiexec = """" & pathMPICHInstalled & "\bin\mpiexec.exe"""
400
cEcho "Testing installed mpich: " & pathMPICHInstalled
403
if WScript.Arguments.Named.Exists("make") then
404
bMakeMPICH = WScript.Arguments.Named.Item("make")
407
if WScript.Arguments.Named.Exists("configure") then
408
bConfigureMPICH = WScript.Arguments.Named.Item("configure")
411
if WScript.Arguments.Named.Exists("mpich") then
412
bCheckoutMPICH = false
413
pathMPICH = WScript.Arguments.Named.Item("mpich")
416
if WScript.Arguments.Named.Exists("intel") then
417
bCheckoutINTEL = false
418
pathINTEL = WScript.Arguments.Named.Item("intel")
421
if WScript.Arguments.Named.Exists("cpp") then
423
pathCPP = WScript.Arguments.Named.Item("cpp")
426
if WScript.Arguments.Named.Exists("ssh_user") then
427
username = WScript.Arguments.Named.Item("ssh_user")
430
if WScript.Arguments.Named.Exists("ssh-user") then
431
username = WScript.Arguments.Named.Item("ssh-user")
434
if WScript.Arguments.Named.Exists("ssh") then
435
ssh_cmd = WScript.Arguments.Named.Item("ssh")
438
if WScript.Arguments.Named.Exists("cvs_host") then
439
cvs_host = WScript.Arguments.Named.Item("cvs_host")
442
if WScript.Arguments.Named.Exists("cvs-host") then
443
cvs_host = WScript.Arguments.Named.Item("cvs-host")
446
if WScript.Arguments.Named.Exists("win64") then
448
mpichlib = mpichlib & " bufferoverflowU.lib"
449
fmpichlib = fmpichlib & " bufferoverflowU.lib"
452
if WScript.Arguments.Named.Exists("test") then
453
tests = Split(WScript.Arguments.Named.Item("test"), ",")
458
for each test in tests
467
cEcho "unknown test: " & test
472
' test the command line parsing
475
' tests = tests & "mpich "
478
' tests = tests & "c++ "
481
' tests = tests & "intel "
484
' tests = tests & "mpich "
493
'cEcho "cvsTag = " & cvsTag
497
last_commands_dir = ""
498
Function RunCommand(cmd_line)
499
if bCommandsOnly then
500
if WshShell.CurrentDirectory <> last_commands_dir then
501
commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
503
last_commands_dir = WshShell.CurrentDirectory
504
commands_file.WriteLine(cmd_line & " 2>&1")
507
Set oExec = WshShell.Exec("cmd /C " & cmd_line & " 2>&1")
508
cmd_output = oExec.StdOut.ReadAll()
509
'cmd_output = cmd_output & oExec.StdErr.ReadAll()
510
RunCommand = cmd_output
514
Function RunEchoCommand(cmd_line)
516
cmd_line = "cmd /C " & cmd_line & " 2>&1"
517
Set oExec = WshShell.Exec(cmd_line)
518
while not oExec.Stdout.AtEndOfStream
519
cEcho oExec.Stdout.ReadLine()
523
Function RunEchoCommandError(cmd_line)
525
cmd_line = "cmd /C " & cmd_line & " 2>&1"
526
Set oExec = WshShell.Exec(cmd_line)
527
while not oExec.Stdout.AtEndOfStream
528
cEcho oExec.Stdout.ReadLine()
530
RunEchoCommand = oExec.ExitCode
533
Function RunEchoCommandToFile(cmd_line, file)
535
cmd_line = "cmd /C " & cmd_line & " 2>&1"
536
Set oExec = WshShell.Exec(cmd_line)
537
while not oExec.Stdout.AtEndOfStream
538
line = oExec.Stdout.ReadLine()
542
RunEchoCommandToFile = oExec.ExitCode
545
Function ReplaceBetweenTags(str, tag1, find_str, tag2, replace_str)
546
Dim index, left_str, right_str, start_index, end_index
547
index = InStr(str, find_str)
549
'MsgBox find_str & " not found in: " & str
550
ReplaceBetweenTags = str
553
left_str = Left(str, index)
554
right_str = Right(str, Len(str) - index)
555
start_index = InStrRev(left_str, tag1)
556
If start_index = 0 Then
557
'MsgBox tag1 & " not found in: " & left_str
558
ReplaceBetweenTags = str
561
end_index = InStr(right_str, tag2)
562
If end_index = 0 Then
563
'MsgBox tag2 & " not found in: " & right_str
564
ReplaceBetweenTags = str
567
end_index = end_index + index
568
ReplaceBetweenTags = Left(str, start_index-1) & replace_str & Right(str, Len(str) - end_index - Len(tag2) + 1)
571
Function ReplaceBetweenTagsAll(str, tag1, find_str, tag2, replace_str)
572
str2 = ReplaceBetweenTags(str, tag1, find_str, tag2, replace_str)
575
str2 = ReplaceBetweenTags(str, tag1, find_str, tag2, replace_str)
577
ReplaceBetweenTagsAll = str
580
Function ParseFailed(str)
582
' remove the passed fields
584
rx.Pattern = "<MPITEST>.*" & vbCrLf & "<NAME>.*</NAME>.*" & vbCrLf & "<STATUS>pass</STATUS>.*" & vbCrLf & "</MPITEST>.*" & vbCrLf
585
str = rx.Replace(str, "")
586
' remove failures due to missing executables
587
str = ReplaceBetweenTagsAll(str, "<MPITEST>", "no executable, test skipped", "</MPITEST>" & vbCrLf, "")
591
Function CountInstances(filename, str)
592
set fin = f.OpenTextFile(filename)
597
if not fin.AtEndOfStream then
598
Set Matches = rx.Execute(fin.ReadAll())
599
For Each Match in Matches
603
CountInstances = count
606
Function CheckOut(package)
609
if bRemoveDirs and f.FolderExists("mpich") then
610
f.DeleteFolder "mpich", true
612
co = "mpichallWithMPE"
614
if bRemoveDirs and f.FolderExists("mpi1") then
615
f.DeleteFolder "mpi1", true
617
co = "-d mpi1 mpich/examples/test"
619
if bRemoveDirs and f.FolderExists("mpicxxtest") then
620
f.DeleteFolder "mpicxxtest", true
624
if bRemoveDirs and f.FolderExists("IntelMPITEST") then
625
f.DeleteFolder "IntelMPITEST", true
629
if bRemoveDirs and f.FolderExists(package) then
630
f.DeleteFolder package, true
634
cmd = "cvs -q -d :ext:" & username & "@" & cvs_host & ":" & cvs_root_dir & " co " & co
636
env("CVS_RSH") = ssh_cmd
638
if package = "mpich" then
639
cEcho "changing into directory " & WshShell.CurrentDirectory & "\mpi1"
640
WshShell.CurrentDirectory = "mpi1"
641
cmd = "cvs -q co -d io romio/test"
644
cEcho "changing into directory " & rootdir
645
WshShell.CurrentDirectory = rootdir
650
Function internalFindFiles(ByRef files, folder, filename)
651
For Each sub_folder in folder.SubFolders
652
internalFindFiles files, sub_folder, filename
654
For Each file in folder.Files
655
If file.Name = filename Then
656
files.Add num_files, file.Path
657
num_files = num_files + 1
661
Function FindFiles(ByRef files, folder, filename)
664
internalFindFiles files, folder, filename
667
Function BuildMPICHTestList(filename, testlistfile)
668
Set fin = f.OpenTextFile(filename)
669
while not fin.AtEndOfStream
670
line = fin.ReadLine()
672
' Find and parse the RunTest lines
673
if InStr(1, line, "RunTest") then
674
words = Split(line, " ", -1, 1)
675
if UBound(words) > 2 then
676
testlistfile.WriteLine(words(1) & " " & words(2))
679
' The romio tests don't use RunTest lines so find and parse lines with "$mpirun -np" in them.
680
if InStr(1, line, "$mpirun -np") > 0 and InStr(1, line, "FILENAME") > 0 then
681
words = Split(line, " ", -1, 1)
682
if UBound(words) > 3 then
683
if InStr(1, words(3), "./") then
684
testlistfile.WriteLine(Right(words(3), len(words(3))-2) & " " & words(2))
686
testlistfile.WriteLine(words(3) & " " & words(2))
694
Function BuildMPICHMakefile(filename, outputfile)
695
Set fin = f.OpenTextFile(filename)
696
while not fin.AtEndOfStream
697
line = fin.ReadLine()
699
' FIXME: Add code to handle the io\Makefile.in format
700
if InStr(1, line, " -o ", 1) > 0 and InStr(1, line, ".o", 1) > 0 then
701
if InStr(1, line, "FLINKER") then
708
first = InStr(1, line, " -o ")
709
last = InStr(first+4, line, " ")
710
test = Mid(line, first + 4, last - first - 4)
711
test = Replace(test, "./", "")
714
cmd = FC & " /nologo -o " & test & ".exe"
716
cmd = CC & CFLAGS & " -o " & test & ".exe"
718
words = Split(line, " ", -1, 1)
719
for each word in words
720
if instr(1, word, ".o") then
721
cmd = cmd & " " & Replace(filename, "Makefile.in", Replace(word, ".o", ext))
725
cmd = cmd & " " & fmpichlib '& " " & mpichlib
727
cmd = cmd & " " & mpichlib
730
if not bFortran and bFort then
731
result = "not building fortran"
733
if f.FileExists(test & ".exe") then
734
f.DeleteFile(test & ".exe")
736
'result = RunCommand(cmd)
739
outputfile.WriteLine(cmd)
740
'outputfile.Write(result)
741
stdoutfile = Replace(filename, "Makefile.in", test & ".std")
742
if f.FileExists(stdoutfile) then
743
f.CopyFile stdoutfile, mpich_outputdir, true
751
Function BuildCPPMakefile(filename)
752
Set fin = f.OpenTextFile(filename)
753
Set buildout = f.CreateTextFile("build.out", True)
754
Set testlistout = f.CreateTextFile("testlist", True)
755
while not fin.AtEndOfStream
756
line = fin.ReadLine()
758
if InStr(1, line, " -o ", 1) > 0 then
759
first = InStr(1, line, " -o ")
760
last = InStr(first+4, line, " ")
761
test = Mid(line, first + 4, last - first - 4)
762
test = Replace(test, "./", "")
763
' check to make sure we've matched a valid source file
764
if f.FileExists(Replace(filename, "Makefile.in", test & ".cc ")) then
765
cmd = CPP & CPPFLAGS & " /DTEST_ROUTINE=" & test & " /DTEST_NAME=\""" & test & "\"" -o " & test & ".exe "
766
cmd = cmd & "/Tp" & Replace(filename, "Makefile.in", test & ".cc ")
767
if test <> "range" then ' the range test provides its own main and conflicts with the suplementary source files
768
cmd = cmd & "/Tp" & Replace(filename, "Makefile.in", "cxxtest.cc ")
769
cmd = cmd & "/Tp" & Replace(filename, "Makefile.in", "initialized1.cc ")
770
cmd = cmd & "/Tp" & Replace(filename, "Makefile.in", "messages.cc ")
771
cmd = cmd & "/Tp" & Replace(filename, "Makefile.in", "stack.cc ")
772
cmd = cmd & "/Tp" & Replace(filename, "Makefile.in", "signal.cc ")
774
cmd = cmd & cppmpichlib & " " & mpichlib
776
if f.FileExists(test & ".exe") then
777
f.DeleteFile(test & ".exe")
779
result = RunCommand(cmd)
781
buildout.WriteLine(cmd)
782
buildout.Write(result)
783
if test = "range" then
784
testlistout.WriteLine(test & " 8")
786
if test <> "initialized1" then ' initialized1 is an invalid test so skip it
787
testlistout.WriteLine(test & " 4")
798
Function BuildINTELTest(testdir, np, buildout, testlistout)
802
test = Mid(testdir, InStrRev(testdir, "\")+1)
803
if f.FileExists(testdir & "\node.c") then
805
cmd = CC & CFLAGS & " -o " & test & ".exe "
807
if f.FileExists(testdir & "\node.f") then
809
test = test & "f" ' add an f to the fortran tests to prevent name collisions with the c tests
810
cmd = FC & " /nologo /fpp -o " & test & ".exe "
813
cmd = cmd & "-I" & intel_rootdir & "\include "
814
for each file in f.GetFolder(testdir).Files
815
if Instr(file.Name, ".c") > 0 then
816
cmd = cmd & testdir & "\" & file.Name & " "
819
cmd = cmd & intel_rootdir & "\lib\libmpitest.c " & mpichlib
822
cmd = cmd & "-I" & intel_rootdir & "\include "
823
for each file in f.GetFolder(testdir).Files
824
if Instr(file.Name, ".f") > 0 or Instr(file.Name, ".F") > 0 then
825
cmd = cmd & testdir & "\" & file.Name & " "
828
cmd = cmd & intel_rootdir & "\lib\libmpitestf.f " & fmpichlib '& " " & mpichlib
831
' if f.FileExists("node.obj") then
832
' f.DeleteFile("node.obj")
834
' If you don't delete the old object file you can link previous code when a build fails
835
buildout.WriteLine("del node.obj")
842
' If this is a fortran test, let the global variable determine whether we compile it or not.
843
do_command = bFortran
847
' redirect the output to a file to prevent output buffer deadlock
848
cmd = cmd '& " > cmdout.txt"
849
if f.FileExists(test & ".exe") then
850
f.DeleteFile(test & ".exe")
852
' result = RunCommand(cmd)
853
' if f.FileExists("cmdout.txt") then
854
' set outfile = f.OpenTextFile("cmdout.txt")
855
' if not outfile.AtEndOfStream then
856
' result = outfile.ReadAll()
861
' f.DeleteFile("cmdout.txt")
864
' result = "skipping build"
865
cmd = "REM skipping build"
869
buildout.WriteLine(cmd)
870
' buildout.Write(result)
871
testlistout.WriteLine(test & " " & np)
874
Function BuildMPICHTestList(filename, srcdir, buildout)
875
cEcho "building testlist: " & filename
876
buildout.WriteLine("building testlist: " & filename)
877
set fin = f.OpenTextFile(filename)
878
while not fin.AtEndOfStream
879
twostrings = split(Trim(fin.ReadLine()), " ", -1, 1)
880
if not IsNull(twostrings) then
882
for each s in twostrings
887
basefilename = Replace(filename, "testlist", test)
892
If f.FileExists(basefilename & ".c") Then
894
cmd = CC & CFLAGS & " -o " & test & ".exe "
895
cmd = cmd & "-I" & srcdir & "\include " & basefilename & ".c "
896
cmd = cmd & srcdir & "\util\mtest.c " & mpichlib & " ws2_32.lib" ' the join test needs the socket library
897
ElseIf f.FileExists(basefilename & ".f") Then
899
cmd = FC & " /nologo /fpp -o " & test & ".exe "
900
cmd = cmd & "-I" & srcdir & "\include " & basefilename & ".f "
901
cmd = cmd & srcdir & "\f77\util\mtestf.f " & fmpichlib '& " " & mpichlib
902
ElseIf f.FileExists(basefilename & ".cxx") Then
904
cmd = CPP & CPPFLAGS & " -o " & test & ".exe "
905
cmd = cmd & "-I" & srcdir & "\include " & basefilename & ".cxx "
906
cmd = cmd & srcdir & "\cxx\util\mtest.cxx " & cppmpichlib & " " & mpichlib
908
cmd = "no source file " & basefilename & ".c .f or .cxx"
917
' If this is a fortran test, let the global variable determine whether we compile it or not.
918
do_command = bFortran
925
' redirect the output to a file to prevent output buffer deadlock
926
cmd = cmd '& " > cmdout.txt"
927
if f.FileExists(test & ".exe") then
928
f.DeleteFile(test & ".exe")
930
' result = RunCommand(cmd)
931
' if f.FileExists("cmdout.txt") then
932
' set outfile = f.OpenTextFile("cmdout.txt")
933
' if not outfile.AtEndOfStream then
934
' result = outfile.ReadAll()
939
' f.DeleteFile("cmdout.txt")
942
cmd = "REM skipping build"
946
buildout.WriteLine(cmd)
947
' buildout.Write(result)
953
Function ReplaceAts( str )
954
Dim regEx, Match, Matches
955
Set regEx = New RegExp
956
regEx.Pattern = "@.*@"
957
regEx.IgnoreCase = True
959
Set Matches = regEx.Execute(str)
960
For Each Match in Matches
963
str = Replace(str, "@F77_AINT@", "INTEGER")
964
Case "@OPT_FCMDLINE@"
965
str = Replace(str, "@OPT_FCMDLINE@", "")
967
str = Replace(str, "@OPT_FREAL2@", "C ")
969
str = Replace(str, "@OPT_FREAL4@", "")
971
str = Replace(str, "@OPT_FREAL8@", "")
972
Case "@OPT_FDOUBLE_COMPLEX@"
973
str = Replace(str, "@OPT_FDOUBLE_COMPLEX@", "")
975
str = Replace(str, "@OPT_FINT1@", "")
977
str = Replace(str, "@OPT_FINT2@", "")
979
str = Replace(str, "@OPT_FINT4@", "")
985
Function CountTests(outdir)
986
Set fin = f.OpenTextFile(outdir & "testlist")
988
while not fin.AtEndOfStream
989
line = fin.ReadLine()
991
twostrings = split(line, " ", -1, 1)
992
if not IsNull(twostrings) then
994
for each s in twostrings
998
if Left(twostrings(0), 1) <> "#" then
999
if Len(twostrings(1)) > 0 then
1000
num_tests = num_tests + 1
1007
CountTests = num_tests
1010
Function BuildMPICHTestSuite(srcdir, builddir)
1011
mpich_outputdir = f.GetAbsolutePathName(builddir) & "\"
1012
if Not f.FolderExists(builddir) then
1013
f.CreateFolder(builddir)
1016
set makefilein_files = CreateObject("Scripting.Dictionary")
1017
set test_files = CreateObject("Scripting.Dictionary")
1018
FindFiles makefilein_files, f.GetFolder(srcdir), "Makefile.in"
1019
FindFiles test_files, f.GetFolder(srcdir), "runtests.in"
1021
' move into the build directory
1022
cEcho "changing into directory " & builddir
1023
WshShell.CurrentDirectory = builddir
1025
set buildout = f.CreateTextFile("build.bat", True)
1026
a = makefilein_files.Items
1027
If makefilein_files.Count > 0 Then
1028
For i = 0 to makefilein_files.Count - 1
1029
BuildMPICHMakefile a(i), buildout
1033
RunCommand("build.bat 2>&1 | tee build.out")
1034
' for some reason the mpich test suite copies longuser.exe to use in then -np 4 case
1035
' rather than just making two entries in the runtests.in file
1036
if f.FileExists(mpich_outputdir & "longuser.exe") then
1037
f.CopyFile mpich_outputdir & "longuser.exe", mpich_outputdir & "longuser1.exe"
1040
set testlistout = f.CreateTextFile("testlist", True)
1041
a = test_files.Items
1042
if test_files.Count > 0 Then
1043
for i = 0 to test_files.Count - 1
1044
BuildMPICHTestList a(i), testlistout
1049
' move back to the root directory
1050
cEcho "changing into directory " & rootdir
1051
WshShell.CurrentDirectory = rootdir
1054
Function RunMPICHTestSuite(outdir)
1055
cEcho "changing into directory " & outdir
1056
WshShell.CurrentDirectory = outdir
1058
num_tests = CountTests(outdir)
1059
set fcmds = f.CreateTextFile(outdir & "mpich_cmds.bat")
1060
set fout = f.CreateTextFile(outdir & "summary.xml")
1061
Set fin = f.OpenTextFile(outdir & "testlist")
1062
if not f.FileExists("er.xsl") then
1063
set erfile = f.CreateTextFile(outdir & "er.xsl")
1064
erfile.Write(erfilecontents)
1067
fout.WriteLine("<?xml version='1.0' ?>")
1068
fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
1069
fout.WriteLine("<MPITESTRESULTS>")
1070
fout.WriteLine("<DATE>" & Date)
1071
fout.WriteLine("</DATE>")
1072
fout.WriteLine("<MPISOURCE></MPISOURCE>")
1073
while not fin.AtEndOfStream
1074
line = fin.ReadLine()
1076
twostrings = split(line, " ", -1, 1)
1077
if not IsNull(twostrings) then
1079
for each s in twostrings
1083
if Left(twostrings(0), 1) <> "#" then
1084
if Len(twostrings(1)) > 0 then
1085
exe = outdir & twostrings(0) & ".exe"
1086
cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1087
cEcho "test " & cur_test & " of " & num_tests
1088
cur_test = cur_test + 1
1090
fout.WriteLine("<MPITEST>")
1091
fout.WriteLine("<NAME>" & twostrings(0) & "</NAME>")
1092
if f.FileExists(exe) then
1093
fcmds.WriteLine(cmd & " > " & twostrings(0) & "." & twostrings(1) & ".output")
1094
if bCommandsOnly then
1095
result = "not executing test"
1096
if WshShell.CurrentDirectory <> last_commands_dir then
1097
commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
1099
last_commands_dir = WshShell.CurrentDirectory
1100
commands_file.WriteLine(cmd & " 2>&1")
1102
result = RunCommand(cmd)
1105
result = "no executable, test skipped"
1106
num_skipped = num_skipped + 1
1109
if (Instr(result, " No Errors") or Instr(result, "No errors")) And len(result) < 14 Then
1110
fout.WriteLine("<STATUS>pass</STATUS>")
1111
num_passed = num_passed + 1
1116
stdfilename = outdir & twostrings(0) & ".std"
1117
if f.FileExists(stdfilename) then
1118
set stdfile = f.OpenTextFile(stdfilename, 1, false)
1119
' std contains the file minus the first and last lines
1120
' altstd contains the entire file
1121
' fstd contains the same as std with one space added to the beginning of each line
1122
std = stdfile.ReadLine()
1123
altstd = std & vbCrLf
1124
std = stdfile.ReadLine() & vbCrLf
1125
altstd = altstd & std
1127
while not stdfile.AtEndOfStream
1128
line = stdfile.ReadLine()
1129
if not stdfile.AtEndOfStream then
1130
std = std & line & vbCrLf
1131
altstd = altstd & line & vbCrLf
1132
fstd = fstd & " " & line & vbCrLf
1134
altstd = altstd & line & vbCrLf
1139
if (std <> "") and (result = std or result = altstd or result = fstd) then
1140
fout.WriteLine("<STATUS>pass</STATUS>")
1141
num_passed = num_passed + 1
1144
cEcho "************* std ***************"
1146
cEcho "************* != ****************"
1148
cEcho "*********************************"
1150
fout.WriteLine("<STATUS>fail</STATUS>")
1151
fout.WriteLine("<TESTDIFF>")
1152
cmd = Replace(cmd, "&", "&")
1153
cmd = Replace(cmd, "<", "<")
1154
cmd = Replace(cmd, ">", ">")
1157
fout.WriteLine("************* std ***************")
1158
std = Replace(std, "&", "&")
1159
std = Replace(std, "<", "<")
1160
std = Replace(std, ">", ">")
1162
fout.WriteLine("************* != ****************")
1164
result = Replace( result, "&", "&" )
1165
result = Replace( result, "<", "<" )
1166
result = Replace( result, ">", ">" )
1167
fout.WriteLine(result)
1169
fout.WriteLine("*********************************")
1171
fout.WriteLine("</TESTDIFF>")
1172
if f.FileExists(exe) then
1173
num_failed = num_failed + 1
1177
fout.WriteLine("</MPITEST>")
1184
fout.WriteLine("</MPITESTRESULTS>")
1187
' move back to the root directory
1188
cEcho "changing into directory " & rootdir
1189
WshShell.CurrentDirectory = rootdir
1192
Function RunMPICHTestSuiteBatch(outdir)
1193
cEcho "changing into directory " & outdir
1194
WshShell.CurrentDirectory = outdir
1196
num_tests = CountTests(outdir)
1198
if not bSummarize then
1199
' first pass generates the batch file
1200
set fcmds = f.CreateTextFile(outdir & "mpich_cmds.bat")
1201
Set fin = f.OpenTextFile(outdir & "testlist")
1202
while not fin.AtEndOfStream
1203
line = fin.ReadLine()
1205
twostrings = split(line, " ", -1, 1)
1206
if not IsNull(twostrings) then
1208
for each s in twostrings
1212
if Left(twostrings(0), 1) <> "#" then
1213
if Len(twostrings(1)) > 0 then
1214
exe = outdir & twostrings(0) & ".exe"
1215
cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1216
fcmds.WriteLine("REM test " & cur_test & " of " & num_tests)
1217
cur_test = cur_test + 1
1218
if f.FileExists(exe) then
1219
fcmds.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
1221
fcmds.WriteLine("REM no executable, test skipped")
1232
if Not bCommandsOnly then
1233
if not bBatchFilesOnly Then
1234
RunEchoCommand(outdir & "mpich_cmds.bat")
1239
if not bBatchFilesOnly then
1240
' second pass parses the output
1241
set fout = f.CreateTextFile(outdir & "summary.xml")
1242
if not f.FileExists("er.xsl") then
1243
set erfile = f.CreateTextFile(outdir & "er.xsl")
1244
erfile.Write(erfilecontents)
1247
fout.WriteLine("<?xml version='1.0' ?>")
1248
fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
1249
fout.WriteLine("<MPITESTRESULTS>")
1250
fout.WriteLine("<DATE>" & Date)
1251
fout.WriteLine("</DATE>")
1252
fout.WriteLine("<MPISOURCE></MPISOURCE>")
1253
Set fin = f.OpenTextFile(outdir & "testlist")
1254
while not fin.AtEndOfStream
1255
line = fin.ReadLine()
1257
twostrings = split(line, " ", -1, 1)
1258
if not IsNull(twostrings) then
1260
for each s in twostrings
1264
if Left(twostrings(0), 1) <> "#" then
1265
if Len(twostrings(1)) > 0 then
1266
exe = outdir & twostrings(0) & ".exe"
1267
cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1268
fout.WriteLine("<MPITEST>")
1269
fout.WriteLine("<NAME>" & twostrings(0) & "</NAME>")
1270
if f.FileExists(exe) then
1271
if bCommandsOnly then
1272
result = "not executing test"
1273
if WshShell.CurrentDirectory <> last_commands_dir then
1274
commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
1276
last_commands_dir = WshShell.CurrentDirectory
1277
commands_file.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
1279
if f.FileExists(twostrings(0) & "." & twostrings(1) & ".output") then
1280
Set foutput = f.OpenTextFile(twostrings(0) & "." & twostrings(1) & ".output")
1281
if not foutput.AtEndOfStream then
1282
result = foutput.ReadAll()
1292
result = "no executable, test skipped"
1293
num_skipped = num_skipped + 1
1295
if (Instr(result, " No Errors") or Instr(result, "No errors")) And len(result) < 14 Then
1296
fout.WriteLine("<STATUS>pass</STATUS>")
1297
num_passed = num_passed + 1
1302
stdfilename = outdir & twostrings(0) & ".std"
1303
if f.FileExists(stdfilename) then
1304
set stdfile = f.OpenTextFile(stdfilename, 1, false)
1305
' std contains the file minus the first and last lines
1306
' altstd contains the entire file
1307
' fstd contains the same as std with one space added to the beginning of each line
1308
std = stdfile.ReadLine()
1309
altstd = std & vbCrLf
1310
std = stdfile.ReadLine() & vbCrLf
1311
altstd = altstd & std
1313
while not stdfile.AtEndOfStream
1314
line = stdfile.ReadLine()
1315
if not stdfile.AtEndOfStream then
1316
std = std & line & vbCrLf
1317
altstd = altstd & line & vbCrLf
1318
fstd = fstd & " " & line & vbCrLf
1320
altstd = altstd & line & vbCrLf
1325
if (std <> "") and (result = std or result = altstd or result = fstd) then
1326
fout.WriteLine("<STATUS>pass</STATUS>")
1327
num_passed = num_passed + 1
1330
cEcho "************* std ***************"
1332
cEcho "************* != ****************"
1334
cEcho "*********************************"
1336
fout.WriteLine("<STATUS>fail</STATUS>")
1337
fout.WriteLine("<TESTDIFF>")
1338
cmd = Replace(cmd, "&", "&")
1339
cmd = Replace(cmd, "<", "<")
1340
cmd = Replace(cmd, ">", ">")
1343
fout.WriteLine("************* std ***************")
1344
std = Replace(std, "&", "&")
1345
std = Replace(std, "<", "<")
1346
std = Replace(std, ">", ">")
1348
fout.WriteLine("************* != ****************")
1350
result = Replace( result, "&", "&" )
1351
result = Replace( result, "<", "<" )
1352
result = Replace( result, ">", ">" )
1353
fout.WriteLine(result)
1355
fout.WriteLine("*********************************")
1357
fout.WriteLine("</TESTDIFF>")
1358
if f.FileExists(exe) then
1359
num_failed = num_failed + 1
1363
fout.WriteLine("</MPITEST>")
1370
fout.WriteLine("</MPITESTRESULTS>")
1374
' move back to the root directory
1375
cEcho "changing into directory " & rootdir
1376
WshShell.CurrentDirectory = rootdir
1379
Function BuildCPPTestSuite(srcdir, builddir)
1380
if not f.FileExists(srcdir & "\cxxtestconf.h") then
1381
set fout = f.CreateTextFile(srcdir & "\cxxtestconf.h")
1382
fout.WriteLine("#ifndef CXXTESTCONF_H")
1383
fout.WriteLine("#define CXXTESTCONF_H")
1384
fout.WriteLine("#define HAVE_EXCEPTIONS")
1385
fout.WriteLine("#define HAVE_IOSTREAM")
1386
fout.WriteLine("#define USE_XMLOUT")
1387
fout.WriteLine("#endif")
1390
if f.FileExists(srcdir & "\Makefile.in") then
1391
filename = f.GetAbsolutePathName(srcdir & "\Makefile.in")
1392
if Not f.FolderExists(builddir) then
1393
f.CreateFolder(builddir)
1395
cEcho "changing into directory " & builddir
1396
WshShell.CurrentDirectory = builddir
1397
BuildCPPMakefile filename
1398
' move back to the root directory
1399
cEcho "changing into directory " & rootdir
1400
WshShell.CurrentDirectory = rootdir
1404
Function RunCPPTestSuite(outdir)
1405
cEcho "changing into directory " & outdir
1406
WshShell.CurrentDirectory = outdir ' the c++ suite must be run from the output directory because the tests assume summary.xml is in the current directory
1408
num_tests = CountTests(outdir)
1409
set fcmds = f.CreateTextFile(outdir & "cpp_cmds.bat")
1410
set fout = f.CreateTextFile(outdir & "summary.xml")
1411
Set fin = f.OpenTextFile(outdir & "testlist")
1412
if not f.FileExists("er.xsl") then
1413
set erfile = f.CreateTextFile(outdir & "er.xsl")
1414
erfile.Write(erfilecontents)
1417
fout.WriteLine("<?xml version='1.0' ?>")
1418
fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
1419
fout.WriteLine("<MPITESTRESULTS>")
1420
fout.WriteLine("<DATE>" & Date)
1421
fout.WriteLine("</DATE>")
1422
fout.WriteLine("<MPISOURCE></MPISOURCE>")
1424
while not fin.AtEndOfStream
1425
line = fin.ReadLine()
1427
twostrings = split(line, " ", -1, 1)
1428
if not IsNull(twostrings) then
1430
for each s in twostrings
1434
if Left(twostrings(0), 1) <> "#" then
1435
if Len(twostrings(1)) > 0 then
1436
exe = outdir & twostrings(0) & ".exe"
1437
cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1438
cEcho "test " & cur_test & " of " & num_tests
1439
cur_test = cur_test + 1
1441
if f.FileExists(exe) then
1442
fcmds.WriteLine(cmd & " > " & twostrings(0) & "." & twostrings(1) & ".output")
1443
if bCommandsOnly then
1444
result = "not executing test"
1445
if WshShell.CurrentDirectory <> last_commands_dir then
1446
commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
1448
last_commands_dir = WshShell.CurrentDirectory
1449
commands_file.WriteLine(cmd & " 2>&1")
1451
result = RunCommand(cmd)
1454
result = "no executable, test skipped"
1455
num_skipped = num_skipped + 1
1464
set fout = f.OpenTextFile(outdir & "summary.xml", 8, True)
1465
fout.WriteLine("</MPITESTRESULTS>")
1468
' move back to the root directory
1469
cEcho "changing into directory " & rootdir
1470
WshShell.CurrentDirectory = rootdir
1473
Function RunCPPTestSuiteBatch(outdir)
1474
cEcho "changing into directory " & outdir
1475
WshShell.CurrentDirectory = outdir ' the c++ suite must be run from the output directory because the tests assume summary.xml is in the current directory
1477
num_tests = CountTests(outdir)
1479
if not bSummarize then
1480
' first pass creates the batch file
1481
set fcmds = f.CreateTextFile(outdir & "cpp_cmds.bat")
1482
Set fin = f.OpenTextFile(outdir & "testlist")
1483
while not fin.AtEndOfStream
1484
line = fin.ReadLine()
1486
twostrings = split(line, " ", -1, 1)
1487
if not IsNull(twostrings) then
1489
for each s in twostrings
1493
if Left(twostrings(0), 1) <> "#" then
1494
if Len(twostrings(1)) > 0 then
1495
exe = outdir & twostrings(0) & ".exe"
1496
cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1497
fcmds.WriteLine("REM test " & cur_test & " of " & num_tests)
1498
cur_test = cur_test + 1
1500
if f.FileExists(exe) then
1501
fcmds.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
1502
if bCommandsOnly then
1503
if WshShell.CurrentDirectory <> last_commands_dir then
1504
commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
1506
last_commands_dir = WshShell.CurrentDirectory
1507
commands_file.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
1510
fcmds.WriteLine("REM no executable, test skipped")
1511
num_skipped = num_skipped + 1
1522
if not bCommandsOnly then
1523
if not bBatchFilesOnly then
1524
if f.FileExists(outdir & "summary.xml") then
1525
f.DeleteFile(outdir & "summary.xml")
1527
RunEchoCommand(outdir & "cpp_cmds.bat")
1532
if not bBatchFilesOnly then
1533
' create summary2.xml from summary.xml with the correct header and footer
1534
set fout = f.CreateTextFile(outdir & "summary2.xml")
1535
if not f.FileExists("er.xsl") then
1536
set erfile = f.CreateTextFile(outdir & "er.xsl")
1537
erfile.Write(erfilecontents)
1540
fout.WriteLine("<?xml version='1.0' ?>")
1541
fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
1542
fout.WriteLine("<MPITESTRESULTS>")
1543
fout.WriteLine("<DATE>" & Date)
1544
fout.WriteLine("</DATE>")
1545
fout.WriteLine("<MPISOURCE></MPISOURCE>")
1546
If f.FileExists(outdir & "summary.xml") Then
1547
set fin = f.OpenTextFile(outdir & "summary.xml") ' summary.xml is created by the tests themselves
1548
if not fin.AtEndOfStream then
1549
fout.Write(fin.ReadAll())
1552
fout.WriteLine("</MPITESTRESULTS>")
1556
' move back to the root directory
1557
cEcho "changing into directory " & rootdir
1558
WshShell.CurrentDirectory = rootdir
1561
Function BuildINTELTestSuite(srcdir, builddir)
1562
intel_rootdir = f.GetAbsolutePathName(srcdir)
1563
if Not f.FolderExists(builddir) then
1564
f.CreateFolder(builddir)
1566
cEcho "changing into directory " & builddir
1567
WshShell.CurrentDirectory = builddir
1568
set buildout = f.CreateTextFile("build.bat", True)
1569
set testlistout = f.CreateTextFile("testlist", True)
1571
if (not f.FileExists(intel_rootdir & "\include\foptions.h")) and f.FileExists(intel_rootdir & "\include\foptions.h.in") then
1572
set fin = f.OpenTextFile(intel_rootdir & "\include\foptions.h.in")
1573
set fout = f.CreateTextFile(intel_rootdir & "\include\foptions.h")
1574
contents = fin.ReadAll()
1575
contents = ReplaceAts(contents)
1576
fout.Write(contents)
1581
' build the tests in each of the various testlists
1582
if f.FileExists(intel_rootdir & "\Test\testlist2l") then
1583
set fin = f.OpenTextFile(intel_rootdir & "\Test\testlist2l")
1584
while not fin.AtEndOfStream
1585
line = fin.ReadLine()
1586
line = Replace(line, "/", "\")', 1, -1, 1)
1587
BuildINTELTest intel_rootdir & "\Test\" & line, "2", buildout, testlistout
1591
if f.FileExists(intel_rootdir & "\Test\testlist2-2l") then
1592
set fin = f.OpenTextFile(intel_rootdir & "\Test\testlist2-2l")
1593
while not fin.AtEndOfStream
1594
line = fin.ReadLine()
1595
line = Replace(line, "/", "\")', 1, -1, 1)
1596
BuildINTELTest intel_rootdir & "\Test\" & line, "2", buildout, testlistout
1600
if f.FileExists(intel_rootdir & "\Test\testlist4") then
1601
set fin = f.OpenTextFile(intel_rootdir & "\Test\testlist4")
1602
while not fin.AtEndOfStream
1603
line = fin.ReadLine()
1604
line = Replace(line, "/", "\")', 1, -1, 1)
1605
BuildINTELTest intel_rootdir & "\Test\" & line, "4", buildout, testlistout
1609
if f.FileExists(intel_rootdir & "\Test\testlist4lg") then
1610
set fin = f.OpenTextFile(intel_rootdir & "\Test\testlist4lg")
1611
while not fin.AtEndOfStream
1612
line = fin.ReadLine()
1613
line = Replace(line, "/", "\")', 1, -1, 1)
1614
BuildINTELTest intel_rootdir & "\Test\" & line, "4", buildout, testlistout
1618
if f.FileExists(intel_rootdir & "\Test\testlist6") then
1619
set fin = f.OpenTextFile(intel_rootdir & "\Test\testlist6")
1620
while not fin.AtEndOfStream
1621
line = fin.ReadLine()
1622
line = Replace(line, "/", "\")', 1, -1, 1)
1623
BuildINTELTest intel_rootdir & "\Test\" & line, "6", buildout, testlistout
1629
RunEchoCommand("build.bat 2>&1 | tee build.out")
1630
' move back to the root directory
1631
cEcho "changing into directory " & rootdir
1632
WshShell.CurrentDirectory = rootdir
1635
Function RunINTELTestSuite(outdir)
1636
cEcho "changing into directory " & outdir
1637
WshShell.CurrentDirectory = outdir
1639
num_tests = CountTests(outdir)
1640
set fcmds = f.CreateTextFile(outdir & "intel_cmds.bat")
1641
set fout = f.CreateTextFile(outdir & "summary.xml")
1642
Set fin = f.OpenTextFile(outdir & "testlist")
1643
if not f.FileExists("er.xsl") then
1644
set erfile = f.CreateTextFile(outdir & "er.xsl")
1645
erfile.Write(erfilecontents)
1648
fout.WriteLine("<?xml version='1.0' ?>")
1649
fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
1650
fout.WriteLine("<MPITESTRESULTS>")
1651
fout.WriteLine("<DATE>" & Date)
1652
fout.WriteLine("</DATE>")
1653
fout.WriteLine("<MPISOURCE></MPISOURCE>")
1654
while not fin.AtEndOfStream
1655
line = fin.ReadLine()
1657
twostrings = split(line, " ", -1, 1)
1658
if not IsNull(twostrings) then
1660
for each s in twostrings
1664
if Left(twostrings(0), 1) <> "#" then
1665
if Len(twostrings(1)) > 0 then
1666
exe = outdir & twostrings(0) & ".exe"
1667
cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1668
cEcho "test " & cur_test & " of " & num_tests
1669
cur_test = cur_test + 1
1671
fout.WriteLine("<MPITEST>")
1672
fout.WriteLine("<NAME>" & twostrings(0) & "</NAME>")
1673
if f.FileExists(exe) then
1674
fcmds.WriteLine(cmd & " > " & twostrings(0) & "." & twostrings(1) & ".output")
1675
if bCommandsOnly then
1676
result = "not executing test"
1677
if WshShell.CurrentDirectory <> last_commands_dir then
1678
commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
1680
last_commands_dir = WshShell.CurrentDirectory
1681
commands_file.WriteLine(cmd & " 2>&1")
1683
result = RunCommand(cmd)
1686
result = "no executable, test skipped"
1687
num_skipped = num_skipped + 1
1690
if (Instr(result, "No errors") And len(result) < 14) or (Instr(result, "PASSED") > 0) Then
1691
fout.WriteLine("<STATUS>pass</STATUS>")
1692
num_passed = num_passed + 1
1694
fout.WriteLine("<STATUS>fail</STATUS>")
1695
fout.WriteLine("<TESTDIFF>")
1696
result = cmd & vbCrLf & result
1697
result = Replace( result, "&", "&" )
1698
result = Replace( result, "<", "<" )
1699
result = Replace( result, ">", ">" )
1700
fout.WriteLine(result)
1701
fout.WriteLine("</TESTDIFF>")
1702
if f.FileExists(exe) then
1703
num_failed = num_failed + 1
1706
fout.WriteLine("</MPITEST>")
1713
fout.WriteLine("</MPITESTRESULTS>")
1716
' move back to the root directory
1717
cEcho "changing into directory " & rootdir
1718
WshShell.CurrentDirectory = rootdir
1721
Function RunINTELTestSuiteBatch(outdir)
1722
cEcho "changing into directory " & outdir
1723
WshShell.CurrentDirectory = outdir
1725
num_tests = CountTests(outdir)
1727
if not bSummarize then
1728
' first pass generates the commands
1729
set fcmds = f.CreateTextFile(outdir & "intel_cmds.bat")
1730
Set fin = f.OpenTextFile(outdir & "testlist")
1731
while not fin.AtEndOfStream
1732
line = fin.ReadLine()
1734
twostrings = split(line, " ", -1, 1)
1735
if not IsNull(twostrings) then
1737
for each s in twostrings
1741
if Left(twostrings(0), 1) <> "#" then
1742
if Len(twostrings(1)) > 0 then
1743
exe = outdir & twostrings(0) & ".exe"
1744
cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1745
fcmds.WriteLine("REM test " & cur_test & " of " & num_tests)
1746
cur_test = cur_test + 1
1747
if f.FileExists(exe) then
1748
fcmds.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
1749
if bCommandsOnly then
1750
result = "not executing test"
1751
if WshShell.CurrentDirectory <> last_commands_dir then
1752
commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
1754
last_commands_dir = WshShell.CurrentDirectory
1755
commands_file.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
1758
fcmds.WriteLine("REM no executable, test skipped")
1769
if not bCommandsOnly then
1770
if not bBatchFilesOnly then
1771
RunEchoCommand(outdir & "intel_cmds.bat")
1776
if not bBatchFilesOnly then
1777
' second pass parses the output
1778
set fout = f.CreateTextFile(outdir & "summary.xml")
1779
if not f.FileExists("er.xsl") then
1780
set erfile = f.CreateTextFile(outdir & "er.xsl")
1781
erfile.Write(erfilecontents)
1784
fout.WriteLine("<?xml version='1.0' ?>")
1785
fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
1786
fout.WriteLine("<MPITESTRESULTS>")
1787
fout.WriteLine("<DATE>" & Date)
1788
fout.WriteLine("</DATE>")
1789
fout.WriteLine("<MPISOURCE></MPISOURCE>")
1790
Set fin = f.OpenTextFile(outdir & "testlist")
1791
while not fin.AtEndOfStream
1792
line = fin.ReadLine()
1794
twostrings = split(line, " ", -1, 1)
1795
if not IsNull(twostrings) then
1797
for each s in twostrings
1801
if Left(twostrings(0), 1) <> "#" then
1802
if Len(twostrings(1)) > 0 then
1803
exe = outdir & twostrings(0) & ".exe"
1804
cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1805
fout.WriteLine("<MPITEST>")
1806
fout.WriteLine("<NAME>" & twostrings(0) & "</NAME>")
1807
if f.FileExists(exe) then
1808
if bCommandsOnly then
1809
result = "not executing test"
1811
if f.FileExists(twostrings(0) & "." & twostrings(1) & ".output") then
1812
Set foutput = f.OpenTextFile(twostrings(0) & "." & twostrings(1) & ".output")
1813
if not foutput.AtEndOfStream then
1814
result = foutput.ReadAll()
1824
result = "no executable, test skipped"
1825
num_skipped = num_skipped + 1
1827
if (Instr(result, "No errors") And len(result) < 14) or (Instr(result, "PASSED") > 0) Then
1828
fout.WriteLine("<STATUS>pass</STATUS>")
1829
num_passed = num_passed + 1
1831
fout.WriteLine("<STATUS>fail</STATUS>")
1832
fout.WriteLine("<TESTDIFF>")
1833
result = cmd & vbCrLf & result
1834
result = Replace( result, "&", "&" )
1835
result = Replace( result, "<", "<" )
1836
result = Replace( result, ">", ">" )
1837
fout.WriteLine(result)
1838
fout.WriteLine("</TESTDIFF>")
1839
if f.FileExists(exe) then
1840
num_failed = num_failed + 1
1843
fout.WriteLine("</MPITEST>")
1850
fout.WriteLine("</MPITESTRESULTS>")
1854
' move back to the root directory
1855
cEcho "changing into directory " & rootdir
1856
WshShell.CurrentDirectory = rootdir
1859
'Function BuildMPICHTestSuite(srcdir, builddir)
1860
' cEcho "changing into directory " & srcdir
1861
' WshShell.CurrentDirectory = srcdir
1862
' RunEchoCommand "cscript createprojects.wsf"
1863
' RunEchoCommand "devenv.com test.sln /build Debug"
1864
' ' move back to the root directory
1865
' cEcho "changing into directory " & rootdir
1866
' WshShell.CurrentDirectory = rootdir
1869
'Function RunMPICHTestSuite(outdir)
1870
' cEcho "changing into directory " & outdir
1871
' WshShell.CurrentDirectory = outdir
1872
' RunEchoCommand "cscript runtests.wsf /config:Debug"
1873
' ' move back to the root directory
1874
' cEcho "changing into directory " & rootdir
1875
' WshShell.CurrentDirectory = rootdir
1878
Function BuildMPICHTestSuite(srcdir, builddir)
1879
if Not f.FolderExists(builddir) then
1880
f.CreateFolder(builddir)
1883
set testlists = CreateObject("Scripting.Dictionary")
1884
FindFiles testlists, f.GetFolder(srcdir), "testlist"
1886
' move into the build directory
1887
cEcho "changing into directory " & builddir
1888
WshShell.CurrentDirectory = builddir
1890
set buildout = f.CreateTextFile("build.bat", True)
1891
set testlistout = f.CreateTextFile("testlist", True)
1893
If testlists.Count > 0 Then
1894
For i = 0 to testlists.Count - 1
1895
BuildMPICHTestList a(i), srcdir, buildout
1896
' copy the testlist in to the master testlist
1897
set fin = f.OpenTextFile(a(i))
1898
contents = fin.ReadAll()
1900
testlistout.Write(contents)
1905
RunEchoCommand("build.bat 2>&1 | tee build.out")
1907
' move back to the root directory
1908
cEcho "changing into directory " & rootdir
1909
WshShell.CurrentDirectory = rootdir
1912
Function RunMPICHTestSuite(outdir)
1913
cEcho "changing into directory " & outdir
1914
WshShell.CurrentDirectory = outdir
1916
num_tests = CountTests(outdir)
1917
set fcmds = f.CreateTextFile(outdir & "mpich_cmds.bat")
1918
set fout = f.CreateTextFile(outdir & "summary.xml")
1919
Set fin = f.OpenTextFile(outdir & "testlist")
1920
if not f.FileExists("er.xsl") then
1921
set erfile = f.CreateTextFile(outdir & "er.xsl")
1922
erfile.Write(erfilecontents)
1925
fout.WriteLine("<?xml version='1.0' ?>")
1926
fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
1927
fout.WriteLine("<MPITESTRESULTS>")
1928
fout.WriteLine("<DATE>" & Date)
1929
fout.WriteLine("</DATE>")
1930
fout.WriteLine("<MPISOURCE></MPISOURCE>")
1931
while not fin.AtEndOfStream
1932
line = fin.ReadLine()
1934
twostrings = split(line, " ", -1, 1)
1935
if not IsNull(twostrings) then
1937
for each s in twostrings
1941
if Left(twostrings(0), 1) <> "#" then
1942
if Len(twostrings(1)) > 0 then
1943
exe = outdir & twostrings(0) & ".exe"
1944
cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1945
cEcho "test " & cur_test & " of " & num_tests
1946
cur_test = cur_test + 1
1948
fout.WriteLine("<MPITEST>")
1949
fout.WriteLine("<NAME>" & twostrings(0) & "</NAME>")
1950
if f.FileExists(exe) then
1951
fcmds.WriteLine(cmd & " > " & twostrings(0) & "." & twostrings(1) & ".output")
1952
if bCommandsOnly then
1953
result = "not executing test"
1954
if WshShell.CurrentDirectory <> last_commands_dir then
1955
commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
1957
last_commands_dir = WshShell.CurrentDirectory
1958
commands_file.WriteLine(cmd & " 2>&1")
1960
result = RunCommand(cmd)
1963
result = "no executable, test skipped"
1964
num_skipped = num_skipped + 1
1967
if (Instr(result, "No Errors") And len(result) < 14) Then
1968
fout.WriteLine("<STATUS>pass</STATUS>")
1969
num_passed = num_passed + 1
1971
fout.WriteLine("<STATUS>fail</STATUS>")
1972
fout.WriteLine("<TESTDIFF>")
1973
result = cmd & vbCrLf & result
1974
result = Replace( result, "&", "&" )
1975
result = Replace( result, "<", "<" )
1976
result = Replace( result, ">", ">" )
1977
fout.WriteLine(result)
1978
fout.WriteLine("</TESTDIFF>")
1979
if f.FileExists(exe) then
1980
num_failed = num_failed + 1
1983
fout.WriteLine("</MPITEST>")
1990
fout.WriteLine("</MPITESTRESULTS>")
1993
' move back to the root directory
1994
cEcho "changing into directory " & rootdir
1995
WshShell.CurrentDirectory = rootdir
1998
Function RunMPICHTestSuiteBatch(outdir)
1999
cEcho "changing into directory " & outdir
2000
WshShell.CurrentDirectory = outdir
2002
num_tests = CountTests(outdir)
2004
if not bSummarize then
2005
' first pass generates the commands
2006
set fcmds = f.CreateTextFile(outdir & "mpich_cmds.bat")
2007
Set fin = f.OpenTextFile(outdir & "testlist")
2008
while not fin.AtEndOfStream
2009
line = fin.ReadLine()
2011
twostrings = split(line, " ", -1, 1)
2012
if not IsNull(twostrings) then
2014
for each s in twostrings
2018
if Left(twostrings(0), 1) <> "#" then
2019
if Len(twostrings(1)) > 0 then
2020
exe = outdir & twostrings(0) & ".exe"
2021
cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
2022
fcmds.WriteLine("REM test " & cur_test & " of " & num_tests)
2023
cur_test = cur_test + 1
2024
if f.FileExists(exe) then
2025
fcmds.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
2026
if bCommandsOnly then
2027
result = "not executing test"
2028
if WshShell.CurrentDirectory <> last_commands_dir then
2029
commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
2031
last_commands_dir = WshShell.CurrentDirectory
2032
commands_file.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
2035
fcmds.WriteLine("REM no executable, test skipped")
2046
if not bCommandsOnly then
2047
if not bBatchFilesOnly then
2048
RunEchoCommand(outdir & "mpich_cmds.bat")
2053
if not bBatchFilesOnly then
2054
' second pass parses the results
2055
set fout = f.CreateTextFile(outdir & "summary.xml")
2056
if not f.FileExists("er.xsl") then
2057
set erfile = f.CreateTextFile(outdir & "er.xsl")
2058
erfile.Write(erfilecontents)
2061
fout.WriteLine("<?xml version='1.0' ?>")
2062
fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
2063
fout.WriteLine("<MPITESTRESULTS>")
2064
fout.WriteLine("<DATE>" & Date)
2065
fout.WriteLine("</DATE>")
2066
fout.WriteLine("<MPISOURCE></MPISOURCE>")
2067
Set fin = f.OpenTextFile(outdir & "testlist")
2068
while not fin.AtEndOfStream
2069
line = fin.ReadLine()
2071
twostrings = split(line, " ", -1, 1)
2072
if not IsNull(twostrings) then
2074
for each s in twostrings
2078
if Left(twostrings(0), 1) <> "#" then
2079
if Len(twostrings(1)) > 0 then
2080
exe = outdir & twostrings(0) & ".exe"
2081
cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
2082
fout.WriteLine("<MPITEST>")
2083
fout.WriteLine("<NAME>" & twostrings(0) & "</NAME>")
2084
if f.FileExists(exe) then
2085
if bCommandsOnly then
2086
result = "not executing test"
2088
if f.FileExists(twostrings(0) & "." & twostrings(1) & ".output") then
2089
Set foutput = f.OpenTextFile(twostrings(0) & "." & twostrings(1) & ".output")
2090
if not foutput.AtEndOfStream then
2091
result = foutput.ReadAll()
2101
result = "no executable, test skipped"
2102
num_skipped = num_skipped + 1
2104
if (Instr(result, "No Errors") And len(result) < 14) Then
2105
fout.WriteLine("<STATUS>pass</STATUS>")
2106
num_passed = num_passed + 1
2108
fout.WriteLine("<STATUS>fail</STATUS>")
2109
fout.WriteLine("<TESTDIFF>")
2110
result = cmd & vbCrLf & result
2111
result = Replace( result, "&", "&" )
2112
result = Replace( result, "<", "<" )
2113
result = Replace( result, ">", ">" )
2114
fout.WriteLine(result)
2115
fout.WriteLine("</TESTDIFF>")
2116
if f.FileExists(exe) then
2117
num_failed = num_failed + 1
2120
fout.WriteLine("</MPITEST>")
2127
fout.WriteLine("</MPITESTRESULTS>")
2131
' move back to the root directory
2132
cEcho "changing into directory " & rootdir
2133
WshShell.CurrentDirectory = rootdir
2138
if Not f.FolderExists(testdirname) then
2139
f.CreateFolder(testdirname)
2141
cEcho "changing into directory " & WshShell.CurrentDirectory & "\" & testdirname
2142
WshShell.CurrentDirectory = testdirname
2143
rootdir = root_folder.Path
2144
if Right(rootdir, 1) = "\" then
2145
rootdir = rootdir & testdirname & "\"
2147
rootdir = rootdir & "\" & testdirname & "\"
2150
if Not f.FolderExists("summary") then
2151
f.CreateFolder("summary")
2154
' check out and build code
2155
if not bTestOnly then
2157
' set the INCLUDE and LIB environment variables to be used by the command line build tools
2158
old_include = env("INCLUDE")
2159
old_lib = env("LIB")
2160
if pathMPICHInstalled <> "" then
2161
' FIXME: mpitestconf.h needs to be copied to this include directory if the mpich test suite is to be run
2162
env("INCLUDE") = old_include & ";" & pathMPICHInstalled & "\include"
2163
env("LIB") = old_lib & ";" & pathMPICHInstalled & "\lib"
2165
if pathMPICH = "" then
2167
env("INCLUDE") = old_include & ";" & rootdir & "mpich\src\include" & ";" & rootdir & "mpich\src\include\win64"
2169
env("INCLUDE") = old_include & ";" & rootdir & "mpich\src\include" & ";" & rootdir & "mpich\src\include\win32"
2171
env("LIB") = old_lib & ";" & rootdir & "mpich\lib"
2174
env("INCLUDE") = old_include & ";" & pathMPICH & "\src\include" & ";" & pathMPICH & "\src\include\win64"
2176
env("INCLUDE") = old_include & ";" & pathMPICH & "\src\include" & ";" & pathMPICH & "\src\include\win32"
2178
env("LIB") = old_lib & ";" & pathMPICH & "\lib"
2182
if bCheckoutMPICH then
2183
' check out mpich locally
2185
WshShell.CurrentDirectory = "mpich"
2186
' check out mpich remotely, run autogen.sh and tar up the .h.in files
2187
set fout = f.CreateTextFile("sshcmds.txt")
2188
fout.WriteLine( "cd /sandbox/" & username )
2189
fout.WriteLine( "mkdir " & hostname & "dotintmp" )
2190
fout.WriteLine( "cd " & hostname & "dotintmp" )
2191
fout.WriteLine( "cvs -d " & cvs_root_dir & " export -r " & cvsTag & " mpichallWithMPE" )
2192
fout.WriteLine( "cd mpich" )
2193
fout.WriteLine( "autogen.sh" )
2194
fout.WriteLine( "tar cvf dotin.tar `find . -name ""*.h.in""`" )
2195
fout.WriteLine( "gzip dotin.tar" )
2196
fout.WriteLine( "exit" )
2198
' FIXME : are two 2>&1 allowed?
2199
cmd = ssh_cmd & " -l " & username & " " & cvs_host & " 2>&1 < sshcmds.txt"
2202
f.DeleteFile("sshcmds.txt")
2203
' copy the .h.in tarball
2204
RunEchoCommand scp_cmd & " " & username & "@" & cvs_host & ":/sandbox/" & username & "/" & hostname & "dotintmp/mpich/dotin.tar.gz ."
2205
' remove the remote temporary directory
2206
RunEchoCommand ssh_cmd & " -l " & username & " " & cvs_host & " rm -rf /sandbox/" & username & "/" & hostname & "dotintmp"
2207
' extract the .h.in files and delete the tarball
2208
RunEchoCommand "tar xvfz dotin.tar.gz"
2209
if f.FileExists("dotin.tar.gz") then
2210
f.DeleteFile("dotin.tar.gz")
2212
WshShell.CurrentDirectory = rootdir
2215
if bConfigureMPICH then
2216
if pathMPICH <> "" then
2217
WshShell.CurrentDirectory = pathMPICH
2219
WshShell.CurrentDirectory = "mpich"
2222
RunEchoCommand "cscript winconfigure.wsf --cleancode"
2224
RunEchoCommand "cscript winconfigure.wsf --remove-fortran --cleancode"
2226
WshShell.CurrentDirectory = rootdir
2228
if bConfigureMPICHTests then
2229
if pathMPICH <> "" then
2230
WshShell.CurrentDirectory = pathMPICH
2232
WshShell.CurrentDirectory = "mpich"
2234
RunEchoCommand "cscript winconfigure.wsf --testdir"
2235
WshShell.CurrentDirectory = rootdir
2240
' stop a running smpd
2242
On Error resume next
2243
smpd = WshShell.RegRead("HKLM\SOFTWARE\MPICH\SMPD\binary")
2244
if Len(smpd) > 0 then
2245
error = RunEchoCommandError(smpd & " -remove")
2247
' make the mpich libraries and dlls
2248
if pathMPICH <> "" then
2249
WshShell.CurrentDirectory = pathMPICH
2251
WshShell.CurrentDirectory = "mpich"
2253
'error = RunEchoCommandError("devenv.com mpich.sln /build ch3sockDebug")
2255
' WScript.Echo("Error building the sock channel")
2258
'error = RunEchoCommandError("devenv.com mpich.sln /project mpichs /build ch3sockDebug")
2260
' WScript.Echo("Error building the sock channel static library")
2263
error = RunEchoCommandError("devenv.com mpich.sln /build ch3sockRelease")
2265
WScript.Echo("Error building the sock channel release target")
2268
error = RunEchoCommandError("devenv.com mpich.sln /project mpichs /build ch3sockRelease")
2270
WScript.Echo("Error building the sock channel release target static library")
2273
'error = RunEchoCommandError("devenv.com mpich.sln /build Debug")
2275
' WScript.Echo("Error building the utilities and process manager")
2278
error = RunEchoCommandError("devenv.com mpich.sln /build Release")
2280
WScript.Echo("Error building the release target utilities and process manager")
2284
'error = RunEchoCommandError("devenv.com mpich.sln /build fortDebug")
2286
' WScript.Echo("Error building the fortran interface")
2289
error = RunEchoCommandError("devenv.com mpich.sln /build fortRelease")
2291
WScript.Echo("Error building the release target fortran interface")
2294
'error = RunEchoCommandError("devenv.com mpich.sln /build gfortDebug")
2296
' WScript.Echo("Error building the cdecl fortran interface")
2299
'error = RunEchoCommandError("devenv.com mpich.sln /build gfortRelease")
2301
' WScript.Echo("Error building the release target cdecl fortran interface")
2304
'error = RunEchoCommandError("devenv.com mpich.sln /build sfortDebug")
2306
' WScript.Echo("Error building the stdcall fortran interface")
2309
'error = RunEchoCommandError("devenv.com mpich.sln /build sfortRelease")
2311
' WScript.Echo("Error building the release target stdcall fortran interface")
2315
'WshShell.CurrentDirectory = "maint"
2316
'RunEchoCommand "makegcclibs.bat"
2317
'WshShell.CurrentDirectory = ".."
2318
'error = RunEchoCommandError("devenv.com examples\examples.sln /project cpi /build Release")
2319
if channel <> "" then
2320
error = RunEchoCommandError("devenv.com mpich.sln /build " & channel)
2322
WScript.Echo("Error building the " & channel & " channel")
2326
mpiexec = WshShell.CurrentDirectory & "\bin\mpiexec.exe"
2327
' install the newly built smpd
2328
error = RunEchoCommandError(WshShell.CurrentDirectory & "\bin\smpd.exe -install")
2329
WshShell.CurrentDirectory = rootdir
2333
if bCheckoutMPICH then
2336
BuildMPICHTestSuite "mpi1", "buildMPICH"
2340
if bCheckoutCPP then
2343
BuildCPPTestSuite "mpicxxtest", "buildCPP"
2347
if bCheckoutINTEL then
2350
BuildINTELTestSuite "IntelMPITEST", "buildINTEL"
2354
'BuildMPICHTestSuite "mpich\test\mpi", ""
2355
if pathMPICH = "" then
2356
BuildMPICHTestSuite rootdir & "mpich\test\mpi", "buildMPICH"
2358
BuildMPICHTestSuite pathMPICH & "\test\mpi", "buildMPICH"
2365
if not bBuildOnly then
2366
if not bBatchFilesOnly then
2367
if not f.FileExists(rootdir & "summary\er.xsl") then
2368
set erfile = f.CreateTextFile(rootdir & "summary\er.xsl")
2369
erfile.Write(erfilecontents)
2372
set webpage = f.CreateTextFile(rootdir & "summary\index.html", True)
2373
webpage.WriteLine("<HTML>")
2374
webpage.WriteLine("<BODY>")
2375
webpage.WriteLine("<H2>Test suite summary page</H2>")
2376
webpage.WriteLine("Date: " & Date() & "<BR>")
2377
webpage.WriteLine("<TABLE>")
2381
RunMPICHTestSuiteBatch(rootdir & "buildMPICH\")
2383
RunMPICHTestSuite(rootdir & "buildMPICH\")
2385
if not bBatchFilesOnly then
2386
f.CopyFile rootdir & "buildMPICH\summary.xml", rootdir & "summary\summary.mpich.xml", True
2387
set fin = f.OpenTextFile(rootdir & "summary\summary.mpich.xml")
2388
set fout = f.CreateTextFile(rootdir & "summary\summary.mpich.failed.xml", True)
2389
fout.Write(ParseFailed(fin.ReadAll()))
2392
mpich_failed = CountInstances(rootdir & "summary\summary.mpich.failed.xml", "<STATUS>fail</STATUS>")
2393
mpich_passed = CountInstances(rootdir & "summary\summary.mpich.xml", "<STATUS>pass</STATUS>")
2394
mpich_skipped = CountInstances(rootdir & "summary\summary.mpich.xml", "no executable, test skipped")
2395
webpage.WriteLine("<TR><TD>MPICH</TD><TD>failed</TD><TD><A HREF=""summary.mpich.failed.xml"">" & mpich_failed & "</A></TD><TD>passed</TD><TD>" & mpich_passed & "</TD><TD>skipped</TD><TD>" & mpich_skipped & "</TD><TD><A HREF=""summary.mpich.xml"">summary.xml</A></TD>")
2400
RunCPPTestSuiteBatch(rootdir & "buildCPP\")
2402
RunCPPTestSuite(rootdir & "buildCPP\")
2404
if not bBatchFilesOnly then
2405
f.CopyFile rootdir & "buildCPP\summary.xml", rootdir & "summary\summary.cpp.xml", True
2406
set fin = f.OpenTextFile(rootdir & "summary\summary.cpp.xml")
2407
set fout = f.CreateTextFile(rootdir & "summary\summary.cpp.failed.xml", True)
2408
fout.Write(ParseFailed(fin.ReadAll()))
2411
cpp_failed = CountInstances(rootdir & "summary\summary.cpp.failed.xml", "<STATUS>fail</STATUS>")
2412
cpp_passed = CountInstances(rootdir & "summary\summary.cpp.xml", "<STATUS>pass</STATUS>")
2413
cpp_skipped = CountInstances(rootdir & "summary\summary.cpp.xml", "no executable, test skipped")
2414
webpage.WriteLine("<TR><TD>C++</TD><TD>failed</TD><TD><A HREF=""summary.cpp.failed.xml"">" & cpp_failed & "</A></TD><TD>passed</TD><TD>" & cpp_passed & "</TD><TD>skipped</TD><TD>" & cpp_skipped & "</TD><TD><A HREF=""summary.cpp.xml"">summary.xml</A></TD>")
2419
RunINTELTestSuiteBatch(rootdir & "buildINTEL\")
2421
RunINTELTestSuite(rootdir & "buildINTEL\")
2423
if not bBatchFilesOnly then
2424
f.CopyFile rootdir & "buildINTEL\summary.xml", rootdir & "summary\summary.intel.xml", True
2425
set fin = f.OpenTextFile(rootdir & "summary\summary.intel.xml")
2426
set fout = f.CreateTextFile(rootdir & "summary\summary.intel.failed.xml", True)
2427
fout.Write(ParseFailed(fin.ReadAll()))
2430
intel_failed = CountInstances(rootdir & "summary\summary.intel.failed.xml", "<STATUS>fail</STATUS>")
2431
intel_passed = CountInstances(rootdir & "summary\summary.intel.xml", "<STATUS>pass</STATUS>")
2432
intel_skipped = CountInstances(rootdir & "summary\summary.intel.xml", "no executable, test skipped")
2433
webpage.WriteLine("<TR><TD>INTEL</TD><TD>failed</TD><TD><A HREF=""summary.intel.failed.xml"">" & intel_failed & "</A></TD><TD>passed</TD><TD>" & intel_passed & "</TD><TD>skipped</TD><TD>" & intel_skipped & "</TD><TD><A HREF=""summary.intel.xml"">summary.xml</A></TD>")
2438
'RunMPICHTestSuiteBatch(rootdir & "mpich\test\mpi")
2439
RunMPICHTestSuiteBatch(rootdir & "buildMPICH\")
2441
'RunMPICHTestSuite(rootdir & "mpich\test\mpi")
2442
RunMPICHTestSuite(rootdir & "buildMPICH\")
2444
if not bBatchFilesOnly then
2445
f.CopyFile rootdir & "buildMPICH\summary.xml", rootdir & "summary\summary.mpich.xml", True
2446
set fin = f.OpenTextFile(rootdir & "summary\summary.mpich.xml")
2447
set fout = f.CreateTextFile(rootdir & "summary\summary.mpich.failed.xml", True)
2448
fout.Write(ParseFailed(fin.ReadAll()))
2451
mpich_failed = CountInstances(rootdir & "summary\summary.mpich.failed.xml", "<STATUS>fail</STATUS>")
2452
mpich_passed = CountInstances(rootdir & "summary\summary.mpich.xml", "<STATUS>pass</STATUS>")
2453
mpich_skipped = CountInstances(rootdir & "summary\summary.mpich.xml", "no executable, test skipped")
2454
webpage.WriteLine("<TR><TD>MPICH</TD><TD>failed</TD><TD><A HREF=""summary.mpich.failed.xml"">" & mpich_failed & "</A></TD><TD>passed</TD><TD>" & mpich_passed & "</TD><TD>skipped</TD><TD>" & mpich_skipped & "</TD><TD><A HREF=""summary.mpich.xml"">summary.xml</A></TD>")
2457
if not bBatchFilesOnly then
2458
webpage.WriteLine("</TABLE>")
2459
webpage.WriteLine("</BODY>")
2460
webpage.WriteLine("</HTML>")
2464
' Send the results of the tests to the Nightly Build server.
2465
' Insert code here ...