⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 demo.proto

📁 spice中支持多层次元件模型仿真的可单独运行的插件源码
💻 PROTO
字号:
#!/bin/cshset path = (../ipcv4.0 $path)echo  "                 Example Message Passing Programs"echo  "                 --------------------------------"echo  ""IF IPSCif (! -e template.p)  make template.p# Get cube size etc.echo -n 'Input options for parallel (default = -w -t 4 -C tcgmsg) 'set cube="$<"if ("$cube" == "") set cube = '-w -t 4 -C tcgmsg'echo " "ELSEIF DELTA# Get mesh size for the Deltaecho -n 'Input desired submesh with no spaces (default = 4,4) 'set mesh="$<"if ("$mesh" == "") set mesh = "4,4"echo " "ELSE# Find/generate template PROCGRP fileif (! -e template.p) then  echo "$0 : template.p not found. A default using this host only will be made."  echo "$0 : ... add extra hosts and processes as desired. "  make template.pendifENDIF# Check no. of argumentsif ($#argv != 1) then  echo "$0 : a single argument is required"  echo "usage: $0 scf|md|mc|jacobi|grid"  exit 1endif# Jump to desired exampleset ARGS = " "switch ("$1")  case "scf":    goto SCF    breaksw  case "grid"    goto GRID    breaksw  case "md":  case "mc":  case "jacobi":    set PROGRAM = "$1"    goto RUNIT    breaksw  default:    echo "usage: $0 scf|md|mc|jacobi|grid"    exit 1endsw# For GRID find out how big a gridGRID:echo -n 'Input arguments for grid program 'set ARGS="$<"set PROGRAM = gridgoto RUNIT# For SCF find out how many basis functionsSCF:getnbfn:echo -n 'Input no. of basis functions to use (15, 30, 60) 'set nbfn="$<"if ( ("$nbfn" != 15) && ("$nbfn" != 30) && ("$nbfn" != 60) ) goto getnbfnecho  ""if ($nbfn == 60) then  echo 'Sixty basis functions can take a long time ... be patient'  echo  ""endifset PROGRAM = scf$nbfngoto RUNITRUNIT:IF DELTAecho " "echo "Run $PROGRAM on the mesh ($mesh)"echo " "# Actually run the sucker ... assumes can use rcp and rsh to delta1echo rcp $PROGRAM delta1:rcp $PROGRAM delta1:echo rsh delta1 mexec "-t\(${mesh}\)  -f '$PROGRAM $ARGS'"rsh delta1 mexec "-t\(${mesh}\)  -f '$PROGRAM $ARGS'"ELSE# Generate the actual PROCGRP file from the template and print out# summary of itsed "s/PROGRAM/$PROGRAM/" < template.p > {$PROGRAM}.pIF IPSCecho "time parallel $cube $PROGRAM"time parallel $cube $PROGRAMELSEecho ""echo 'The following hosts/processes will be used:'echo ' 'awk 'NF==5 {printf("%25s ... %d processes\n",$2,$3)}' < {$PROGRAM}.pecho ""echo time parallel $PROGRAM $ARGSecho ""time parallel $PROGRAM $ARGSENDIFENDIF

⌨️ 快捷键说明

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