runtests

来自「shpf 1.9一个并行编译器」· 代码 · 共 63 行

TXT
63
字号
#!/bin/csh

# Run synthetic test cases

set sources = (test0.C  test1.C  test2.C  test3.C  test4.C  test5.C  \
               test6.C  test7.C  test8.C  test9.C  test10.C test14.C \
               test16.C test17.C test18.C                            \
               testGather.C      testGprintf.C     testMultiShift.C  \
               testSArray.C      testScatterComb.C testStep.C        \
               testRange.C)

set nprocs  = (4  4  4  4  4  4 \
               4  6  6  6  6  6 \
               6  6  6          \
               6     6     6    \
               6     6     6    \
               6)

set buildSamples = 0

if($buildSamples) then
  cat > diffs.sample <<.
.
else
  cat > diffs <<.
.
endif


foreach source ($sources)
  set executable=${source:r}
  echo ad++ -o $executable $source
  ad++ -o $executable $source
  if($buildSamples) then
    echo prun ${nprocs[1]} $executable \| tee ${executable}.out.sample
    prun ${nprocs[1]} $executable | tee ${executable}.out.sample
    shift nprocs
    cat >> diffs.sample <<.
diff ${executable}.out ${executable}.out.sample
.
  else
    echo prun ${nprocs[1]} $executable \| tee ${executable}.out
    prun ${nprocs[1]} $executable | tee ${executable}.out
    shift nprocs
    echo diff ${executable}.out ${executable}.out.sample \| tee -a diffs
    cat >> diffs <<.
diff ${executable}.out ${executable}.out.sample
.
    diff ${executable}.out ${executable}.out.sample | tee -a diffs
  endif
  echo rm -f $executable ${executable}.o
  rm -f $executable ${executable}.o
end

if($buildSamples) then
else
  diff diffs diffs.sample > /dev/null
  if($status) then
    echo Warning: see file \"diffs\" for differences to sample output
  endif
endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?