c ================================================== c = 並列 テスト行列生成ルーチン1 MakeTestMat = c ================================================== c ver. 1.00 1997 7/26 c c === 入出力仕様 c c [入力変数] c A(0:nx-1, 0:ny-1) : 対称密行列用エリア c nx, ny : 行列 A の局所的な次元数 c n : 行列 A の大域的な次元数 c LOC(0:n-1), OWNER(0:n-1) : 並列制御用ワークエリア c ncelx, ncely : 二次元ラベル付時の各次元 x, y c におけるプロセッサ台数の総数 c cid : 一次元ラベル付における自プロセッサ番号 c ncidx, ncidy : 二次元ラベル付における自プロセッサ番号 c c [出力変数] c A(0:nx-1, 0:ny-1) : 対称密行列 c c All Rights Reserved, Copyright (C) 1998, T.Katagiri c/*- c * Copyright (c) 1998 Information Promotion Agency of Japan and T.Katagiri c * All rights reserved. c * c * Redistribution and non-commercial use in source and binary forms, c * with or without modification, are permitted provided that the following c * conditions are met: c * c * 1. Redistributions of source code must retain the above copyright c * notice, this list of conditions and the following disclaimer. c * c * 2. Redistributions in binary form must reproduce the above copyright c * notice, this list of conditions and the following disclaimer in the c * documentation and/or other materials provided with the distribution. c * c * 3. All advertising materials mentioning features or use of this c * software must display the following acknowledgement: c * c * This product includes software developed by Information Promotion c * Agency of Japan and T.Katagiri c * c * 4. The name "Information Promotion Agency" or "T.Katagiri" should not be c * used to endorse or promote products derived from this software c * without specific prior written permission. c * c * 5. Any use of the source code or the binary in a commercial product, c * whether may it be the origial representation or in some modified form, c * is not permitted without specific prior written permission. c * c * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND c * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE c * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE c * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE c * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL c * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS c * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) c * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT c * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY c * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF c * SUCH DAMAGE. c */ subroutine MakeTestMat(A, nx, ny, n, LOC, OWNER, ncelx, ncely, + ncidx, ncidy) c === 引数宣言 real*8, dimension (0:nx-1, 0:ny-1) :: A integer nx, ny, n integer, dimension (0:n-1) :: LOC, OWNER integer ncelx, ncely integer ncidx, ncidy c == general val. integer i, j, k, kk c == parallel control function integer CYCLIC_OWNER, CYCLIC_LOC c === 並列制御用変数 do i=0, n-1 LOC(i) = CYCLIC_LOC(i,ncelx) OWNER(i) = CYCLIC_OWNER(i,ncely) enddo c ==== テストデータ代入 do i=0,n-1 k = OWNER(i) kk = LOC(i) do j=0,i l = OWNER(j) if ((k .eq. ncidx).and.(l .eq. ncidy)) then A(kk, LOC(j)) = n - i endif enddo do j=i,n-1 l = OWNER(j) if ((k .eq. ncidx).and.(l .eq. ncidy)) then A(kk, LOC(j)) = n - j endif enddo enddo return end c ================================================== c = 逐次テスト行列生成ルーチン1 MakeMatSeq1 = c ================================================== c ver. 1.00 1997 7/26 c subroutine MakeMatSeq(A, n) c === 引数宣言 real*8, dimension (1:n, 1:n) :: A integer n integer i, j do i=1, n do j=1, i A(j, i) = n - i + 1 enddo do j=i, n A(j, i) = n - j + 1 enddo enddo return end