[petsc-users] makefile for building application with petsc

Swarnava Ghosh swarnava89 at gmail.com
Mon Feb 15 20:13:21 CST 2021


Hi Jacob,

Attached is the configure.log and the makefile. It worked on a computing
cluster earlier. The petsc and other necessary modules were built by system
administrator on the cluster. I am trying to build the same code on a
workstation.

Sincerely,
Swarnava

On Mon, Feb 15, 2021 at 8:57 PM Jacob Faibussowitsch <jacob.fai at gmail.com>
wrote:

> Hello,
>
> If possible, can you include a copy of your configure.log which you used
> to configure petsc? It will give useful information about your machine and
> compilers. What system did this work with successfully? Also please attach
> the makefile directly rather than including its contents as text, it is
> much easier to read.
>
> Best regards,
>
> Jacob Faibussowitsch
> (Jacob Fai - booss - oh - vitch)
> Cell: (312) 694-3391
>
> On Feb 15, 2021, at 20:47, Swarnava Ghosh <swarnava89 at gmail.com> wrote:
>
> Dear Petsc developers and users,
>
> 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?
>
> Contents of makefile:
> ==============================================
> all:sparc
>
> CPPFLAGS = -I ./inc -I ${MKLROOT}/include -L ${MKLROOT}/lib/
> -llapack-addons -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread
>
> 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
>
> SOURCEH = ./inc/sddft.h ./inc/isddft.h
>
> 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
>
> LIBBASE = ./lib/sparc
>
> CLEANFILES = ./lib/sparc
>
> include ${PETSC_DIR}/lib/petsc/conf/variables
> include ${PETSC_DIR}/lib/petsc/conf/rules
>
> sparc: ${OBJSC} chkopts
> ${CLINKER} -Wall -o ${LIBBASE} ${OBJSC} ${PETSC_LIB}
> ${RM} $(SOURCECPP:%.cc=%.o)
>
> ===========================================
> Error:
> /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
> /home/swarnava/Research/Codes/SPARC/src/main.cc(24): catastrophic error:
> cannot open source file "sddft.h"
>   #include "sddft.h"
>                     ^
> ====================================================
>
> 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.
>
> Thank you,
> Swarnava
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210215/14406996/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile
Type: application/octet-stream
Size: 986 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210215/14406996/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.log
Type: text/x-log
Size: 3693065 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210215/14406996/attachment-0001.bin>


More information about the petsc-users mailing list