-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make -j all
(build using multiple jobs) may not work
#54
Comments
Upon further inspection,
The target files are being overwritten by the different rules, and one may end up with errors such as:
|
Just FYI, one functioning approach (at least that's what's being done when building ScaLAPACK in PETSc) is available in this commit: https://bitbucket.org/petsc/pkg-scalapack/commits/bf5290f5d002fe43a6fc59f83730ff5141860380. But I don't know if you'd be willing to merge that in @langou? |
Hi @prj-. I agree, there is a problem there. Thanks for taking your time to explain this! I am sorry but I am not sure I understood your suggestion for the use of https://bitbucket.org/petsc/pkg-scalapack/commits/bf5290f5d002fe43a6fc59f83730ff5141860380. Are you suggesting we call Using a single call of ALLOBJ = $(SLASRC) $(DLASRC) $(DSLASRC) $(CLASRC) $(ZLASRC) $(ZCLASRC) \
$(SCLAUX) $(DZLAUX) $(ALLAUX)
ifdef USEXBLAS
ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC)
endif
ifdef BUILD_DEPRECATED
DEPRECATED = $(DEPRECSRC)
endif
.PHONY: all
all: $(LAPACKLIB)
LAPACKLIB_DEPS := $(ALLOBJ)
ifdef USEXBLAS
LAPACKLIB_DEPS += $(ALLXOBJ)
endif
ifdef BUILD_DEPRECATED
LAPACKLIB_DEPS += $(DEPRECATED)
endif
$(LAPACKLIB): $(LAPACKLIB_DEPS)
$(AR) $(ARFLAGS) $@ $^
$(RANLIB) $@ With this kind of approach, I think we would still be able to build for a single precision type. |
I'm now realizing that the trick there is indeed to have a single rule for all precisions, which may not be acceptable to you.
|
Using a single Here's an example non-recursive Makefile structure. I'm sure there are many more subtleties in ScaLAPACK's Makefiles. There are ways to write it such that running The use of
|
Here's a take on implementing this in ScaLAPACK, so far just the BLACS library. If this seems like a good direction, can @weslleyspereira or someone do the other directories? Or I can, but may not have time immediately. I use this myself and have seen several people burned by |
Thanks for the complete answers, @mgates3 !! I also don't know if I have time to work on it now, but I will keep your solution in my radar. |
PR #53 fixed the dependencies of the ScaLAPACK libraries on BLACS. It should now be safe to use
make -j lib
, i.e., to use multiple jobs to build. However,make -j all
may still fail as related in PR #53.The text was updated successfully, but these errors were encountered: