<div dir="ltr"><div dir="ltr">On Mon, Feb 15, 2021 at 8:47 PM Swarnava Ghosh <<a href="mailto:swarnava89@gmail.com">swarnava89@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear Petsc developers and users,</div><div><br></div><div>I am having some issue with building my code with the following makefile. I was earlier able to build this with the same makefile on a different machine. Would you please help me out on this issue?</div><div><br></div><div>Contents of makefile:</div><div>==============================================<br></div><div>all:sparc<br><br>CPPFLAGS = -I ./inc -I ${MKLROOT}/include -L ${MKLROOT}/lib/ -llapack-addons -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread<br><br>SOURCECPP = ./src/main.cc ./src/initObjs.cc ./src/readfiles.cc ./src/energy.cc ./src/ExchangeCorrelation.cc ./src/occupation.cc ./src/poisson.cc ./src/chebyshev.cc ./src/scf.cc ./src/mixing.cc ./src/forces.cc ./src/relaxatoms.cc ./src/multipole.cc ./src/electrostatics.cc ./src/tools.cc<br><br>SOURCEH = ./inc/sddft.h ./inc/isddft.h<br><br>OBJSC = ./src/main.o ./src/initObjs.o ./src/readfiles.o ./src/energy.o ./src/ExchangeCorrelation.o ./src/occupation.o ./src/poisson.o ./src/chebyshev.o ./src/scf.o ./src/mixing.o ./src/forces.o ./src/relaxatoms.o ./src/multipole.o ./src/electrostatics.o ./src/tools.o<br><br>LIBBASE = ./lib/sparc<br><br>CLEANFILES = ./lib/sparc <br><br>include ${PETSC_DIR}/lib/petsc/conf/variables<br>include ${PETSC_DIR}/lib/petsc/conf/rules<br><br>sparc: ${OBJSC} chkopts<br> ${CLINKER} -Wall -o ${LIBBASE} ${OBJSC} ${PETSC_LIB}<br> ${RM} $(SOURCECPP:%.cc=%.o)</div><div><br></div><div>===========================================<br></div><div>Error:</div><div>/home/swarnava/petsc/linux-gnu-intel/bin/mpicxx -o src/main.o -c -g -I/home/swarnava/petsc/include -I/home/swarnava/petsc/linux-gnu-intel/include `pwd`/src/main.cc<br>/home/swarnava/Research/Codes/SPARC/src/main.cc(24): catastrophic error: cannot open source file "sddft.h"<br> #include "sddft.h"<br> ^<br></div><div>====================================================</div><div><br></div><div>It's not able to see the header file though I have -I ./inc in CPPFLAGS. The directory containing makefile has the directory "inc" with the headers and "src" with the .cc files.</div></div></blockquote><div><br></div><div>Some things have been reorganized with make. Can you try using CCPPFLAGS instead?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Thank you,</div><div>Swarnava<br></div><div><br></div><div><br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>