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

📄 testhetero

📁 MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程环境.
💻
字号:
#! /bin/sh## This is a simple heterogeneous test which exploits the mpicc command and# mpirun.  This is an example of how heterogeneous programs may be built and# run### Parameters for all programs and systemsset -xdevice=ch_p4mpihome=../../..rshcmd=rshprograms="sendrecv sendrecv2 sendrecv3 sendrecv4 getelm"# Extra files needed for each program.sendrecvfiles="test.c"sendrecvargs="-nolongdouble"sendrecv2files="dtypes.c gcomm.c"sendrecv3files="dtypes.c gcomm.c"sendrecv4files="dtypes.c gcomm.c"getelmfiles=""### arch1 is local, arch2 is remotearch1=sun4arch2=freebsdname2=dogbert#debug_args=""fail_hard=1rebuild=0mpirun_args=""for arg in "$@" ; do    case "$arg" in 	-echo) set -x ;;	-noclean) noclean=1 ;;	-debug) debug_args="-p4dbg 99 -p4rdbg 99" ;;	-mpichdebug) debug_args="$debug_args -mpichdebug" ;;	-xxgdb) mpirun_args="-xxgdb" ;;        -soft) fail_hard=0 ;;	-force | -rebuild) rebuild=1 ;;	-alpha) arch2=alpha ; name2=ptera ;;	-help) 	echo "Test heterogeneous operation of MPICH with ch_p4 using"	echo "the versions of MPICH built in the current tree."	echo "Should be run on a sun4; it rsh's to other machines as"	echo "necessary."	exit 1	;;	*) echo "Unrecognized argument $arg"	exit 1	;;    esacdone#arches="$arch1 $arch2"#mypwd=`pwd`# Fixup for brain-dead automountersmypwd=`echo $mypwd | sed s%/tmp_mnt%%g`## Build local versionsif [ 1 = 1 ] ; then    for pgm in $programs ; do        eval extrafiles=$"${pgm}files"        $mpihome/lib/$arch1/$device/mpicc -o $pgm.$arch1 $pgm.c $extrafiles    donefi## Build remote versionsfor pgm in $programs ; do     eval extrafiles=$"${pgm}files"    $rshcmd -n $name2 "(cd $mypwd ; $mpihome/lib/$arch2/$device/mpicc \	-o $pgm.$arch2 $pgm.c $extrafiles)"done## Run the programsfor pgm in $programs ; do    echo "Running $pgm..."    eval extraargs=$"${pgm}args"    $mpihome/lib/$arch1/$device/mpirun $mpirun_args \		-arch $arch1 -np 1 -arch $arch2 -np 1 $pgm.%a $debug_args \		$extraargsdone## Remove the executablesif [ -z "$noclean" ] ; then     for arch in $arches ; do        for pgm in $programs ; do	    /bin/rm -f $pgm.$arch        done    donefi

⌨️ 快捷键说明

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