ornladios / ADIOS

The old ADIOS 1.x code repository. Look for ADIOS2 for new repo
https://csmd.ornl.gov/adios
Other
54 stars 40 forks source link

fix configure.ac/autotools issue #207

Closed germasch closed 4 years ago

germasch commented 4 years ago

For whatever reason, it only causes trouble on some systems, but one is supposed to use AM_CONDITIONAL for conditionals used in Makefile.am

ax3l commented 4 years ago

cc @pnorbert can you please confirm this patch looks good to you (we consider including it in Spack to address a problem building on RHEL): https://github.com/spack/spack/pull/17465

@germasch can you state again which version of RHEL, please?

pnorbert commented 4 years ago

thanks, this patch works for me (on ubuntu)

germasch commented 4 years ago

@ax3l : Red Hat Enterprise Linux Server release 7.7 (Maipo)

ax3l commented 3 years ago

@germasch @pnorbert With this patch, I cannot build ADIOS without MPI anymore on various versions of Ubuntu:

==> [2020-09-01-13:12:36.614906] '/tmp/axel/spack-stage/spack-stage-adios-1.13.1-glev4536tuuk3qcinax4soiiezenqruv/spack-src/configure' '--prefix=/home/axel/src/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-8.4.0/adios-1.13.1-glev4536tuuk3qcinax4soiiezenqruv' 'CFLAGS=-fPIC' '--enable-shared' '--disable-fortran' '--without-mpi' '--without-infiniband' '--with-blosc=/home/axel/src/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-8.4.0/c-blosc-1.17.0-7tbezmte373ijlsoqgbppaie4htwib3c' '--with-zlib=/home/axel/src/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-8.4.0/zlib-1.2.11-xz7vmkd54yh54wvnhf7o4fjft6h6f2rv' '--without-bzip2' '--without-szip' '--with-zfp=/home/axel/src/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-8.4.0/zfp-0.5.5-ougzl55j7tuas37nbri4pqoszdubmtt4' '--with-sz=/home/axel/src/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-8.4.0/sz-1.4.12.3-upwgkums5tzpbliunxapxyqjaypnwiot' '--with-lz4=/home/axel/src/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-8.4.0/lz4-1.9.2-nixp3slu6rfm6yecvqcxszj4x4v4rxl6' '--without-phdf5' '--without-netcdf' '--without-flexpath' '--without-dataspaces'
...
*********************************
adios configured as follows:
*********************************

  - Build both the Write and Read libraries
  - Build only the C libraries (no Fortran)
  - Build only the sequential libraries (no MPI)

  - General Compile FLAGS
      - CC  = /home/axel/src/spack/lib/spack/env/gcc/gcc
      - CXX = /home/axel/src/spack/lib/spack/env/gcc/g++
      - FC  = /home/axel/src/spack/lib/spack/env/gcc/gfortran
      - CPPFLAGS = 
      - CFLAGS   = -fPIC
      - CXXFLAGS = -g -O2
      - FCFLAGS  = 
      - LDLAGS   = 
      - LIBS     = -lpthread -lm 
...

     497    /home/axel/src/spack/lib/spack/env/gcc/gcc -DHAVE_CONFIG_H -I. -I/tmp/axel/spack-stage/spack-stage-adios-1.13.1-glev4536tuuk3qcinax4soiiezenqruv/spack-src/src -I..  -I../src/public -I/tmp/axel/spack
            -stage/spack-stage-adios-1.13.1-glev4536tuuk3qcinax4soiiezenqruv/spack-src -I/tmp/axel/spack-stage/spack-stage-adios-1.13.1-glev4536tuuk3qcinax4soiiezenqruv/spack-src/src/core -I/tmp/axel/spack-stag
            e/spack-stage-adios-1.13.1-glev4536tuuk3qcinax4soiiezenqruv/spack-src/src/core/transforms -I/tmp/axel/spack-stage/spack-stage-adios-1.13.1-glev4536tuuk3qcinax4soiiezenqruv/spack-src/src/core/query -
            D_NOMPI -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE  -I/tmp/axel/spack-stage/spack-stage-adios-1.13.1-glev4536tuuk3qcinax4soiiezenqruv/spack-src/src/mxml/mxml-2.9 
            -DZFP -I/home/axel/src/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-8.4.0/zfp-0.5.5-ougzl55j7tuas37nbri4pqoszdubmtt4/inc -D_NOMPI -DZLIB -I/home/axel/src/spack/opt/spack/linux-ubuntu18.04-skylake/g
            cc-8.4.0/zlib-1.2.11-xz7vmkd54yh54wvnhf7o4fjft6h6f2rv/include -DLZ4 -I/home/axel/src/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-8.4.0/lz4-1.9.2-nixp3slu6rfm6yecvqcxszj4x4v4rxl6/include -DBLOSC -I
            /home/axel/src/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-8.4.0/c-blosc-1.17.0-7tbezmte373ijlsoqgbppaie4htwib3c/include -I/home/axel/src/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-8.4.0/sz-1.4
            .12.3-upwgkums5tzpbliunxapxyqjaypnwiot/include -DNO_RESEARCH_TRANSPORTS  -D_NOMPI -I/home/axel/src/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-8.4.0/lz4-1.9.2-nixp3slu6rfm6yecvqcxszj4x4v4rxl6/incl
            ude -I/home/axel/src/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-8.4.0/c-blosc-1.17.0-7tbezmte373ijlsoqgbppaie4htwib3c/include   -fPIC -c -o write/libadios_nompi_a-adios_posix.o `test -f 'write/ad
            ios_posix.c' || echo '/tmp/axel/spack-stage/spack-stage-adios-1.13.1-glev4536tuuk3qcinax4soiiezenqruv/spack-src/src/'`write/adios_posix.c
     498    /tmp/axel/spack-stage/spack-stage-adios-1.13.1-glev4536tuuk3qcinax4soiiezenqruv/spack-src/src/write/adios_posix.c: In function 'adios_posix_write_pg':
  >> 499    /tmp/axel/spack-stage/spack-stage-adios-1.13.1-glev4536tuuk3qcinax4soiiezenqruv/spack-src/src/write/adios_posix.c:739:32: error: 'struct adios_POSIX_data_struct' has no member named 'rank'
     500                         fd->name, p->rank, strerror(errno));
     501                                    ^~
  >> 502    /tmp/axel/spack-stage/spack-stage-adios-1.13.1-glev4536tuuk3qcinax4soiiezenqruv/spack-src/src/write/adios_posix.c:746:32: error: 'struct adios_POSIX_data_struct' has no member named 'rank'
     503                         fd->name, p->rank, to_write, wrote);
     504                                    ^~
     505    Makefile:3759: recipe for target 'write/libadios_nompi_a-adios_posix.o' failed

Refs.:

I think there is some general bug in using this test variable - shouldn't it read HAVE_MPI without the _TRUE? Anyway, I have no idea about autotools. http://ac-archive.sourceforge.net/ac-archive/acx_mpi.html

germasch commented 3 years ago

Well, my bad. When I looked at this, I googled ACX_MPI, but it turns out that the version from google is different from the one included in the adios repo. The one in this repo does already use AM_CONDITIONAL (which is why it'll set HAVE_MPI_{TRUE,FALSE}, so my fix doesn't really make sense, though it did fix things on the system in question at the time.

I don't have a system I can reproduce the original issue on anymore, so I can't say what the exact problem there was or how to fix it correctly. I think for adios, this PR should be reverted, as it does break the non-MPI build. For spack, keeping the patch conditional as @ax3l now made it should be fine, since it does it happens to fix the issue for at least and one other user.

ax3l commented 3 years ago

@germasch no problem, yet can you please open a new pull request to bring ADIOS' master branch back into a good state? Thank you! :)

ax3l commented 3 years ago

@balos1 can you still reproduce this issue? You commented on https://github.com/spack/spack/pull/17465#issuecomment-673748567 and we see a regression with it that breaks non-MPI builds.