Skip to content

Add OPT as cflags_extra in ceed.pc#1794

Merged
jeremylt merged 1 commit intomainfrom
jeremy/pc-opt-flags
Mar 26, 2025
Merged

Add OPT as cflags_extra in ceed.pc#1794
jeremylt merged 1 commit intomainfrom
jeremy/pc-opt-flags

Conversation

@jeremylt
Copy link
Member

Fixes #1658

This mirrors where PETSc puts OPT flags in its .pc

prefix=/home/jeremy/Dev/petsc/arch-cuda-mpich
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${prefix}/lib
ccompiler=mpicc
cflags_extra=-fPIC -Wall -Wwrite-strings -Wno-unknown-pragmas -Wno-lto-type-mismatch -Wno-stringop-overflow -fstack-protector -fvisibility=hidden -O2 -march=native -ffp-contract=fast
cflags_dep=-MMD -MP
ldflag_rpath=-Wl,-rpath,
cxxcompiler=mpicxx
cxxflags_extra=-Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -Wno-lto-type-mismatch -Wno-psabi -fstack-protector -fvisibility=hidden -O2 -march=native -ffp-contract=fast  -std=c++14 -fPIC
fcompiler=mpif90
fflags_extra=-fPIC -Wall -ffree-line-length-none -ffree-line-length-0 -Wno-lto-type-mismatch -Wno-unused-dummy-argument -g -O0
cudacompiler=nvcc
cudaflags_extra=-std=c++20 -Xcompiler -fPIC -Xcompiler -fvisibility=hidden -O2 -arch=sm_89
cudalib=-Wl,-rpath,/opt/cuda/lib -L/opt/cuda/lib -L/opt/cuda/lib/stubs -lcudart -lnvToolsExt -lcufft -lcublas -lcusparse -lcusolver -lcurand -lcuda
cudainclude=-I/opt/cuda/include
cuda_cxx="/usr/bin"/g++-13
cuda_cxxflags=

Name: PETSc
Description: Library to solve ODEs and algebraic equations
Version: 3.22.99
Cflags:  -I${includedir} -I/home/jeremy/Dev/petsc/include
Libs: -L${libdir} -lpetsc
Libs.private: -L/home/jeremy/Dev/petsc/arch-cuda-mpich/lib -L/opt/cuda/lib -L/opt/cuda/lib/stubs -L/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1 -lHYPRE -ldmumps -lmumps_common -lpord -lpthread -lscalapack -llapack -lblas -lparmetis -lmetis -lexoIIv2for32 -lexodus -lcgns -lnetcdf -lpnetcdf -lhdf5_hl -lhdf5 -ltriangle -lm -lz -lctetgen -lcudart -lnvToolsExt -lcufft -lcublas -lcusparse -lcusolver -lcurand -lcuda -lX11 -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lstdc++prefix=/home/jeremy/Dev/petsc/arch-cuda-mpich
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${prefix}/lib
ccompiler=mpicc
cflags_extra=-fPIC -Wall -Wwrite-strings -Wno-unknown-pragmas -Wno-lto-type-mismatch -Wno-stringop-overflow -fstack-protector -fvisibility=hidden -O2 -march=native -ffp-contract=fast
cflags_dep=-MMD -MP
ldflag_rpath=-Wl,-rpath,
cxxcompiler=mpicxx
cxxflags_extra=-Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -Wno-lto-type-mismatch -Wno-psabi -fstack-protector -fvisibility=hidden -O2 -march=native -ffp-contract=fast  -std=c++14 -fPIC
fcompiler=mpif90
fflags_extra=-fPIC -Wall -ffree-line-length-none -ffree-line-length-0 -Wno-lto-type-mismatch -Wno-unused-dummy-argument -g -O0
cudacompiler=nvcc
cudaflags_extra=-std=c++20 -Xcompiler -fPIC -Xcompiler -fvisibility=hidden -O2 -arch=sm_89
cudalib=-Wl,-rpath,/opt/cuda/lib -L/opt/cuda/lib -L/opt/cuda/lib/stubs -lcudart -lnvToolsExt -lcufft -lcublas -lcusparse -lcusolver -lcurand -lcuda
cudainclude=-I/opt/cuda/include
cuda_cxx="/usr/bin"/g++-13
cuda_cxxflags=

Name: PETSc
Description: Library to solve ODEs and algebraic equations
Version: 3.22.99
Cflags:  -I${includedir} -I/home/jeremy/Dev/petsc/include
Libs: -L${libdir} -lpetsc
Libs.private: -L/home/jeremy/Dev/petsc/arch-cuda-mpich/lib -L/opt/cuda/lib -L/opt/cuda/lib/stubs -L/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1 -lHYPRE -ldmumps -lmumps_common -lpord -lpthread -lscalapack -llapack -lblas -lparmetis -lmetis -lexoIIv2for32 -lexodus -lcgns -lnetcdf -lpnetcdf -lhdf5_hl -lhdf5 -ltriangle -lm -lz -lctetgen -lcudart -lnvToolsExt -lcufft -lcublas -lcusparse -lcusolver -lcurand -lcuda -lX11 -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lstdc++

Copy link
Collaborator

@jrwrigh jrwrigh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jeremylt jeremylt merged commit e733e29 into main Mar 26, 2025
29 checks passed
@jeremylt jeremylt deleted the jeremy/pc-opt-flags branch March 26, 2025 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add compiler optimization flags to ceed.pc

2 participants