mandelbrotset1 revision da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968
2N/A# The contents of this file are subject to the terms of the 2N/A# Common Development and Distribution License (the "License"). 2N/A# You may not use this file except in compliance with the License. 2N/A# See the License for the specific language governing permissions 2N/A# and limitations under the License. 2N/A# When distributing Covered Code, include this CDDL HEADER in each 2N/A# If applicable, add the following below this CDDL HEADER, with the 2N/A# fields enclosed by brackets "[]" replaced with your own identifying 2N/A# information: Portions Copyright [yyyy] [name of copyright owner] 2N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 2N/A# Use is subject to license terms. 2N/A# ident "%Z%%M% %I% %E% SMI" 2N/A# mandelbrotset1 - a simple mandelbrot set generation and 2N/A# parallel execution demo print -u 2 "${progname}: $@" print -n "${symbollist:${1}:1}" # the following calculation suffers from rounding errors printmsg "# lines_per_job=${lines_per_job}" if [ "${TMPDIR}" = "" ] ; then # try to generate a job identifer prefix which is unique across multiple hosts printmsg $"## running ${numjobs} children..." done >"${TMPDIR}/mandelbrot_${jobident}_child_$y.joboutput" printmsg $"## waiting for ${numjobs} children..." getopts -a "${progname}" "${USAGE}" OPT '-?' builtin uname # loop_parallel needs the ksh93 builtin version to generate unique job file names # make sure ${COLUMN} and ${LINES} are set symbollist=
' .:0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ%#' @(#)\$Id: mandelbrotset1 (Roland Mainz) 2007-06-05 \$ [+NAME?mandelbrotset1 - generate mandelbrot set fractals with ksh93] [+DESCRIPTION?\bmandelbrotset1\b mandelbrot set fractal generator which runs either in serial or parallel mode (using multiple worker jobs).] [w:width?Width of fractal.]:[width] [h:height?Height of fractal.]:[height] [s:symbols?Symbols to build the fractal from.]:[symbolstring] [m:mag?Magnification level.]:[magnificationlevel] [p:stepwidth?Width per step.]:[widthperstep] [S:serial?Run in serial mode.] [P:parallel?Run in parallel mode.] [M:mode?Execution mode.]:[mode] [C:numcpus?Number of processors used for parallel execution.]:[numcpus] [+SEE ALSO?\bjuliaset1\b(1), \bksh93\b(1)] while getopts -a "${progname}" "${USAGE}" OPT ; do # printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"