pmodels / mpich

Official MPICH Repository
http://www.mpich.org
Other
545 stars 281 forks source link

build: unable to build with Cray C compiler #1909

Closed mpichbot closed 2 years ago

mpichbot commented 8 years ago

Originally by gropp on 2013-07-21 11:47:53 -0500


I'm testing the fix for #1815, and I'm unable to build MPICH with the Cray compilers (this is not related to the fix for #1815). The first problem was in the F9x module support, which I worked around. The next problem appears to be in the libtool support:

Making all in /u/staff/gropp/mpich-trunk/src/mpl
make[2]: Entering directory `/mnt/abc/u/staff/gropp/mpich-trunk/src/mpl'
  CC       src/mplstr.lo
  CC       src/mpltrmem.lo
  CC       src/mplenv.lo
  CCLD     libmpl.la
CC-2289 craycc: ERROR in command line
  Invalid characters after option '-s' in command line item '-soname'.
make[2]: *** [libmpl.la] Error 1
make[2]: Leaving directory `/mnt/abc/u/staff/gropp/mpich-trunk/src/mpl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/abc/u/staff/gropp/mpich-trunk'
make: *** [all] Error 2
gropp@jyc1:~/mpich-trunk>

The configure options are

./configure CC=cc FC=ftn F77=ftn CXX=CC FCFLAGS=-em \
    --prefix=/u/staff/gropp/installs/mpich-devel \
    --with-atomic-primitives=no

(The FCFLAGS is required to get the F9X modules to build).

This is blocking my review of the fix for #1815

mpichbot commented 8 years ago

Originally by apenya on 2013-07-21 23:17:01 -0500


It looks like the correct option should be -Wl,-soname (I mean, the -Wl flag is missing). Maybe we need again a libtool.m4 patch like in ticket #1870 if we confirm libtool is the culprit assigning bad flags to the linking stage.

mpichbot commented 8 years ago

Originally by gropp on 2013-07-23 11:22:41 -0500


Let me know if there is a test I should run.

mpichbot commented 8 years ago

Originally by apenya on 2013-07-29 14:46:18 -0500


I received a libtool patch from Steve Oyanagi from Cray. I think now I have the information I needed to patch libtool.m4 like in tt #1870 to generate a correct libtool supporting the Cray compiler.

mpichbot commented 8 years ago

Originally by gropp on 2013-07-31 13:04:28 -0500


Great! Let me know when I can test it.

mpichbot commented 8 years ago

Originally by apenya on 2013-08-13 16:25:06 -0500


Currently libtool doesn't know how to set the compilation flags for the cc compiler driver. This is something that Cray and libtool folks will eventually fix. For now, the Cray's recommended way to compile MPICH on Cray systems is specifying CC=gcc. As this way works fine, I'm closing the ticket.

mpichbot commented 8 years ago

Originally by balaji on 2013-08-13 17:31:21 -0500


"don't use the Cray compiler" is not really a fix.

mpichbot commented 8 years ago

Originally by apenya on 2013-08-14 20:03:07 -0500


As it might not be clear, I just want to emphasize that the error happens when building shared libraries, so if using MPICH before 3.1.x, the --enable-shared flag needs to be added to the configure command in order to reproduce this error.

mpichbot commented 8 years ago

Originally by balaji on 2013-08-14 20:12:27 -0500


I understand the issue. I agree that this problem always existed, it's not new. I also agree that this is a lower-priority item given that even the Cray folks don't have a good solution for this yet.

I'm just saying that this is still not fixed. I have moved this to "future", as it is not critical to fix for the upcoming releases, but I was just arguing that closing the ticket saying that it is fixed is not the right resolution. If you had closed it with the "wontfix" resolution type, that would have been a different story, though I don't think that's the right thing to do in this case either.

mpichbot commented 8 years ago

Originally by apenya on 2013-08-15 09:18:55 -0500


Sorry, my post was not in reply to your previous one. Just including more information for NCSA/Cray/libtool guys after a private e-mail.

mpichbot commented 8 years ago

Originally by apenya on 2013-08-15 09:54:04 -0500


Now that you mention it again, I closed the ticket because the problem was "Unable to build with Cray Fortran compiler", which is actually solved by CC=gcc. If we want to stay tuned for Cray + libtool to fix this, maybe we should create another ticket with a more descriptive subject pointing to this one.

mpichbot commented 8 years ago

Originally by balaji on 2013-08-15 10:02:40 -0500


The point of the ticketing system is to keep track of known/reported issues. If this ticket doesn't address that, feel free to modify the ticket or create another ticket. But I'm vehemently opposed to closing a known issue. The only exception is if we explicitly decide to not fix something. But that's not what your resolution said and that's not what we decided to do.

mpichbot commented 8 years ago

Originally by apenya on 2013-08-15 12:34:14 -0500


I agree. Changing the subject to reflect the issue more accurately.

mpichbot commented 8 years ago

Originally by apenya on 2015-04-20 15:54:17 -0500


Kalyana Chadalavada @ NCSA just forwarded me the following update from Cray:

Eric Bavier: Latest patch sent to the libtool developers:

http://lists.gnu.org/archive/html/libtool/2015-04/msg00003.html

mpichbot commented 8 years ago

Originally by @raffenet on 2015-04-21 09:51:03 -0500


I've kind of followed that thread on the libtool list. Seems their linker, like Bluegene, prefers static libraries to dynamic. We'll probably have to make our exceptions for Bluegene into a more general case.

clmendes commented 5 years ago

Is this issue resolved for ANL? Cray has closed their corresponding bug (CAST-1980), saying the issue had been resolved, but I'd like to doublecheck if the problem has really been fixed for MPICH and the Cray compiler.

raffenet commented 5 years ago

@clmendes it doesn't look like the Cray libtool patches were ever upstreamed, and we don't currently apply any patch locally for this issue. In my (extremely limited) testing, it appears to still be a problem.

clmendes commented 5 years ago

OK, I'll ping Cray about this, and ask them to either reopen their bug or create a new one.

markwdalton commented 5 years ago

The solution in CAST-1980 was to use the fix in: https://github.com/cray/libtool We can test this.

clmendes commented 5 years ago

Is the solution pointed by Cray (i.e. the fix provided in https://github.com/cray/libtool ) acceptable to ANL/mpich?

raffenet commented 5 years ago

If we can apply the libtool patch cleanly during autogen, then yes. We already do so for a handful of toolchains.

raffenet commented 2 years ago

Closing this as stale. We can consider again if someone is trying still attempting to build with the Cray compiler.