(p)arpack compilation error

Clearly defined bug reports and their fixes
Post Reply
rgladstone
Posts: 61
Joined: 15 Apr 2013, 16:23
Antispam: Yes

(p)arpack compilation error

Post by rgladstone » 13 Dec 2016, 01:01

Hi, I am currently trying to compile Elmer with some fairly strict compiler flags. On Taito I am using "-g -check all -fpe0 -warn -traceback -debug extended".

I get errors when compiling this file: mathlibs/src/parpack/pcneupd.f
The file contains a call to cngets with the wrong number of arguments. It looks like maybe it should be a call to pcngets (which seems to be a parallel version of cngets). I don't know anything about this code, so I do not feel confident to make the correction, but it certainly looks like a bug to me. Can someone help? Note that cngets is in arpack and pcngets is in parpack.

Note that there are also a number of vars with implicit types in the mathlibs. Is everyone happy with these?

Regards,
Rupert

rgladstone
Posts: 61
Joined: 15 Apr 2013, 16:23
Antispam: Yes

Re: (p)arpack compilation error

Post by rgladstone » 13 Dec 2016, 04:01

Apart from the mathlibs errors, I am also getting errors later in the compilation, relating to a few of the calls to AddrFunc. The errors look like this:

Code: Select all

/homeappl/home/gladston/Source/elmer/elmerice/fem/src/ViewFactors.F90(813): error #8128: The BIND attribute of the associated actual procedure differs from the BIND attribute of the dummy procedure.   [HUTI_D_CG]
      iterProc  = AddrFunc(HUTI_D_CG)
---------------------------^
/homeappl/home/gladston/Source/elmer/elmerice/fem/src/ViewFactors.F90(813): error #7070: The number of arguments of the associated actual procedure is different from the number of arguments of the dummy procedure.   [HUTI_D_CG]
      iterProc  = AddrFunc(HUTI_D_CG)
---------------------------^

I get the above error from both the following code files:
fem/src/ViewFactors.F90
fem/src/GebhardtFactors.F90

I think I do have USE_ISO_C_BINDINGS defined (relevant in case you're looking at the source code).

Any ideas how to resolve this? I'm not really sure where HUTI_D_CG comes from.



While I am busy reporting these, I also get this error, though I am not sure why it is an error. It looks to me like the call has the correct number of arguments.

Code: Select all

/homeappl/home/gladston/Source/elmer/elmerice/fem/src/modules/SaveData/SaveScalars.F90(1388): error #6784: The number of actual arguments cannot be greater than the number of dummy arguments.   [MPI_ALLREDUCE]
          CALL MPI_ALLREDUCE(Val,ParVal,1,&
---------------^
compilation aborted for /homeappl/home/gladston/Source/elmer/elmerice/fem/src/modules/SaveData/SaveScalars.F90 (code 1)
Here is the full line in question, to save a little time:

Code: Select all

         CALL MPI_ALLREDUCE(Val,ParVal,1,&
              MPI_DOUBLE_PRECISION,MPIOper,MPI_COMM_WORLD,ierr)
This looks like a suitable argument list. Essentially the same arguments as the c version plus an error code at the end. Could there be some issue with types?


All this is using the elmerice branch btw. Latest version.

Thanks for any help,
Rupert

rgladstone
Posts: 61
Joined: 15 Apr 2013, 16:23
Antispam: Yes

Re: (p)arpack compilation error

Post by rgladstone » 14 Dec 2016, 00:56

Here is a brief update:

The actual compilation errors from arpack and parpack vary a bit depending on which modules I have loaded and on which compiler options I use.

I've triggered one or two other compilation errors but have decided I don't have time at the moment to try to plough through these.

More worryingly runtime checking causes some pointer errors that look like they need attention, but which disappear without those checking flags.

I also find that my current simulations give seg faults when using a recent version of elmer, but seem to run ok with older versions (going back to early this year).

I think these issues need looking in to at some point, but will require a chunk of time set aside. I think it would be really good to be able to compile and run Elmer with strict syntax and memory checking flags for the sake of troubleshooting. I will revisit this in 2017 and for now will try to just use a setup that runs.

tzwinger
Site Admin
Posts: 86
Joined: 24 Aug 2009, 12:20
Contact:

Re: (p)arpack compilation error

Post by tzwinger » 14 Dec 2016, 09:18

Hi,
I do not have a lot of answers. The HUTI_D_DG is a function defined in the linear algebra package HUTITER, which is under elmerfem/fhutiter/src/huti_sfe.F90.

The MPI_ALLREDUCE error beats me - the only difference I can spot to other calls to the same function in other routines is, that the send and receive variables are usually allocatable, here they are simple Reals.

The parpack is from the NetLib version that comes with Elmer - so perhaps you try to replace the stuff with MKL on taito and by that buy yourself also better performance.

Regards,
Thomas

Post Reply