POWER8 Compatibility: Preprocessor- "unsigned int" duplicate

Moderators: jbeuken, jzwanzig, gonze, mcote

Post Reply
jlost
Posts: 4
Joined: Tue Aug 30, 2016 10:01 pm

POWER8 Compatibility: Preprocessor- "unsigned int" duplicate

Post by jlost » Fri Sep 09, 2016 3:19 pm

After manually setting the build type and removing -march=native from the Makefiles, I am able to make some progress in the build. However, it chokes here next:

Code: Select all

[u0017592@sys-82824 abinit-8.0.8]$ make
make  all-recursive
make[1]: Entering directory `/home/u0017592/projects/abinit-8.0.8'
Making all in fallbacks
make[2]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
make libxc
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
The build of libxc has been disabled
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Checking build of libxc fallback
test -e stamps/libxc-install-stamp
make linalg
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
The build of linalg has been disabled
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Checking build of linalg fallback
test -e stamps/linalg-install-stamp
make netcdf
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
The build of netcdf has been disabled
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Checking build of netcdf fallback
test -e stamps/netcdf-install-stamp
make atompaw
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
The build of atompaw has been disabled
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Checking build of atompaw fallback
test -e stamps/atompaw-install-stamp
make wannier90
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
The build of wannier90 has been disabled
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Checking build of wannier90 fallback
test -e stamps/wannier90-install-stamp
make etsf_io
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
The build of etsf_io has been disabled
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Checking build of etsf_io fallback
test -e stamps/etsf_io-install-stamp
make bigdft
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
The build of bigdft has been disabled
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Checking build of bigdft fallback
test -e stamps/bigdft-install-stamp
make[2]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Making all in src
make[2]: Entering directory `/home/u0017592/projects/abinit-8.0.8/src'
Making all in incs
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/src/incs'
There is no buildable file here
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/src/incs'
Making all in mods
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/src/mods'
There is no buildable file here
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/src/mods'
Making all in 01_linalg_ext
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/src/01_linalg_ext'
gfortran -DHAVE_CONFIG_H -I. -I../..  -I../../src/incs -I../../src/incs -I/home/u0017592/projects/abinit-8.0.8/fallbacks/exports/include   -ffree-form -J/home/u0017592/projects/abinit-8.0.8/src/mods -O2 -mtune=native -g -ffree-line-length-none   -c -o m_linalg_interfaces.o m_linalg_interfaces.F90
rm -f lib01_linalg_ext.a
ar rc lib01_linalg_ext.a m_linalg_interfaces.o
ranlib lib01_linalg_ext.a
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/src/01_linalg_ext'
Making all in 01_macroavnew_ext
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/src/01_macroavnew_ext'
gfortran -DHAVE_CONFIG_H -I. -I../..  -I../../src/incs -I../../src/incs -I/home/u0017592/projects/abinit-8.0.8/fallbacks/exports/include   -ffree-form -J/home/u0017592/projects/abinit-8.0.8/src/mods -O2 -mtune=native -g -ffree-line-length-none   -c -o iorho.o iorho.F90
gfortran -DHAVE_CONFIG_H -I. -I../..  -I../../src/incs -I../../src/incs -I/home/u0017592/projects/abinit-8.0.8/fallbacks/exports/include   -ffree-form -J/home/u0017592/projects/abinit-8.0.8/src/mods -O2 -mtune=native -g -ffree-line-length-none   -c -o numeric.o numeric.F90
gfortran -DHAVE_CONFIG_H -I. -I../..  -I../../src/incs -I../../src/incs -I/home/u0017592/projects/abinit-8.0.8/fallbacks/exports/include   -ffree-form -J/home/u0017592/projects/abinit-8.0.8/src/mods -O2 -mtune=native -g -ffree-line-length-none   -c -o surpla.o surpla.F90
gfortran -DHAVE_CONFIG_H -I. -I../..  -I../../src/incs -I../../src/incs -I/home/u0017592/projects/abinit-8.0.8/fallbacks/exports/include   -ffree-form -J/home/u0017592/projects/abinit-8.0.8/src/mods -O2 -mtune=native -g -ffree-line-length-none   -c -o thetaft.o thetaft.F90
gfortran -DHAVE_CONFIG_H -I. -I../..  -I../../src/incs -I../../src/incs -I/home/u0017592/projects/abinit-8.0.8/fallbacks/exports/include   -ffree-form -J/home/u0017592/projects/abinit-8.0.8/src/mods -O2 -mtune=native -g -ffree-line-length-none   -c -o volcel.o volcel.F90
gfortran -DHAVE_CONFIG_H -I. -I../..  -I../../src/incs -I../../src/incs -I/home/u0017592/projects/abinit-8.0.8/fallbacks/exports/include   -ffree-form -J/home/u0017592/projects/abinit-8.0.8/src/mods -O2 -mtune=native -g -ffree-line-length-none   -c -o interfaces_01_macroavnew_ext.o interfaces_01_macroavnew_ext.F90
rm -f lib01_macroavnew_ext.a
ar rc lib01_macroavnew_ext.a iorho.o numeric.o surpla.o thetaft.o volcel.o interfaces_01_macroavnew_ext.o
ranlib lib01_macroavnew_ext.a
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/src/01_macroavnew_ext'
Making all in 02_clib
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/src/02_clib'
gcc -DHAVE_CONFIG_H -I. -I../..  -I../../src/incs -I../../src/incs -I/home/u0017592/projects/abinit-8.0.8/fallbacks/exports/include    -g -O2 -mtune=native   -MT align.o -MD -MP -MF .deps/align.Tpo -c -o align.o align.c
In file included from ../../src/incs/abi_clib.h:26:0,
                 from align.c:20:
../../config.h:739:16: error: duplicate ‘unsigned’
 #define size_t unsigned int
                ^
../../config.h:739:25: error: two or more data types in declaration specifiers
 #define size_t unsigned int
                         ^
make[3]: *** [align.o] Error 1
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/src/02_clib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/u0017592/projects/abinit-8.0.8'
make: *** [all] Error 2


I found a SO answer that seems to be related here: http://stackoverflow.com/questions/8827 ... e-unsigned

jlost
Posts: 4
Joined: Tue Aug 30, 2016 10:01 pm

Re: POWER8 Compatibility: Preprocessor- "unsigned int" dupli

Post by jlost » Fri Sep 09, 2016 4:17 pm

I dug a bit further and found the following file is specifically commented as nonportable:

src/02_clib/align.c

Code: Select all


#include "abi_clib.h"

/* Returns in algn the alignment of a pointer modulo nbytes NONPORTABLE */
void
FC_FUNC_(clib_alignment_of,clib_ALIGNMENT_OF)
  (void *p, int *nbytes, int *algn)
{
  if (*nbytes){
    *algn = (int)(((uintptr_t) p) % *nbytes);
     /*printf("address = %p; uintptr = %d\n", p, (uintptr_t) p);*/
  }
  else
    *algn = 0;
}


Feel free to move this thread over to "Platform specific questions" if that's more appropriate.
This would probably at least require an alternate POWER8-compatible version switched by a preprocessor directive to work.

Post Reply