Sponsored Content
Full Discussion: Time-consuming simple script
Top Forums Shell Programming and Scripting Time-consuming simple script Post 302400217 by bigearsbilly on Tuesday 2nd of March 2010 04:11:03 PM
Old 03-02-2010
fisher yates shuffle?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How ti kill a process which is consuming so much time

There is a process which is consuming too much time.. how to find that process and kill it. (3 Replies)
Discussion started by: shreenivas
3 Replies

2. Tips and Tutorials

Simple date and time calulation in BASH

The GNU date command in full of goodies but not when it comes to calculate a date or time difference. Here is what I came up with after looking to more than one solution. Code should be self explaining. #!/bin/bash date2stamp () { date --utc --date "$1" +%s } stamp2date (){ ... (0 Replies)
Discussion started by: ripat
0 Replies

3. HP-UX

which thread is consuming much time ?

Hi How do i check which thread is consuming much time ? In my process it is tacking much %CPU so i want to check whick thread tacking much time? Any suggestion highly appriciated. I am using HP-UX B.11.31 U ia64 Regards, Ashok (5 Replies)
Discussion started by: ashokd001
5 Replies

4. Shell Programming and Scripting

Crontab - wrote Simple Script but i cant work out how to play it at a certain time.

Hi everyone. Silly might be silly be I'm still new to bash. I'm trying to make an Alarm Clock for in the morning using my laptop i have wrote this Simple Script but i cant work out how to play it at a certain time. #!/bin/bash cd /home/josh/Music/Bruno_Mars/Hooligans/ cvlc... (8 Replies)
Discussion started by: jtsmith90
8 Replies

5. Shell Programming and Scripting

Unix shell script to query linux top consuming processes

Hi All, O/S: Linux 86x64 Red Hat I have a sql script that queries top consuming processes of Linux using TOP commnd. Now I need to automate this task and pass the top processes i.e., PID to the sql script through unix shell script. Could anyone please let me know how to achieve this. ... (2 Replies)
Discussion started by: a1_win
2 Replies

6. Shell Programming and Scripting

Help making simple perl or bash script to create a simple matrix

Hello all! This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician. Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix: ... (16 Replies)
Discussion started by: torchij
16 Replies

7. Shell Programming and Scripting

Perl Script to find the disk usage and to delete the files which is consuming more space

Hi All, I have written a script to check the file system usage and to delete the files which is consuming more space.Please check whether the script is corrcet #Script Starts here #!/usr/local/bin/perl #Program to find the disk space and to delete the older files #Checks the type of OS... (8 Replies)
Discussion started by: arunkarthick
8 Replies

8. Shell Programming and Scripting

Simple date and time calulation in BASH

There is a closed Thread: <url>Here will be the url to the original post once I have 5 posts in this forum...</url> But a small bug had found his way into this very cool and simple code. #!/bin/bash date2stamp () { date --utc --date "$1" +%s } stamp2date (){ date --utc --date... (2 Replies)
Discussion started by: frood
2 Replies

9. Shell Programming and Scripting

How to do simple date (time) calculation in shell script?

Hi, I'm looking for a way to do a simple math calc during a shell script as a means of logging how long a particular task takes. For example... STARTTIME=whenever this script starts ./path/to/command.sh >>logfile.log TOTALTIME=<time at this stage of the script after above command... (7 Replies)
Discussion started by: nbsparks
7 Replies
MPI_Graph_neighbors(3OpenMPI)											     MPI_Graph_neighbors(3OpenMPI)

NAME
MPI_Graph_neighbors - Returns the neighbors of a node associated with a graph topology. SYNTAX
C Syntax #include <mpi.h> int MPI_Graph_neighbors(MPI_Comm comm, int rank, int maxneighbors, int *neighbors) Fortran Syntax INCLUDE 'mpif.h' MPI_GRAPH_NEIGHBORS(COMM, RANK, MAXNEIGHBORS, NEIGHBORS, IERROR) INTEGER COMM, RANK, MAXNEIGHBORS, NEIGHBORS(*), IERROR C++ Syntax #include <mpi.h> void Graphcomm::Get_neighbors(int rank, int maxneighbors, int neighbors[]) const INPUT PARAMETERS
comm Communicator with graph topology (handle). rank Rank of process in group of comm (integer). maxneighbors Size of array neighbors (integer). OUTPUT PARAMETERS
neighbors Ranks of processes that are neighbors to specified process (array of integers). IERROR Fortran only: Error status (integer). DESCRIPTION
Example: Suppose that comm is a communicator with a shuffle-exchange topology. The group has 2n members. Each process is labeled by a(1), ..., a(n) with a(i) E{0,1}, and has three neighbors: exchange (a(1), ..., a(n) = a(1), ..., a(n-1), a(n) (a = 1 - a), shuffle (a(1), ..., a(n)) = a(2), ..., a(n), a(1), and unshuffle (a(1), ..., a(n)) = a(n), a(1), ..., a(n-1). The graph adjacency list is illus- trated below for n=3. exchange shuffle unshuffle node neighbors(1) neighbors(2) neighbors(3) 0(000) 1 0 0 1(001) 0 2 4 2(010) 3 4 1 3(011) 2 6 5 4(100) 5 1 2 5(101) 4 3 6 6(110) 7 5 3 7(111) 6 7 7 Suppose that the communicator comm has this topology associated with it. The following code fragment cycles through the three types of neighbors and performs an appropriate permutation for each. C assume: each process has stored a real number A. C extract neighborhood information CALL MPI_COMM_RANK(comm, myrank, ierr) CALL MPI_GRAPH_NEIGHBORS(comm, myrank, 3, neighbors, ierr) C perform exchange permutation CALL MPI_SENDRECV_REPLACE(A, 1, MPI_REAL, neighbors(1), 0, + neighbors(1), 0, comm, status, ierr) C perform shuffle permutation CALL MPI_SENDRECV_REPLACE(A, 1, MPI_REAL, neighbors(2), 0, + neighbors(3), 0, comm, status, ierr) C perform unshuffle permutation CALL MPI_SENDRECV_REPLACE(A, 1, MPI_REAL, neighbors(3), 0, + neighbors(2), 0, comm, status, ierr) ERRORS
Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ func- tions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. SEE ALSO
MPI_Graph_neighbors_count Open MPI 1.2 September 2006 MPI_Graph_neighbors(3OpenMPI)
All times are GMT -4. The time now is 11:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy