help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Parallel make repeating jobs


From: Damian Menscher
Subject: Parallel make repeating jobs
Date: Thu, 1 May 2003 00:31:38 -0500 (CDT)

address@hidden:~/Computer/Makefile-test> cat Makefile
all: A B C
        echo done

A B C:
        touch A
        touch B
        touch C

address@hidden:~/Computer/Makefile-test> make
touch A
touch B
touch C
echo done
done
address@hidden:~/Computer/Makefile-test> rm A B C
address@hidden:~/Computer/Makefile-test> make -j 2
touch A
touch A
touch B
touch B
touch C
touch C
touch A
touch B
touch C
echo done
done
address@hidden:~/Computer/Makefile-test> rm A B C
address@hidden:~/Computer/Makefile-test> make -j
touch A
touch A
touch A
touch B
touch B
touch B
touch C
touch C
touch C
echo done
done

Personally, I'd call it a bug to have different output depending on how
many processors it's running on.

My actual makefile looks something more like:

all: A B C D E F

A B C: X Y Z
        program that generates A B C from X Y Z

D E F: X Y Z
        program that generates D E F from X Y Z

X Y Z:
        program that generates X Y Z

Since A B C are all generated from the same program, it's silly (and
possibly harmful) to have that program be run multiple times.  For now,
I'm forced to run single-threaded.  Can anyone give advice on how I can
get around this problem?

Damian Menscher
-- 
-=#| Physics Grad Student & SysAdmin @ U Illinois Urbana-Champaign |#=-
-=#| 488 LLP, 1110 W. Green St, Urbana, IL 61801 Ofc:(217)333-0038 |#=-
-=#| 4602 Beckman, VMIL/MS, Imaging Technology Group:(217)244-3074 |#=-
-=#| <address@hidden> www.uiuc.edu/~menscher/ Fax:(217)333-9819 |#=-




reply via email to

[Prev in Thread] Current Thread [Next in Thread]