How to switch PETSc to 64 bit?

Hello,

I need to switch PETSc to 64 bit indices. I need to run ./configure --with-64-bit-indices, but where do I run it? Do i just input it into the command prompt before I run the file or does it go in the .edp?

Thank you for your help.

Hello,
Are you sure you need that? Are you solving problems with more than 4,294,967,296 unknowns? On how many MPI processes?
You can edit 3rdparty/ff-petsc/Makefile and add --with-64-bit-indices=true in the configure line.

Im solving a eigenvector problem of the Laplacian on a triangle. I want to do the first 1250 eigenvalues and have 450 nodes on each side. When I try to run the file that is the error it says. Does this sound like I should have to use 64 bit?

No, clearly you shouldn’t need 64 bit integers for such a problem. Could you please share a MWE?

Hello,
I tried adding the line --with-64-bit-indices=true
in the makefile file for petsc gives an error for SuperLU.

It is needed to modify other parts in the configuration file for the compilation to work?
Thanks

SuperLU does not support 64-bit indices, so you need to remove any SuperLU-related flags in 3rdparty/ff-petsc/Makefile.

Removing SuperLU gives error with ARPACK: ERROR: ARPACK cannot be used with 64-bit integers

Should all references to ARPACK be removed also?

Thanks!

Yes, you are correct.

Now the compilation of petsc-slepc runs fine, but the compilation of FreeFem doesn’t. The following type of errors appears a lot:

PETSc-code.hpp: In instantiation of ‘AnyType PETSc::initCSR<HpddmType, C>::E_initCSR::operator()(Stack) const [with HpddmType = HPDDM::Schur<double>; bool C = false; AnyType = AnyTypeWithOutCheck; Stack = void*]’: PETSc-code.hpp:1186:11: required from here PETSc-code.hpp:1223:52: error: cannot convert ‘int*’ to ‘const PetscInt*’ {aka ‘const long int*’}

In file included from SLEPc-complex.cpp:6: PETSc-code.hpp: In instantiation of ‘AnyType PETSc::initCSR<HpddmType, C>::E_initCSR::operator()(Stack) const [with HpddmType = HPDDM::Schwarz<std::complex<double> >; bool C = true; AnyType = AnyTypeWithOutCheck; Stack = void*]’: PETSc-code.hpp:1186:11: required from here PETSc-code.hpp:1223:52: error: cannot convert ‘int*’ to ‘const PetscInt*’ {aka ‘const long int*’}

Just to be sure, what version are you using? master/develop branch? 4.9 tarball?

The latest one from github obtained with git clone GitHub - FreeFem/FreeFem-sources: FreeFEM source code

I followed the usual installation instructions and modified the Makefile for the petsc-slepc compilation.

Should additional options be added to the initial ./configure ?

Thank you.

For now, could you please simply comment out this line FreeFem-sources/PETSc-code.hpp at master · FreeFem/FreeFem-sources · GitHub? I’ll come up with a proper fix tomorrow.

Thank you. I will do this. Please let me know when the fix is online.

This should be addressed in --with-64-bit-indices · FreeFem/FreeFem-sources@a3ee108 · GitHub. You can switch to the develop branch (git checkout develop). Thanks for your report.

Thank you very much for your help!

You are very welcome. Some functionalities are disabled for 64 bit integers (because FreeFEM is only 32 bit capable), let me know if you run into issues and I’ll try my best to sort them out.