You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the cudacpp plugin drives builds from the Subprocess/P1 directory (by the way, what will happen with pp, with several subprocesses?). A 'make' in Subprocess/P1 triggers a 'make' in src too. The 'override' command is used extensively in both Makefiles (needed? I added this to be insensitive to extetnal env variables I think). Some default values if variables are not set (eg for AVX) are set in Subprocess Makefile, then 'export' is used to propagate them to src too.
This normally works fine, but I realised that for instance 'make AVX=' fails, because AVX is then set with override in Subprocess, 'export AVX' is called too, but then actually src builds still using 'AVX=' from the command line. This is because of MAKEOVERRIDES, see https://www.gnu.org/software/make/manual/html_node/Options_002fRecursion.html. In practice:
[avalassi@itscrd70 gcc10.2/cvmfs] /data/avalassi/GPU2020/madgraph4gpuTer/epochX/cudacpp/gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx> make AVX=
OMPFLAGS=
AVX=512y
FPTYPE=d
HELINL=0
HRDCOD=0
RNDGEN=hasCurand
Building in BUILDDIR=. for tag=512y_d_inl0_hrd0_hasCurand (USEBUILDDIR is not set)
make -C ../../src
AVX=
make[1]: Entering directory `/data/avalassi/GPU2020/madgraph4gpuTer/epochX/cudacpp/gg_tt/src'
Makefile:93: *** Unknown AVX='': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported. Stop.
make[1]: Leaving directory `/data/avalassi/GPU2020/madgraph4gpuTer/epochX/cudacpp/gg_tt/src'
make: *** [../../lib/libmg5amc_common.so] Error 2
One workaround is to reset MAKEOVERRIDES. I have done this in a WIP PR, but it may have bad side effects 5a223bf
Another option might be to use 'make -e' but this is even worse as IIUC it would take precedence over all overrides.
I guess that for the moment I will just stay as it was (without resetting MAKEOVERRIDES). It is not a problem if 'make AVX=' fails, this is not meant to be used anyway.
Note: I am investigating all these issues as part of #400, because there I am calling the cudacpp Subprocess/P1 Makefile from the madevent makefile in the same directory.
The text was updated successfully, but these errors were encountered:
Note: in MR #723 I reintroduced CUDA builds in src because Parameters.cc must be built twoce, for c++ and cuda. I implemented this using export NVCC and it seems a good idea.
(I actually forgot also export CUFLAGS which I later added to fix #731).
I think that using export may be a good idea to simplify the src makefile, for instance one could remove the duplication of the handling of AVX flags.
Low priority reminder.
Currently the cudacpp plugin drives builds from the Subprocess/P1 directory (by the way, what will happen with pp, with several subprocesses?). A 'make' in Subprocess/P1 triggers a 'make' in src too. The 'override' command is used extensively in both Makefiles (needed? I added this to be insensitive to extetnal env variables I think). Some default values if variables are not set (eg for AVX) are set in Subprocess Makefile, then 'export' is used to propagate them to src too.
This normally works fine, but I realised that for instance 'make AVX=' fails, because AVX is then set with override in Subprocess, 'export AVX' is called too, but then actually src builds still using 'AVX=' from the command line. This is because of MAKEOVERRIDES, see https://www.gnu.org/software/make/manual/html_node/Options_002fRecursion.html. In practice:
One workaround is to reset MAKEOVERRIDES. I have done this in a WIP PR, but it may have bad side effects
5a223bf
Another option might be to use 'make -e' but this is even worse as IIUC it would take precedence over all overrides.
I guess that for the moment I will just stay as it was (without resetting MAKEOVERRIDES). It is not a problem if 'make AVX=' fails, this is not meant to be used anyway.
Note: I am investigating all these issues as part of #400, because there I am calling the cudacpp Subprocess/P1 Makefile from the madevent makefile in the same directory.
The text was updated successfully, but these errors were encountered: