/*
*===============================================================================
*
* d/wilson_d520/globals.h
*
*-------------------------------------------------------------------------------
*
* Copyright (C) 2010 Thomas Streuer 
*
* This file is part of BQCD -- Berlin Quantum ChromoDynamics program
*
* BQCD is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BQCD is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with BQCD.  If not, see <http:*www.gnu.org/licenses/>.
*
*-------------------------------------------------------------------------------
*/
#ifndef GLOBALS_H

#define GLOBALS_H

#include "common.h"

#include <inttypes.h>

extern int my_rank;
extern int use_shmem;        // whether to use shmem for t-direction comm. (1 not supported at the moment)
extern int grid[4];          // logical grid
extern int lattice[4];       // local lattice
extern int position[4];      // node position in logical grid
extern int t_position[4];    // node position in physical grid
extern int grid_nb[2][4];    // neighbor node id (logical grid)
extern int local_nb[2][4];   // whether neighbor is on same node (mu = logical dir.)
extern int num_procs;
extern int tot_bnd_size;
extern int volume;           // local volume
extern int half_volume[2];   // local half-volume (even/odd)
extern int volume_slice;     // local volume of one timeslice
extern int half_slice[2];    // local half-volume of timeslice 0 (even/odd)
extern int boundary[4];      // is there a boundary in logical direction mu?
extern int which_cpu;        // number of core in node (0..3)
extern int global_oe;        // whether local site 0000 is globally odd/even
extern int global_oe_nb[4];  //   same for neighboring nodes
extern int torus_dir[4];     // mappping logical direction  -> physical direction
extern int logical_dir[4];   // mappping physical direction -> logical direction
extern global_wilson_data_t wilson_data;
extern int mesh_topology;    // whether we are on a mesh partition
extern int mesh_correct;     // whether to produce correct results on mesh (might take longer)
extern int t_local;          // whether t-direction is parallelized within node

#endif
