[petsc-users] Preprocessor definition in makefile for IBM XL Fortran Compiler

Satish Balay balay at mcs.anl.gov
Tue Aug 12 22:46:06 CDT 2014


On Tue, 12 Aug 2014, Danyang Su wrote:

> Hi All,
> 
> Does any one know how to use the preprocessor definition flags for IBM XL
> Compiler on  IBM BG/Q system?
> 
> I can use FPPFLAGS (below) for Intel fortran compiler and Gfortran, but IBM
> XL Fortran compiler cannot recognise it. I also tried to use FPPFLAGS_IBMXL
> (below) but without success.
> 
> How can I set the FPPFLAGS for IBM XL Compiler? It seems a little painful
> to support it.
> 
> Thanks,
> 
> Danyang
> 
> #makefile
> include ${PETSC_DIR}/conf/variables
> include ${PETSC_DIR}/conf/rules
> SRC =./../../
> FPPFLAGS = -DLINUX -DRELEASE -DPETSC -DMPI
> FPPFLAGS_IBMXL = -WF,-DLINUX -WF,-DRELEASE -WF,-DPETSC -WF,-DMPI

I don't understand. Doesn't the following work? What compile commands does make invoke with it?

FPPFLAGS = -WF,-DLINUX -WF,-DRELEASE -WF,-DPETSC -WF,-DMPI

> DLIB =
> # Note: Order of the following code files is the same with that in visual
> fortran project buildlog
> SOURCES = $(SRC)common.o\
> $(SRC)input.o\
> $(SRC)model.o\
> ......
> example: $(SOURCES) chkopts
>         -${FLINKER} $(FPPFLAGS_IBMXL) -o example $(SOURCES) ${PETSC_LIB}

FPPFLAGS_IBMXL shouldn't be used at link time [they are compile/preprocessing flags]

Satish

> ${DLIB}
> 



More information about the petsc-users mailing list