QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions
quda_fortran.h File Reference

Fortran interface functions. More...

#include <quda_constants.h>
Include dependency graph for quda_fortran.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void init_quda_device_ (int *device)
 
void init_quda_memory_ ()
 
void init_quda_ (int *device)
 
void end_quda_ (void)
 
void comm_set_gridsize_ (int *grid)
 
void new_quda_gauge_param_ (QudaGaugeParam *param)
 
void new_quda_invert_param_ (QudaInvertParam *param)
 
void load_gauge_quda_ (void *h_gauge, QudaGaugeParam *param)
 
void free_gauge_quda_ (void)
 
void free_sloppy_gauge_quda_ (void)
 
void load_clover_quda_ (void *h_clover, void *h_clovinv, QudaInvertParam *inv_param)
 
void free_clover_quda_ (void)
 
void dslash_quda_ (void *h_out, void *h_in, QudaInvertParam *inv_param, QudaParity *parity)
 
void clover_quda_ (void *h_out, void *h_in, QudaInvertParam *inv_param, QudaParity *parity, int *inverse)
 
void mat_quda_ (void *h_out, void *h_in, QudaInvertParam *inv_param)
 
void mat_dag_mat_quda_ (void *h_out, void *h_in, QudaInvertParam *inv_param)
 
void invert_quda_ (void *h_x, void *h_b, QudaInvertParam *param)
 
void invert_multishift_quda_ (void *_hp_x, void *_hp_b, QudaInvertParam *param)
 
void update_gauge_field_quda_ (void *gauge, void *momentum, double *dt, bool *conj_mom, bool *exact, QudaGaugeParam *param)
 
void compute_staggered_force_quda_ (void *mom, double *dt, double *delta, void *gauge, void *x, QudaGaugeParam *gauge_param, QudaInvertParam *invert_param)
 
void compute_gauge_force_quda_ (void *mom, void *gauge, int *num_loop_types, double *coeff, double *dt, QudaGaugeParam *param)
 Compute the gauge force and update the mometum field. More...
 
void apply_staggered_phase_quda_ ()
 Apply the staggered phase factors to the resident gauge field. More...
 
void remove_staggered_phase_quda_ ()
 Remove the staggered phase factors to the resident gauge field. More...
 
void kinetic_quda_ (double *kin, void *momentum, QudaGaugeParam *param)
 Evaluate the kinetic (momentum) contribution to classical Hamiltonian for Hybrid Monte Carlo. More...
 
void plaq_quda_ (double plaq[3])
 
void set_kernel_pack_t_ (int *pack)
 fTemporary function exposed for TIFR benchmarking More...
 
void flush_chrono_quda_ (int *index)
 Flush the chronological history for the given index. More...
 
void register_pinned_quda_ (void *ptr, size_t *bytes)
 Pinned a pre-existing memory allocation. More...
 
void unregister_pinned_quda_ (void *ptr)
 Pinned a pre-existing memory allocation. More...
 

Detailed Description

Fortran interface functions.

The following are Fortran interface functions to QUDA that mirror the C-equivalents. This essentially just means making all calls by reference, using all the lower-case characters and adding a trailing underscore.

Definition in file quda_fortran.h.

Function Documentation

◆ apply_staggered_phase_quda_()

void apply_staggered_phase_quda_ ( )

Apply the staggered phase factors to the resident gauge field.

Definition at line 5328 of file interface_quda.cpp.

References quda::GaugeField::applyStaggeredPhase(), errorQuda, getVerbosity(), printfQuda, and QUDA_VERBOSE.

Here is the call graph for this function:

◆ clover_quda_()

void clover_quda_ ( void *  h_out,
void *  h_in,
QudaInvertParam inv_param,
QudaParity parity,
int *  inverse 
)

Apply the clover operator or its inverse.

Parameters
h_outResult spinor field
h_inInput spinor field
paramContains all metadata regarding host and device storage
parityThe source and destination parity of the field
inverseWhether to apply the inverse of the clover term

Definition at line 5157 of file interface_quda.cpp.

References cloverQuda().

Here is the call graph for this function:

◆ comm_set_gridsize_()

void comm_set_gridsize_ ( int *  grid)

Setter method for the comm grid size to all us to reuse BQCD's MPI topology. This is considered a temporary hack that will be fixed when an interface for setting the logical topology is created (issue 31 on github).

BQCD wants a node mapping with x varying fastest.

Definition at line 5370 of file interface_quda.cpp.

References initCommsGridQuda().

Here is the call graph for this function:

◆ compute_gauge_force_quda_()

void compute_gauge_force_quda_ ( void *  mom,
void *  gauge,
int *  num_loop_types,
double *  coeff,
double *  dt,
QudaGaugeParam param 
)

Compute the gauge force and update the mometum field.

Parameters
[in,out]momThe momentum field to be updated
[in]gaugeThe gauge field from which we compute the force
[in]num_loop_typesNumber of loop types in the gauge action
[in]loop_coeffCoefficients of the different loops in the Symanzik action
[in]dtThe integration step size
[in]paramThe parameters of the external fields and the computation settings

Definition at line 5267 of file interface_quda.cpp.

References computeGaugeForceQuda(), createGaugeForcePaths(), errorQuda, host_free, and safe_malloc.

Here is the call graph for this function:

◆ compute_staggered_force_quda_()

void compute_staggered_force_quda_ ( void *  mom,
double *  dt,
double *  delta,
void *  gauge,
void *  x,
QudaGaugeParam gauge_param,
QudaInvertParam invert_param 
)

Compute the naive staggered force. All fields must be in the same precision.

Parameters
momMomentum field
dtIntegrating step size
deltaAdditional scale factor when updating momentum (mom += delta * [force]_TA
gaugeGauge field (at present only supports resident gauge field)
xArray of single-parity solution vectors (at present only supports resident solutions)
gauge_paramGauge field meta data
invert_paramDirac and solver meta data

Definition at line 5323 of file interface_quda.cpp.

References computeStaggeredForceQuda().

Here is the call graph for this function:

◆ dslash_quda_()

void dslash_quda_ ( void *  h_out,
void *  h_in,
QudaInvertParam inv_param,
QudaParity parity 
)

Apply the Dslash operator (D_{eo} or D_{oe}).

Parameters
h_outResult spinor field
h_inInput spinor field
paramContains all metadata regarding host and device storage
parityThe destination parity of the field

Definition at line 5155 of file interface_quda.cpp.

References dslashQuda().

Here is the call graph for this function:

◆ end_quda_()

void end_quda_ ( void  )

Finalize the library.

Definition at line 5148 of file interface_quda.cpp.

References endQuda().

Here is the call graph for this function:

◆ flush_chrono_quda_()

void flush_chrono_quda_ ( int *  index)

Flush the chronological history for the given index.

Parameters
[in]indexIndex for which we are flushing

Definition at line 5192 of file interface_quda.cpp.

References flushChronoQuda().

Here is the call graph for this function:

◆ free_clover_quda_()

void free_clover_quda_ ( void  )

Free QUDA's internal copy of the clover term and/or clover inverse.

Definition at line 5154 of file interface_quda.cpp.

References freeCloverQuda().

Here is the call graph for this function:

◆ free_gauge_quda_()

void free_gauge_quda_ ( void  )

Free QUDA's internal copy of the gauge field.

Definition at line 5150 of file interface_quda.cpp.

References freeGaugeQuda().

Here is the call graph for this function:

◆ free_sloppy_gauge_quda_()

void free_sloppy_gauge_quda_ ( void  )

Free QUDA's internal copy of the gauge field.

Definition at line 5151 of file interface_quda.cpp.

References freeSloppyGaugeQuda().

Here is the call graph for this function:

◆ init_quda_()

void init_quda_ ( int *  device)

Initialize the library. Under the interface this just calls initQudaMemory and initQudaDevice.

Parameters
deviceCUDA device number to use. In a multi-GPU build, this parameter may be either set explicitly on a per-process basis or set to -1 to enable a default allocation of devices to processes.

Definition at line 5145 of file interface_quda.cpp.

References initQuda().

Here is the call graph for this function:

◆ init_quda_device_()

void init_quda_device_ ( int *  device)

Initialize the library. This is a low-level interface that is called by initQuda. Calling initQudaDevice requires that the user also call initQudaMemory before using QUDA.

Parameters
deviceCUDA device number to use. In a multi-GPU build, this parameter may either be set explicitly on a per-process basis or set to -1 to enable a default allocation of devices to processes.

Definition at line 5146 of file interface_quda.cpp.

References initQudaDevice().

Here is the call graph for this function:

◆ init_quda_memory_()

void init_quda_memory_ ( )

Initialize the library persistant memory allocations (both host and device). This is a low-level interface that is called by initQuda. Calling initQudaMemory requires that the user has previously called initQudaDevice.

Definition at line 5147 of file interface_quda.cpp.

References initQudaMemory().

Here is the call graph for this function:

◆ invert_multishift_quda_()

void invert_multishift_quda_ ( void *  _hp_x,
void *  _hp_b,
QudaInvertParam param 
)

Solve for multiple shifts (e.g., masses).

Parameters
_hp_xArray of solution spinor fields (large contiguous allocation)
_hp_bArray of source spinor fields
paramContains all metadata regarding host and device storage and solver parameters

Definition at line 5171 of file interface_quda.cpp.

References QudaInvertParam_s::cpu_prec, QudaInvertParam_s::dirac_order, QudaInvertParam_s::dslash_type, errorQuda, invertMultiShiftQuda(), QudaInvertParam_s::Ls, quda::GaugeField::Ncolor(), QudaInvertParam_s::num_offset, QUDA_ASQTAD_DSLASH, QUDA_MAX_MULTI_SHIFT, QUDA_STAGGERED_DSLASH, QUDA_TIFR_PADDED_DIRAC_ORDER, and quda::LatticeField::X().

Here is the call graph for this function:

◆ invert_quda_()

void invert_quda_ ( void *  h_x,
void *  h_b,
QudaInvertParam param 
)

Perform the solve, according to the parameters set in param. It is assumed that the gauge field has already been loaded via loadGaugeQuda().

Parameters
h_xSolution spinor field
h_bSource spinor field
paramContains all metadata regarding host and device storage and solver parameters

Definition at line 5163 of file interface_quda.cpp.

References QudaInvertParam_s::dslash_type, invertQuda(), QudaInvertParam_s::Ls, QUDA_ASQTAD_DSLASH, and QUDA_STAGGERED_DSLASH.

Here is the call graph for this function:

◆ kinetic_quda_()

void kinetic_quda_ ( double *  kin,
void *  momentum,
QudaGaugeParam param 
)

Evaluate the kinetic (momentum) contribution to classical Hamiltonian for Hybrid Monte Carlo.

Parameters
kinKinetic energy
momentumThe momentum field
paramThe parameters of the external fields and the computation settings
Returns
momentum action

Definition at line 5349 of file interface_quda.cpp.

References dims, momActionQuda(), and rank.

Here is the call graph for this function:

◆ load_clover_quda_()

void load_clover_quda_ ( void *  h_clover,
void *  h_clovinv,
QudaInvertParam inv_param 
)

Load the clover term and/or the clover inverse from the host. Either h_clover or h_clovinv may be set to NULL.

Parameters
h_cloverBase pointer to host clover field
h_cloverinvBase pointer to host clover inverse field
inv_paramContains all metadata regarding host and device storage

Definition at line 5152 of file interface_quda.cpp.

References loadCloverQuda().

Here is the call graph for this function:

◆ load_gauge_quda_()

void load_gauge_quda_ ( void *  h_gauge,
QudaGaugeParam param 
)

Load the gauge field from the host.

Parameters
h_gaugeBase pointer to host gauge field (regardless of dimensionality)
paramContains all metadata regarding host and device storage

Definition at line 5149 of file interface_quda.cpp.

References loadGaugeQuda().

Here is the call graph for this function:

◆ mat_dag_mat_quda_()

void mat_dag_mat_quda_ ( void *  h_out,
void *  h_in,
QudaInvertParam inv_param 
)

Apply M^{}M, possibly even/odd preconditioned.

Parameters
h_outResult spinor field
h_inInput spinor field
paramContains all metadata regarding host and device storage

Definition at line 5161 of file interface_quda.cpp.

References MatDagMatQuda().

Here is the call graph for this function:

◆ mat_quda_()

void mat_quda_ ( void *  h_out,
void *  h_in,
QudaInvertParam inv_param 
)

Apply the full Dslash matrix, possibly even/odd preconditioned.

Parameters
h_outResult spinor field
h_inInput spinor field
paramContains all metadata regarding host and device storage

Definition at line 5159 of file interface_quda.cpp.

References MatQuda().

Here is the call graph for this function:

◆ new_quda_gauge_param_()

void new_quda_gauge_param_ ( QudaGaugeParam param)

Initializes the QudaGaugeParam with default entries.

Parameters
TheQudaGaugeParam to be initialized

Definition at line 5204 of file interface_quda.cpp.

References newQudaGaugeParam().

Here is the call graph for this function:

◆ new_quda_invert_param_()

void new_quda_invert_param_ ( QudaInvertParam param)

Initializes the QudaInvertParam with default entries.

Parameters
TheQudaInvertParam to be initialized

Definition at line 5207 of file interface_quda.cpp.

References newQudaInvertParam().

Here is the call graph for this function:

◆ plaq_quda_()

void plaq_quda_ ( double  plaq[3])
Parameters
Computesthe total, spatial and temporal plaquette averages of the loaded gauge configuration.
Arrayfor storing the averages (total, spatial, temporal)

Definition at line 5415 of file interface_quda.cpp.

References plaqQuda().

Here is the call graph for this function:

◆ register_pinned_quda_()

void register_pinned_quda_ ( void *  ptr,
size_t *  bytes 
)

Pinned a pre-existing memory allocation.

Parameters
[in]ptrPointer to buffer to be pinned
[in]sizeSize of allocation

Definition at line 5194 of file interface_quda.cpp.

References checkCudaError.

◆ remove_staggered_phase_quda_()

void remove_staggered_phase_quda_ ( )

Remove the staggered phase factors to the resident gauge field.

Definition at line 5338 of file interface_quda.cpp.

References errorQuda, getVerbosity(), printfQuda, QUDA_VERBOSE, qudaDeviceSynchronize, and quda::GaugeField::removeStaggeredPhase().

Here is the call graph for this function:

◆ set_kernel_pack_t_()

void set_kernel_pack_t_ ( int *  pack)

fTemporary function exposed for TIFR benchmarking

Exposed due to poor derived MPI datatype performance with GPUDirect RDMA

Definition at line 5380 of file interface_quda.cpp.

References quda::setKernelPackT().

Here is the call graph for this function:

◆ unregister_pinned_quda_()

void unregister_pinned_quda_ ( void *  ptr)

Pinned a pre-existing memory allocation.

Parameters
[in]ptrPointer to buffer to be unpinned

Definition at line 5199 of file interface_quda.cpp.

References checkCudaError.

◆ update_gauge_field_quda_()

void update_gauge_field_quda_ ( void *  gauge,
void *  momentum,
double *  dt,
bool *  conj_mom,
bool *  exact,
QudaGaugeParam param 
)

Evolve the gauge field by step size dt, using the momentum field I.e., Evalulate U(t+dt) = e(dt pi) U(t)

Parameters
gaugeThe gauge field to be updated
momentumThe momentum field
dtThe integration step size step
conj_momWhether to conjugate the momentum matrix
exactWhether to use an exact exponential or Taylor expand
paramThe parameters of the external fields and the computation settings

Definition at line 5211 of file interface_quda.cpp.

References updateGaugeFieldQuda().

Here is the call graph for this function: