Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error of mpich-3.0.4 and mpich-3.1rc1 with Lustre 2.4.0 #1973

Closed
mpichbot opened this issue Oct 14, 2016 · 3 comments
Closed

Compilation error of mpich-3.0.4 and mpich-3.1rc1 with Lustre 2.4.0 #1973

mpichbot opened this issue Oct 14, 2016 · 3 comments
Assignees
Milestone

Comments

@mpichbot
Copy link

mpichbot commented Oct 14, 2016

Originally by huiweilu on 2013-11-11 16:31:02 -0600


Compiling mpich-3.0.4 or mpich-3.1rc1 on cluster running Lustre 2.4 results in a compilation error. This error is reported by Yan Li and Jerome Vienne seperately.

Error log 1:

I would like to report a similar issue with mpich-3.1rc1 on Stampede cluster which is using Lustre 2.4 on login nodes.

Configure used:
./configure --enable-romio --with-file-system=lustre

Result:
make[3]: Entering directory `/work/01538/viennej/MPI/mpich-3.1rc1/src/mpi/romio'
  CC       adio/ad_lustre/ad_lustre_rwcontig.lo
/usr/include/sys/quota.h(221): error: identifier "caddr_t" is undefined
             caddr_t __addr) __THROW;

Thanks,
Jerome

--
Jerome Vienne, Ph.D
HPC Software Tools Group
Texas Advanced Computing Center (TACC)
viennej@tacc.utexas.edu  | Phone: (512) 475-9322
Office: ROC 1.455B          | Fax:     (512) 475-9445

Error log 2:

I'm trying to compile mpich-3.0.4 on CentOS 6.4 x86-64 running Lustre 2.4.0, which was installed by using RPMs from http://zfsonlinux.org/lustre.html

Configure command used:
./configure --prefix=/share/ --with-file-system=ufs+lustre

There's a compilation error:

~~~~ [snip] ~~~~
CC       adio/ad_lustre/ad_lustre_open.lo
CC       adio/ad_lustre/ad_lustre_rwcontig.lo
In file included from /usr/include/linux/lustre_user.h:46,
               from /usr/include/lustre/lustre_user.h:54,
               from adio/ad_lustre/ad_lustre.h:30,
               from adio/ad_lustre/ad_lustre_rwcontig.c:14:
/usr/include/sys/quota.h:221: error: expected declaration specifiers or '...' before 'caddr_t'
~~~~ [snip] ~~~~

As you can see that the file ad_lustre_open.c compiles OK. The difference between it and ad_lustre_rwcontig.c is that the latter includes this line:
#define _XOPEN_SOURCE 600
before including the lustre header file.

It seems to me that defining _XOPEN_SOURCE to 600 on Linux implies that caddr_t is defined somewhere else, suppressing the definition of caddr_t in <sys/types.h>, thus leads to the compilation error of <sys/quota.h>.

Removing the definition of _XOPEN_SOURCE from ad_lustre_rwcontig.c seems fixed this problem, but I want to know why the definition was put there in the first place and whether removing it can cause any potential problem.

Thanks for your help in advance.

Yan Li
Graduate Student Researcher,
Storage Systems Research Center,
Computer Science, University of California, Santa Cruz

Thanks to Yan Li and Jerome Vienne for reporting this.

@mpichbot mpichbot self-assigned this Oct 14, 2016
@mpichbot mpichbot added this to the mpich-3.1 milestone Oct 14, 2016
@mpichbot
Copy link
Author

Originally by robl on 2013-11-14 15:26:38 -0600


those guys!

ok, probably the _XOPEN_SOURCE needs to go, but I don't know why it's there in the first place.

@mpichbot
Copy link
Author

Originally by Rob Latham robl@mcs.anl.gov on 2013-12-05 15:37:02 -0600


In a0c4278:
fix compile errors with lustre

  • the XOPEN_SOURCE definition seems to be uneeded. It was there from
    the early days, probably defensively, but it messes up the declaration
    of caddr_t needed by quota.h which in turn is recently needed by
    lustre.
  • the reworked hint functions for lustre did not compile. oops.

Closes #1973

@mpichbot
Copy link
Author

Originally by Ken Raffenetti raffenet@mcs.anl.gov on 2015-02-26 11:27:45 -0600


In 5a10283:
remove _XOPEN_SOURCE in code

lustre, or specifically the header files lustre brings in (quota.h) show
a problem with caddr_t not being defined if XOPEN_SOURCE is set. We
provided this define so we could make use of pread/pwrite, but instead
we will use our replacement pread/pwrite if one does not exist.

See #1973

Signed-off-by: Ken Raffenetti raffenet@mcs.anl.gov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant