1 2 Previous Next 18 Replies Latest reply on Jun 3, 2011 8:53 AM by compres

    Cannot compile rckmpi with gcc shared libraries

    wbrozas

      Hello,

            I would like to configure rckmpi with --enable-sharedlibs=gcc but it does not seem to like my fortran compiler. I tried leaving FC= '' and FC=ifort but it warns me that it will not be able to compile the shared libraries. I was wondering if anyone else was successful.

       

      configure: WARNING: The test program that was used and the output may be found in config.log
      configure: WARNING: The selected Fortran 90 compiler ifort does not work with the selected Fortran 77 compiler ifort.  Use the environment variables F90 and F77 respectively to select compatible Fortran compilers.  The check here tests to see if a main program compiled with the Fortran 90 compiler can link with a subroutine compiled with the Fortran 77 compiler.
      checking whether Fortran accepts ! for comments... yes
      checking for include directory flag for Fortran... -I
      checking for Fortran 77 flag for library directories...
      checking for which Fortran libraries are needed to link C with Fortran... none
      checking whether ifort allows -shared -fpic... no
      checking whether ifort allows -fpic... no
      configure: WARNING: Cannot build shared libraries for Fortran with this compiler

        • 1. Re: Cannot compile rckmpi with gcc shared libraries
          tedk

          Are you running RCK MPI under 1.3.0? I thought you posted earlier that you could not load 1.4.0 because you had no working eMAC ports.

          • 2. Re: Cannot compile rckmpi with gcc shared libraries
            wbrozas

            I've compiled RCKMPI on 1.3.0 (with the normal configuration) and ran some simple programs and it works. We are waiting on hardware before we update to 1.4.0. I recognized there are bugs that 1.4.0 fixes and keeps the scc from hanging but I would think i still should be able to compile rckmpi, unless there are changes to the libraries and compilers

            • 3. Re: Cannot compile rckmpi with gcc shared libraries
              tedk

              The only reason I asked is because we've always used 1.4.0 with RCK MPI. I can't remember if we ever ran it under 1.3.0. I think when we started running it, we had a 1.4.0 beta. Isaias would know for sure.

               

              Did you send us the information about where to send new hw?

              • 4. Re: Cannot compile rckmpi with gcc shared libraries
                wbrozas

                My advisor emailed our contact. We didn't update so we could still work on 1.3.0 until we get the hardware

                • 5. Re: Cannot compile rckmpi with gcc shared libraries
                  tedk

                  That's the right decision. Theoretically one can run 1.4.0 without enabling eMAC, but it doesn't make a lot of sense to do that. I didn't see the new hw request, but that's fine. If you had given it to me, I would just have forwarded it to where your advisor sent it anyway.

                   

                  About the RCK MPI ... We still have a couple of systems here with 1.3.0 so I could try RCK MPI on one to see what happens. But it's probably best to see what Isaias says first.

                  • 6. Re: Cannot compile rckmpi with gcc shared libraries
                    compres

                    Hello Ted and wbrozas,

                     

                    RCKMPI works in 1.3.x series of the SCC kit (and Michael Riepen always checks that it works in further releases, so it is expected to work in every release).

                     

                    To troubleshoot this particular issue, it helps to remember that the configure scripts are basically unmodified from MPICH2 (except the new channel scripts).

                     

                    The compiler tests are independent of the channel (the test that fails in this case), so my first guess is that the issue is in the cross compiler.

                     

                    Send me the command you issued to configure (e.g. "./configure --prefix=<x> --with-pm=<y>" etc.) and I will test it here with my own cross compiler (with fortran 77 and 90) to see if I can replicate the problem.

                     

                    - Isaías

                    • 7. Re: Cannot compile rckmpi with gcc shared libraries
                      wbrozas

                      This is what I was trying

                       

                      ./configure --prefix=/shared/user/install/rckmpi --with-pm=mpd --enable-shared --enable-sharedlibs=gcc

                       

                      but if I use the command below it works. runs and everything, but i need the shared libraries

                       

                      ./configure --prefix=/shared/user/install/rckmpi --with-pm=mpd

                      • 8. Re: Cannot compile rckmpi with gcc shared libraries
                        compres

                        Try setting F77, F90 and FC to your Fortran cross compiler before calling configure.

                         

                        - Isaías

                        • 9. Re: Cannot compile rckmpi with gcc shared libraries
                          wbrozas

                          The configure finishes but there are warnings saying cannot build shared library.

                          Look at the top post, I posted the warnings. I tried to make it anyway after and it failed

                          • 10. Re: Cannot compile rckmpi with gcc shared libraries
                            compres

                            Observations:

                             

                            - If I omit F90 (and set only F77 and FC), I get the exact same warning in your first post.

                            - With F90, F77 and FC defined, configure works without these warnings.

                            - When configured with --enable-shared, compilation is successful

                            - When configured with --enable-sharedlibs=gcc, compilation fails

                             

                            I will have to stop at this point, since it already late Friday around here.  In the mean time, you could try configuring with "--with-device=ch3:sock".  This will rule out any problems with the SCC channels, and would suggest an MPICH2 bug. 

                             

                            If it still fails when configured with the "sock" channel, there may be a problem with the cross compiler setup.

                             

                            - Isaías

                            • 11. Re: Cannot compile rckmpi with gcc shared libraries
                              wbrozas

                              I tried using --with-device=ch3:sock and it still does not compile

                              • 12. Re: Cannot compile rckmpi with gcc shared libraries
                                compres

                                I have replicated the issue. 

                                 

                                Seems to be an MPICH2 bug since it is also the case when configured with "ch3:sock".  I have also replicated it on the latest release (1.3.2p1) of MPICH2.  I suspect a problem in the configure scripts for the CH3 device, but will have to check in detail.

                                 

                                How important is it for you to build the shared libraries at the moment?

                                 

                                - Isaías

                                • 13. Re: Cannot compile rckmpi with gcc shared libraries
                                  wbrozas

                                  Its important, I need the shared libraries to compile a weather modeling system, thats used for simulations for autonomous underwater glider. Thanks for your time btw

                                  • 14. Re: Cannot compile rckmpi with gcc shared libraries
                                    compres

                                    Are you getting this error when building:

                                     

                                    scc_api.c:248:2: error: can't find a register in class 'BREG' while reloading 'asm'

                                    scc_api.c:248:2: error: 'asm' operand has impossible constraints

                                     

                                    ?

                                     

                                    If that is the issue, replacing the inline assembler optimizations with a regular memcpy is a work around (not desirable, but will work for the moment):

                                     

                                    in file: "src/mpid/ch3/channels/scc_common/src/scc_api.c"

                                     

                                    inline void *memcpy_get(void *dest, const void *src, size_t count) {

                                      return memcpy(dest, src, count);

                                    }

                                    inline void *memcpy_put(void *dest, const void *src, size_t count) {

                                      return memcpy(dest, src, count);

                                    }

                                    I suspect the real solution is related to the use of the -fPIC flags in the library, when building shared libs.

                                     

                                    - Isaías

                                    1 of 1 people found this helpful
                                    1 2 Previous Next