Giter Site home page Giter Site logo

dc-fukuoka / pfind Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 155 KB

pfind - a simple parallel find command which is parallelized by OpenMP.

License: GNU General Public License v3.0

Makefile 13.92% Groff 69.01% Shell 15.44% M4 0.26% C 1.37%
c command-line-tool openmp parallel-processing

pfind's Introduction

pfind: A simple parallel find command which is parallelized by OpenMP.
How to use:
$ pfind <search directory> <filename>

Cuerrent limitations:
  - Asterisk can be used for <filename>, but not for <search directory>.
  - Only file can be searched.

Performance compareson (on Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz):
--------------------------
== GNU find(serial) ==
[fukuoka@rokuchan85 ~]:25024>time find /work/workdir1/fukuoka/HPCRT/ -type f -name "HPCRT2985.tgz"
/work/workdir1/fukuoka/HPCRT/2985/tmp/HPCRT2985.tgz

real    0m17.884s
user    0m1.630s
sys     0m6.423s

== GNU find + xargs ==
[fukuoka@rokuchan85 ~]:25007>time gnupfind /work/workdir1/fukuoka/HPCRT/ "HPCRT2985.tgz"
/work/workdir1/fukuoka/HPCRT/2985/tmp/HPCRT2985.tgz

real    0m22.428s
user    0m3.505s
sys     0m15.301s

== pfind ==
[fukuoka@rokuchan85 ~]:25008>time pfind /work/workdir1/fukuoka/HPCRT/ "HPCRT2985.tgz"
/work/workdir1/fukuoka/HPCRT/2985/tmp/HPCRT2985.tgz

real    0m7.382s
user    0m2.421s
sys     0m6.941s

== just a reference, linked list version of pfind ==
[fukuoka@rokuchan85 fukuoka]:25129>time pfind.list /work/workdir1/fukuoka/HPCRT/ "HPCRT2985.tgz"
/work/workdir1/fukuoka/HPCRT/2985/tmp/HPCRT2985.tgz

real    0m11.745s
user    0m35.596s
sys     0m4.239s

-- gnupfind(): a simple find bash function by GNU find + xargs
[fukuoka@rokuchan85 ~]:25021>type gnupfind
gnupfind is a function
gnupfind ()
{
    dir=$1;
    filename=$2;
    ncores=$((`cut -d"-" -f2 /sys/devices/system/cpu//online`+1));
    found=`find $dir -maxdepth 1 -type f -name $filename`;
    if [ -n $found ] && [ "x$found" != "x" ]; then
        echo $found;
    else
        find $dir -maxdepth 1 -type d | xargs -P$ncores -IXXX find XXX -type f -name $filename | sort -u;
    fi
}
--------------------------

pfind's People

Contributors

dc-fukuoka avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.