pjd.c:975:7: error: ‘ritzi’ undeclared

Issue #13 resolved
Drew Parsons created an issue

Building SLEPc 3.10.0 (real numbers) hits an error:

/build/slepc/src/pep/impls/jd/pjd.c: In function ‘PEPSolve_JD’:
/build/slepc/src/pep/impls/jd/pjd.c:975:7: error: ‘ritzi’ undeclared (first use in this function); did you mean ‘ritz’?
       ritzi = pep->eigi[idx];
       ^~~~~

ritzi is used inside a preprocessor test for PETSC_USE_COMPLEX, so it looks like you've been using SLEPc only with complex number support.

Comments (4)

  1. Jose E. Roman

    This is very strange, I cannot reproduce it. This file should not be built in the case of real scalars, only with complex scalars. Yes, having code fragments with PETSC_USE_COMPLEX in this case is silly, but this is part of work in progress (see branch carmen/pjd-real). However, this should be harmless, because of the line

    #requiresscalar    complex
    

    in file src/pep/impls/jd/makefile. The gmakegen.py step at the beginning of make should remove this file from the build. Now the question is: why in your case the file src/pep/impls/jd/pjd.c is being built if scalar-type=real? Are you using the default build mode or one of the other (cmake or legacy)?

  2. Drew Parsons reporter

    hmm, looks like there might be something weirdly wrong with my installation. The deb file has the complex configuration intact (petscconf.h etc), but after installation I find a real number configuration in the complex dir. My directories seems to have gotten tangled.

  3. Drew Parsons reporter

    that's it. I was experimenting with saving space by sharing header files, but went too far with it. Fixed now, slepc now builds. Thanks Jose.

  4. Log in to comment