Closed huebleruwm closed 5 months ago
@jedwards4b Gunther asked a question saying:
Out of curiosity, do you know if there's a way to make this list of files more general? E.g applying these flags to all the files in /src/physics/clubb/src/CLUBB_core without having to list them individually. It would be nice to not have to edit this file in the future if another CLUBB file is added that we would want GPU support for.
I think I asked you a similar question long time ago and the answer was no
at that moment. Is it possible to apply GPU flags to a whole folder now in the latest CIME? Thanks.
I think that you could do something in the cam buildlib script to do that. The Makefile targets are keyed from file extension in general
.F90.o:
$(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $(CONTIGUOUS_FLAG) $<
You could try modifying the filename extension - maybe instead of .F90 they are .G90, this would allow you to do
.G90.o:
$(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $(GPUFLAGS) $<
there are a number of ways to do what you want to do. You'll have to explore a bit to come up with the best solution.
Thanks @jedwards4b for your suggestions. That is good to know.
These changes were tested on Derecho with