Discussion:
[petsc-users] Preprocessor definition in makefile for IBM XL Fortran Compiler
Danyang Su
2014-08-13 03:38:55 UTC
Permalink
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
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}
${DLIB}
Satish Balay
2014-08-13 03:46:06 UTC
Permalink
Post by Danyang Su
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
Post by Danyang Su
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
Post by Danyang Su
${DLIB}
Danyang Su
2014-08-13 04:00:50 UTC
Permalink
Post by Danyang Su
Post by Danyang Su
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
Post by Danyang Su
XL Fortran compiler cannot recognise it. I also tried to use
FPPFLAGS_IBMXL
Post by Danyang Su
(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?
Yes, the following doesn't work. I just use "make example &> log.txt" to
Satish Balay
2014-08-13 04:11:09 UTC
Permalink
Post by Danyang Su
Post by Satish Balay
I don't understand. Doesn't the following work? What compile commands does
make invoke with it?
Yes, the following doesn't work. I just use "make example &> log.txt" to
compile it.
Danyang Su
2014-08-13 04:25:29 UTC
Permalink
Hi Satish,

The log file is attached.

There are errors like below:

"../../min3p/welcome_pc.F90", line 151.16: 1516-036 (S) Entity iargc has
undefined type.
"../../min3p/welcome_pc.F90", 1520-031 (W) Option DLINES is ignored within
Fortran 90 free form and IBM free form.
** welcome === End of Compilation 1 ===

I use preprocessor definition so as to exclude these non-standard fortran
calling like iargc.

Thanks,

Danyang
Post by Danyang Su
Post by Satish Balay
I don't understand. Doesn't the following work? What compile commands
does
Post by Danyang Su
Post by Satish Balay
make invoke with it?
Yes, the following doesn't work. I just use "make example &> log.txt" to
Satish Balay
2014-08-13 04:41:59 UTC
Permalink
You appear to use:
PETSC_DIR=/gpfs/vesta-fs0/projects/FASTMath/ATPESC-2014/install/petsc/3.5.1.1/linux-rhel_6-ppc64-gcc-4.4.6/

This is built with gnu compilers - and can't be used from xl compilers.
[i.e use it with +mpiwrapper-gcc]

Satish
Post by Danyang Su
Hi Satish,
The log file is attached.
"../../min3p/welcome_pc.F90", line 151.16: 1516-036 (S) Entity iargc has
undefined type.
"../../min3p/welcome_pc.F90", 1520-031 (W) Option DLINES is ignored within
Fortran 90 free form and IBM free form.
** welcome === End of Compilation 1 ===
I use preprocessor definition so as to exclude these non-standard fortran
calling like iargc.
Thanks,
Danyang
Post by Danyang Su
Post by Satish Balay
I don't understand. Doesn't the following work? What compile commands
does
Post by Danyang Su
Post by Satish Balay
make invoke with it?
Yes, the following doesn't work. I just use "make example &> log.txt" to
compile it.
Danyang Su
2014-08-13 05:10:34 UTC
Permalink
Post by Satish Balay
PETSC_DIR=/gpfs/vesta-fs0/projects/FASTMath/ATPESC-2014/install/petsc/
3.5.1.1/linux-rhel_6-ppc64-gcc-4.4.6/
This is built with gnu compilers - and can't be used from xl compilers.
[i.e use it with +mpiwrapper-gcc]
Yes, with +mpiwrapper-gcc, the codes can be compiled successfully.
Thanks.
Post by Satish Balay
Satish
Post by Danyang Su
Hi Satish,
The log file is attached.
"../../min3p/welcome_pc.F90", line 151.16: 1516-036 (S) Entity iargc has
undefined type.
"../../min3p/welcome_pc.F90", 1520-031 (W) Option DLINES is ignored
within
Post by Danyang Su
Fortran 90 free form and IBM free form.
** welcome === End of Compilation 1 ===
I use preprocessor definition so as to exclude these non-standard fortran
calling like iargc.
Thanks,
Danyang
Post by Danyang Su
Post by Satish Balay
I don't understand. Doesn't the following work? What compile
commands
Post by Danyang Su
does
Post by Danyang Su
Post by Satish Balay
make invoke with it?
Yes, the following doesn't work. I just use "make example &>
log.txt" to
Loading...