3 Replies Latest reply on Jul 27, 2009 7:00 PM by byteme

    Problem with SuperLU on windows 32bit


      I am getting this:

       ** ACML error: on entry to ZTRSV  parameter number  1 had an illegal value

      using SuperLU with the intel fortran 32 bit acml library, however all the other functions seem to work.

      Parameter 1 is called using the form:


      which is a char *.  What is the proper calling convention for the fortran interface when passing these single character arguments?  I am using visual c++ 2008 expres.



        • Problem with SuperLU on windows 32bit

          In the end, I was left with an awful choice which took several hours to resolve.  I found acml.h, and neither of the two forms matched the calling conventions of SuperLU.

          I chose to hack SuperLU to follow the FORTRAN calling convention, requiring I append the length of each character string to the end of the function call.  This was better than the alternative, changing all single character char's and also int's to pass by value.

          Is there any way to generate a C interface using pass by reference semantics.  Especially since, it then requires knowledge of whether something is a single character (char) or a string (char *).

          • Problem with SuperLU on windows 32bit

            Calling FORTRAN modules from C/C++ is always tricky.   Not only does each language have a different ABI for passing arguements, but each FORTRAN compiler has it's own different protocols.  Some of the issues are discussed in the User's Guide http://developer.amd.com/cpu/Libraries/acml/onlinehelp/Documents/Interfaces.html#Interfaces.

            ACML contains C language bindings in ACML.h which handle most of the compatability problems for most users -- I see you found that, but it wasn't quite compatabile with the SuperLU code.

            Another alternative would be to download the CBLAS interface source code from Netlib and compile it with your application.

              • Problem with SuperLU on windows 32bit

                The problem with the C interface is the value semantics, where single character arguments are assumed to be char, and not char *.

                SuperLU supports embedding the string length in the fortran interface, but only with the length of the string immediately after the string argument.

                I assume there is no chance of AMD releasing a third blas interface using the cvf calling convention?

                I have already gone through the Superlu 4.0 code and fixed it up for string lengths passed at the end.  If anyone wants it, please contact me.