Welcome, Guest
Username: Password: Remember me

TOPIC: ARTEMIS with MUMPS

ARTEMIS with MUMPS 9 years 9 months ago #15601

Is the anybody who ran ARTEMIS with MUMPS?
When I tried to do that I had the problems.
The administrator has disabled public write access.

ARTEMIS with MUMPS 9 years 9 months ago #15602

I found some bugs that prevents to run ARTEMIS with MUMPS solver.

First:
Subroutine SOLVE calls subroutine PRE4_MUMPS
PRE4_MUMPS calls SD_FABSG4
      CALL SD_FABSG4(NPOIN,NSEGB,DAB1,DAB2,DAB3,DAB4,
     *               XAB1,XAB2,XAB3,XAB4,NPBLK,NSEGBLK,DA,XA)

without TYPEXT1(2/3/4) argumets.
!                    ********************
                     SUBROUTINE SD_FABSG4
!                    ********************
!
     &(NPOIN,NSEG,DAB1,DAB2,DAB3,DAB4,XAB1,XAB2,XAB3,XAB4,
     & NPBLK,NSEGBLK,DA,XA,TYPEXT1,TYPEXT2,TYPEXT3,TYPEXT4)

This bug may be fixed easy.

Next:
PRE4_MUMPS calls SOLVE_MUMPS to solve system.
But SOLVE_MUMPS is empty.
#if defined(HAVE_MUMPS)
      !TODO:Get code for mumps
#else

And another:
I tried to change SOLVE_MUMPS by SOLVE_MUMPS_PAR
and found one more bug - exceeding the bounds of the array.
PRE4_MUMPS calls SOLVE_MUMPS with arguments
      CALL SOLVE_MUMPS(NPBLK,NSEGBLK,GLOSEG4,NSEGBLK,DA,XA,
     *     XINC,RHS,INFOGR,TYPEXT,KNOLG,NPOIN_TOT,IPID)

GLOSEG4 have size GLOSEG4(2*NSEGBLK)
In the subroutine SOLVE_MUMPS_PAR array GLOSEG, that accept GLOSEG4, have size GLOSEG(MAXSEG,2) and MAXSEG equal NSEGBLK. So GLOSEG have size 2*NSEGBLK too. But there is part of code
      IF(TYPEXT.EQ.'S') THEN 
         DO K = 1,NSEGB
            I = TEMP3(GLOSEG(K,1))
            J = TEMP3(GLOSEG(K,2))  
            NBELEM = NBELEM + 1
            IF(I.LT.J) THEN
               MUMPS_PAR%IRN_loc(NBELEM) = I 
               MUMPS_PAR%JCN_loc(NBELEM) = J
            ELSE
               MUMPS_PAR%IRN_loc(NBELEM) = J 
               MUMPS_PAR%JCN_loc(NBELEM) = I
            ENDIF
            MUMPS_PAR%A_loc(NBELEM) = XA(K)
         ENDDO
      ELSE
         DO K = 1,2*NSEGB
            I = TEMP3(GLOSEG(K,1))
            J = TEMP3(GLOSEG(K,2))
            NBELEM = NBELEM + 1
            MUMPS_PAR%IRN_loc(NBELEM) = I 
            MUMPS_PAR%JCN_loc(NBELEM) = J
            MUMPS_PAR%A_loc(NBELEM) = XA(K)
         ENDDO
      ENDIF

When TYPEXT .ne. 'S' top limit of loop is equal to 2*NSEGB that bigger then MAXSEG (NSEGB=NSEGBLK=MAXSEG). When K=NSEGB+1 program stops with error

Subscript #1 of the array GLOSEG has value *** which is greater than the upper bound of ***

May be something to solve this problem. Help me please!

Maxim Sorockin
The administrator has disabled public write access.

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.