[Trilinos-Users] Cannot build 64 bit on Intrepid.

John R Cary cary at colorado.edu
Fri Apr 30 08:02:47 MDT 2010


Brent,

Thanks, this worked.

I will copy back to the list so that folks know that
there is a workaround.  So one problem down it seems:
compilation on 64 bit BGP FENs.

A question (for anyone): How does CMake handle fixed-form versus
free-form Fortran?

While nearly all compilers figure this
out on the basis of the file suffix, the XL series
is not sufficiently bright.  Experimentation shows
that for Trilinos, I need to provide xlf (fixed-form),
not xlf90 (free form).

What will happen when trilinos starts including free-form
Fortran?  (The more commonly accepted nowadays.)

Is it a standard that CMake deals with only fixed-form
Fortran?

Thx.....John

On 4/29/10 4:14 PM, Perschbacher, Brent M wrote:
> Well I have one last thing that should fix it, but it is kind of a hack
> to work around cmake. If you would replace the line:
>
> IF(CMAKE_SIZEOF_VOID_P GREATER 4)
>
> With:
>
> IF(CMAKE_CXX_SIZEOF_DATA_PTR GREATER 4 AND CMAKE_C_SIZEOF_DATA_PTR
> GREATER 4)
>
> In the packages/epetra/src/CMakeLists.txt file and let me know if that
> fixes the issue. That should be just below where I had you put the print
> statement in. Basically I believe that the size of the fortran “void
> pointer” is being determined wrongly. However, from the data you
> previously sent me the C/C++ pointer size was being determined correctly
> so that should be safe to use. Tbh I’m not really sure why cmake is
> trying to find the size of a Fortran pointer anyway since Fortran
> doesn’t have pointers, but they are.
>
> Let me know how that turns out. We are planning a bug fix release for
> sometime early next week so if this works it is very likely to get put
> into that release.
>
> Thanks,
>
> Brent
>
> On 4/29/10 3:34 PM, "John Cary" <cary at colorado.edu> wrote:
>
>     On 4/29/10 3:21 PM, Perschbacher, Brent M wrote:
>
>         Re: [Trilinos-Users] Cannot build 64 bit on Intrepid. John,
>         I may have a fix, but I’m not 100% sure if this is the issue.
>         There is an option to xlf95_r that defines the architecture you
>         are on that might not be getting set properly by default. Can
>         you try adding “–qarch=ppc64” to your options for the fortran
>         compiler and see if that fixes things? You will probably want to
>         delete your CMakeCache.txt file first just to make sure you get
>         the new option. Let me know if that works, if not can you send
>         me the output from that print statement I had you put in eariler
>         with the new option.
>
>
>     Hi Brent,
>
>     No diff. Same failure. Same output from the print statement.
>
>     Thx...John
>
>
>         Thanks,
>
>         Brent
>
>
>         On 4/29/10 12:15 PM, "John R Cary" <cary at colorado.edu> wrote:
>
>
>             On 4/29/10 11:49 AM, Perschbacher, Brent M wrote:
>             >  Hmm, so that is interesting that Fortran has a different
>             pointer size
>             >  reported than C/C++. I guess the last thing I’ll have you
>             check is to
>             >  put in a print statement in the epetra CMakeLists.txt
>             >
>             >  If you add:
>             >
>             >  MESSAGE(“CMAKE_SIZEOF_VOID_P =${CMAKE_SIZEOF_VOID_P}”)
>             >
>             >  To line 10(just above the if check for the pointer size) of
>             >  packages/epetra/src/CMakeLists.txt we should be able to
>             see what epetra
>             >  actually thinks the size of a pointer is. On my machine
>             this returns the
>             >  right value even though the fortran pointer size isn’t
>             set, but not
>             >  being set could be very different than being set to
>             something that is
>             >  different than the C/C++ pointer size.
>             >
>             >  Once you’ve done that reconfigure and let me know what was
>             printed.
>
>             Here it is:
>
>             “CMAKE_SIZEOF_VOID_P=4”
>
>             Thx..John
>
>             >
>             >  Thanks,
>             >
>             >  Brent
>             >
>             >
>             >  On 4/29/10 10:46 AM, "John R Cary" <cary at colorado.edu> wrote:
>             >
>             >  On 4/29/10 8:22 AM, Perschbacher, Brent M wrote:
>             >  > Hmm apparently Kitware didn’t make that a cache variable
>             even
>             >  though it
>             >  > seems it should be. In those files you listed (the
>             >  CMake*Compiler.cmake
>             >  > files) can you tell me what the value of the
>             CMAKE_*_SIZEOF_DATA_PTR
>             >  > variables are? Also if you could get that information
>             for the BGP
>             >  > machine as well that would be helpful. Basically we use that
>             >  information
>             >  > to decide what the size of the EPETRA_OBJECT_PTR should
>             be and it
>             >  seems
>             >  > like it might be getting that value confused some how.
>             Knowing what it
>             >  > should be hopefully will help us fix this. I’ll look
>             into how Cmake is
>             >  > determining that value cause it is possible that it
>             isn’t doing it
>             >  right
>             >  > for those compilers.
>             >
>             >  I see
>             >
>             >  login3.intrepid$ grep SIZEOF_DATA CMake*Compiler.cmake
>             >  CMakeCCompiler.cmake:SET(CMAKE_C_SIZEOF_DATA_PTR "8")
>             >  CMakeCCompiler.cmake:IF(CMAKE_C_SIZEOF_DATA_PTR)
>             >  CMakeCCompiler.cmake: SET(CMAKE_SIZEOF_VOID_P
>             >  "${CMAKE_C_SIZEOF_DATA_PTR}")
>             >  CMakeCCompiler.cmake:ENDIF(CMAKE_C_SIZEOF_DATA_PTR)
>             >  CMakeCXXCompiler.cmake:SET(CMAKE_CXX_SIZEOF_DATA_PTR "8")
>             >  CMakeCXXCompiler.cmake:IF(CMAKE_CXX_SIZEOF_DATA_PTR)
>             >  CMakeCXXCompiler.cmake: SET(CMAKE_SIZEOF_VOID_P
>             >  "${CMAKE_CXX_SIZEOF_DATA_PTR}")
>             >  CMakeCXXCompiler.cmake:ENDIF(CMAKE_CXX_SIZEOF_DATA_PTR)
>             >
>             CMakeFortranCompiler.cmake:SET(CMAKE_Fortran_SIZEOF_DATA_PTR
>             "4")
>             >  CMakeFortranCompiler.cmake:IF(CMAKE_Fortran_SIZEOF_DATA_PTR)
>             >  CMakeFortranCompiler.cmake: SET(CMAKE_SIZEOF_VOID_P
>             >  "${CMAKE_Fortran_SIZEOF_DATA_PTR}")
>             >
>             CMakeFortranCompiler.cmake:ENDIF(CMAKE_Fortran_SIZEOF_DATA_PTR)
>             >
>             >  What else can I send you?
>             >
>             >  Thanks...John
>             >
>             >  >
>             >  > Thanks,
>             >  >
>             >  > Brent
>             >  >
>             >  >
>             >  > On 4/28/10 4:04 PM, "John R. Cary" <cary at colorado.edu>
>             wrote:
>             >  >
>             >  > On 4/28/2010 3:59 PM, Perschbacher, Brent M wrote:
>             >  >
>             >  > Re: [Trilinos-Users] Cannot build 64 bit on Intrepid. John,
>             >  > Since you couldn’t send the whole cache can you look in
>             it and
>             >  > tell me what the value of the variable
>             “CMAKE_SIZEOF_VOID_P” is
>             >  > please?
>             >  >
>             >  >
>             >  >
>             >  >
>             >  > Hi Brent,
>             >  >
>             >  > Curiously, I don't see it
>             >  >
>             >  > login5.intrepid$ grep CMAKE_SIZEOF_VOID_P CMakeCache.txt
>             >  > login5.intrepid$ grep -i CMAKE_SIZEOF_VOID_P CMakeCache.txt
>             >  > login5.intrepid$ grep -i void CMakeCache.txt
>             >  > login5.intrepid$ head CMakeCache.txt
>             >  > # This is the CMakeCache file.
>             >  > # For build in directory:
>             >  > /home/cary/projects/vpall/builds/trilinos-10.2.0/ser
>             >  > # It was generated by CMake:
>             >  >
>             /gpfs/home/projects/facets/intrepid/contrib/cmake-2.8.1-ser/bin/cmake
>             >  > ...
>             >  >
>             >  > I do see:
>             >  >
>             >  >
>             >  > login5.intrepid$ grep -i CMAKE_SIZEOF_VOID_P CMakeFiles/*
>             >  > CMakeFiles/CMakeCCompiler.cmake: SET(CMAKE_SIZEOF_VOID_P
>             >  > "${CMAKE_C_SIZEOF_DATA_PTR}")
>             >  > CMakeFiles/CMakeCXXCompiler.cmake: SET(CMAKE_SIZEOF_VOID_P
>             >  > "${CMAKE_CXX_SIZEOF_DATA_PTR}")
>             >  > CMakeFiles/CMakeFortranCompiler.cmake:
>             SET(CMAKE_SIZEOF_VOID_P
>             >  > "${CMAKE_Fortran_SIZEOF_DATA_PTR}")
>             >  >
>             >  >
>             >  > Thanks....John
>             >  >
>             >
>             >
>             >
>
>
>
>
>
>





More information about the Trilinos-Users mailing list