Fortran keywords

Back to the backend overview

About this backend

This backend runs the native, MPI-parallel Fortran solvers described in the EDRIXS paper. It uses a staged, file-backed workflow: Python writes the solver inputs, calls the native executable, and reads the results. The EDRIXS repository contains the Fortran sources and build instructions.

All staged operations are collective on an mpi4py communicator. When comm is omitted, mpi4py.MPI.COMM_WORLD is used. Every rank in that communicator must enter the operation; see the mpi4py collective communication tutorial for the underlying MPI model.

For exact diagonalization, ed_solver=0 selects dense LAPACK, ed_solver=1 selects Lanczos, and ed_solver=2 selects parallel ARPACK/PARPACK. The ARPACK project documentation describes the serial and MPI-enabled libraries used by the last mode.

These options belong only to the staged interface. The legacy *_fort functions retain their existing explicit parameters and behavior.

get_ops

The Fortran backend constructs the complete problem at once, so build_op(..., backend='fortran') is not supported.

Option

Default

Description

comm

MPI.COMM_WORLD

mpi4py communicator used collectively by the backend.

tol

1e-12

Discard Coulomb coefficients whose magnitude does not exceed this threshold.

To resume a staged calculation from native input files already present in the current working directory, call get_ops_disk(). It returns hmat_i, hmat_n, and trans_ops handles without rewriting the problem files.

Both get_ops(..., backend='fortran') and get_ops_disk() return disk handles with .backend == 'fortran'. Pass them directly to public ed, xas, and rixs. The handles are callable and return themselves; the Fortran backends call them while native Fortran manages matrix construction.

ed

Option

Default

Description

comm

MPI.COMM_WORLD

mpi4py communicator used collectively by the backend.

ed_solver

1

Native eigensolver: 0 for dense, 1 for Lanczos, or 2 for ARPACK.

nvector

num_evals

Number of eigenvectors written for subsequent spectroscopy stages.

ncv

max(3, num_evals + 2)

ARPACK Krylov subspace size.

idump

True

Write eigenvectors to native files.

maxiter

500

Maximum eigensolver iterations.

min_ndim

1000

Dimension below which the native solver uses dense diagonalization.

eigval_tol

1e-08

Eigenvalue convergence tolerance.

For later XAS or RIXS calculations, idump must remain true and nvector must be at least the later num_gs value. nvector cannot exceed num_evals.

xas

Option

Default

Description

comm

MPI.COMM_WORLD

mpi4py communicator used collectively by the backend.

num_gs

len(eval_i)

Number of saved initial states included in the spectrum.

nkryl

200

Maximum intermediate-state Krylov dimension.

rixs

Option

Default

Description

comm

MPI.COMM_WORLD

mpi4py communicator used collectively by the backend.

num_gs

len(eval_i)

Number of saved initial states included in the spectrum.

nkryl

200

Maximum final-state Krylov dimension.

linsys_max

5000

Maximum iterations for the intermediate-state linear solve.

linsys_tol

1e-10

Convergence tolerance for the intermediate-state linear solve.