Advanced search
Log In
New Account
  
 
Home My Page Project Tree Code Snippets Project Openings GRASS
 
 
Summary Tracker Surveys
 

code I: Browse | Download .csv

[#359] GRASS fails to build with make -j3

Please login

State:
Closed
Date:
2007-04-05 12:01
Priority:
2
Submitted By:
Maciej Sieczka (msieczka)
Assigned To:
Markus Neteler (markusn)
Summary:
GRASS fails to build with make -j3

Detailed description
On multi cpu machines it is possible to speed up compilation time greatly using the -j switch with make (eg. -j3 for
2 cpus).

make -j3 works fine on my dual core Intel with all the software I'm building from source (including eg. PROJ, GEOS,
HDF4, POSTGIS, GDAL, QT4).

But when I build GRASS with make -j3, plenty of errors  crop out after "Waiting for unfinished jobs...."
information. In a result, no single GRASS module is build properly. However, GRASS builds fine on the same machine if
-j3 is not used.

configure and make logs attached.

Maciek

Followup

Message
Date: 2008-02-09 09:29
Sender: Māris Nartišs

Seems to be fixed in SVN. Compiling with -j6 works just fine.
Date: 2007-10-16 16:20
Sender: Markus Neteler

After Glynn's hard work, I can now compile GRASS with

make -j3
make -j4

without problems (tested on RHEL5).

Markus
Date: 2007-07-07 19:38
Sender: Markus Neteler

Hi,

[compiling GRASS with 'make -j4']

I am willing to try the suggestions, but I would need help to
rewrite include/Make/Dir.make.

Markus
Date: 2007-06-30 14:34
Sender: Maciej Sieczka

Markus

It doesn't look any straightforward to me. Sorry.

Maciek
Date: 2007-06-30 12:41
Sender: Markus Neteler

Maciej,

could you give Glynn's suggestions a try? Looks pretty
straightforward to me...

thanks
Markus
Date: 2007-05-23 00:32
Sender: Maciej Sieczka

Priority 4->2 (not such a big deal after all - GRASS builds
at least with -j2; pitty though one can't use the full power
of his 2/4/8... core machine).
Date: 2007-04-05 17:19
Sender: Maciej Sieczka

Glynn Clements wrote on GRASS dev ML [1]:

The first thing I notice is that the first error is usually a
missing header file, e.g.:

copy.c:7:28: error: grass/datetime.h: No such file or directory

adj_cellhd.c:14:23: error: grass/gis.h: No such file or
directory

This is due to the "headers" target in the "libs"
directory being run in parallel with other jobs.


This specific issue can probably be solved by changing
lib/Makefile
from:

	default: headers subdirs
to:

	default: subdirs

	subdirs: headers

This should prevent the subdirs target from being run before
the headers target has completed.

However: I'm not sure whether parallel make will actually be
useful with the existing Makefiles, due to the use of a shell
"for" loop for building subdirectories:

	subdirs:
		@list='$(SUBDIRS)'; \
		for subdir in $$list; do \
		    echo $$subdir ; \
		    $(MAKE) -C $$subdir || echo $(CURDIR)/$$subdir >>
$(GRASS_HOME)/error.log; \
		done

[From include/Make/Dir.make]

To have the subdirectories built in parallel, you would need
to use something like:

	.PHONY: subdirs $(SUBDIRS)

	subdirs: $(SUBDIRS)

	$(SUBDIRS):
		$(MAKE) -C $@

[1]http://grass.itc.it/pipermail/grass-dev/2007-April/030156.html

Maciek

Attached Files:

Name Download
log.make.bz2 Download
log.configure.bz2 Download

Changes:

Field Old Value Date By
Issue statusconfirmed2008-02-09 09:29marisn
close_date2008-02-09 09:292008-02-09 09:29marisn
status_idOpen2008-02-09 09:29marisn
assigned_tonone2007-07-07 19:38markusn
priority42007-05-23 00:32msieczka
Issue statusNone2007-04-05 17:19msieczka
File Added196: log.make.bz22007-04-05 12:01msieczka
File Added195: log.configure.bz22007-04-05 12:01msieczka

This site is hosted by the Intevation GmbH