Commit 0132ef93 authored by Udo Ziegler's avatar Udo Ziegler
Browse files

definitions of global variables have been shifted to module init.c and

declared as extern in header files. This is to avoid using the -fcommon option
when compiling with gcc 10.
parent 361657be
......@@ -54,9 +54,9 @@
#define CT_WANG(a,b,c,d,U) (a*pow(U,b)*(1.+c*exp(d*U)))
/* SPECIES INDICES ---------------------------------------------------------- */
int I_e,I_H[2],I_D[2],I_He[3],I_C[7],I_N[8],I_O[9],I_Ne[11],I_Mg[13],I_Si[15],
I_Fe[27],I_Hm,I_H2p,I_H2,I_HD,I_CO,I_H2O,I_OH,I_O2;
uflag_t isHe,isH2,isH2O;
extern int I_e,I_H[2],I_D[2],I_He[3],I_C[7],I_N[8],I_O[9],I_Ne[11],I_Mg[13],
I_Si[15],I_Fe[27],I_Hm,I_H2p,I_H2,I_HD,I_CO,I_H2O,I_OH,I_O2;
extern uflag_t isHe,isH2,isH2O;
/* CHEMICAL ELEMENTS ATOMIC WEIGHT ------------------------------------------ */
static double AW[CH_NELEMENTS]={1.008,2.014,4.003,12.011,14.007,15.999,
......@@ -126,28 +126,28 @@ Fe_NEL[26]={0,13,26,23,23,30,9,27,13,30,25,20,23,25,18,13,22,13,25,10,26,28,20,2
/* {0,142,322,37,34,96,9,536,915,552,996,912,749,739,283,161,267,337,636,375,620,548,196,24,49,25} */
/* VARIABLES FOR FINE STRUCTURE LINE COOLING -------------------------------- */
double ***RC_TS_He[2],***RC_CS_He[2],***RC_sp_He[2],***RC_sq_He[2],
**RC_dE_He[2],**RC_A_He[2],**RC_CSS_He[2],
***RC_TS_C[6],***RC_CS_C[6],***RC_sp_C[6],***RC_sq_C[6],
**RC_dE_C[6],**RC_A_C[6],**RC_CSS_C[6],
***RC_TS_N[7],***RC_CS_N[7],***RC_sp_N[7],***RC_sq_N[7],
**RC_dE_N[7],**RC_A_N[7],**RC_CSS_N[7],
***RC_TS_O[8],***RC_CS_O[8],***RC_sp_O[8],***RC_sq_O[8],
**RC_dE_O[8],**RC_A_O[8],**RC_CSS_O[8],
***RC_TS_Ne[10],***RC_CS_Ne[10],***RC_sp_Ne[10],***RC_sq_Ne[10],
**RC_dE_Ne[10],**RC_A_Ne[10],**RC_CSS_Ne[10],
***RC_TS_Mg[12],***RC_CS_Mg[12],***RC_sp_Mg[12],***RC_sq_Mg[12],
**RC_dE_Mg[12],**RC_A_Mg[12],**RC_CSS_Mg[12],
***RC_TS_Si[14],***RC_CS_Si[14],***RC_sp_Si[14],***RC_sq_Si[14],
**RC_dE_Si[14],**RC_A_Si[14],**RC_CSS_Si[14],
***RC_TS_Fe[26],***RC_CS_Fe[26],***RC_sp_Fe[26],***RC_sq_Fe[26],
**RC_dE_Fe[26],**RC_A_Fe[26],**RC_CSS_Fe[26];
int *RC_W_He[2],*RC_W_C[6],*RC_W_N[7],*RC_W_O[8],*RC_W_Ne[10],*RC_W_Mg[12],
*RC_W_Si[14],*RC_W_Fe[26];
uflag_t **RC_nT_He[2],**RC_ttype_He[2],**RC_nT_C[6],**RC_ttype_C[6],
**RC_nT_N[7],**RC_ttype_N[7],**RC_nT_O[8],**RC_ttype_O[8],
**RC_nT_Ne[10],**RC_ttype_Ne[10],**RC_nT_Mg[12],**RC_ttype_Mg[12],
**RC_nT_Si[14],**RC_ttype_Si[14],**RC_nT_Fe[26],**RC_ttype_Fe[26];
extern double ***RC_TS_He[2],***RC_CS_He[2],***RC_sp_He[2],***RC_sq_He[2],
**RC_dE_He[2],**RC_A_He[2],**RC_CSS_He[2],
***RC_TS_C[6],***RC_CS_C[6],***RC_sp_C[6],***RC_sq_C[6],
**RC_dE_C[6],**RC_A_C[6],**RC_CSS_C[6],
***RC_TS_N[7],***RC_CS_N[7],***RC_sp_N[7],***RC_sq_N[7],
**RC_dE_N[7],**RC_A_N[7],**RC_CSS_N[7],
***RC_TS_O[8],***RC_CS_O[8],***RC_sp_O[8],***RC_sq_O[8],
**RC_dE_O[8],**RC_A_O[8],**RC_CSS_O[8],
***RC_TS_Ne[10],***RC_CS_Ne[10],***RC_sp_Ne[10],***RC_sq_Ne[10],
**RC_dE_Ne[10],**RC_A_Ne[10],**RC_CSS_Ne[10],
***RC_TS_Mg[12],***RC_CS_Mg[12],***RC_sp_Mg[12],***RC_sq_Mg[12],
**RC_dE_Mg[12],**RC_A_Mg[12],**RC_CSS_Mg[12],
***RC_TS_Si[14],***RC_CS_Si[14],***RC_sp_Si[14],***RC_sq_Si[14],
**RC_dE_Si[14],**RC_A_Si[14],**RC_CSS_Si[14],
***RC_TS_Fe[26],***RC_CS_Fe[26],***RC_sp_Fe[26],***RC_sq_Fe[26],
**RC_dE_Fe[26],**RC_A_Fe[26],**RC_CSS_Fe[26];
extern int *RC_W_He[2],*RC_W_C[6],*RC_W_N[7],*RC_W_O[8],*RC_W_Ne[10],*RC_W_Mg[12],
*RC_W_Si[14],*RC_W_Fe[26];
extern uflag_t **RC_nT_He[2],**RC_ttype_He[2],**RC_nT_C[6],**RC_ttype_C[6],
**RC_nT_N[7],**RC_ttype_N[7],**RC_nT_O[8],**RC_ttype_O[8],
**RC_nT_Ne[10],**RC_ttype_Ne[10],**RC_nT_Mg[12],**RC_ttype_Mg[12],
**RC_nT_Si[14],**RC_ttype_Si[14],**RC_nT_Fe[26],**RC_ttype_Fe[26];
/* CI COEFFICIENTS - VORONOV (1997; Atomic data and nuclear data tables 65,1) */
static double
......@@ -503,9 +503,9 @@ static double
CT_d_Fe[3]={-7.31,-8.99,-0.37};
/* THERMAL PROCESSES VALUES & LABELS */
double TP_L_BREMSSTRAHLUNG,TP_L_H,TP_L_D,TP_L_He,TP_L_C[6],TP_L_N[7],TP_L_O[8],
TP_L_Ne[10],TP_L_Mg[12],TP_L_Si[14],TP_L_Fe[26],TP_L_H2[4],TP_L_HD,
TP_L_CR,TP_L_CO,TP_L_H2O,TP_L_OH;
extern double TP_L_BREMSSTRAHLUNG,TP_L_H,TP_L_D,TP_L_He,TP_L_C[6],TP_L_N[7],
TP_L_O[8],TP_L_Ne[10],TP_L_Mg[12],TP_L_Si[14],TP_L_Fe[26],
TP_L_H2[4],TP_L_HD,TP_L_CR,TP_L_CO,TP_L_H2O,TP_L_OH;
static char *TP_label[17]={"BREMSSTRAHLUNG","H","D","He","C[6]","N[7]","O[8]",
"Ne[10]","Mg[12]","Si[14]","Fe[26]","H2[4]","HD",
"CR","CO","H2O","OH"};
......
......@@ -15,16 +15,15 @@
*/
/* USER-SPECIFIC MACROS ------------------------------------------------------ */
/* USER-SPECIFIC MACROS ----------------------------------------------------- */
/* USER STRUCT TYPE ---------------------------------------------------------- */
/* USER STRUCT TYPE --------------------------------------------------------- */
typedef struct user
{
/* MY ENTRIES HERE */
int flag;
} USR;
USR _U; /* PUBLIC AVAILABILITY / STORED IN SNAPSHOT */
......@@ -16,6 +16,57 @@
#include <nirvana.h>
#include <NCCM.h>
/* GLOBAL VARIABLES --------------------------------------------------------- */
/* BASIC */
int _RANK, /* RANK OF LOCAL THREAD */
_TASKS, /* NUMBER OF THREADS */
_CONTAINER; /* NUMBER OF DATA CONTAINER */
char _IODIR[BUFS]; /* BASIC IO DIRECTORY */
FILE *_FLOG; /* LOG FILE POINTER */
double _TIMINGS[20]; /* MPI TIMINGS */
GRD **_G0, /* BLOCK STRUCTURE MASTER POINTER */
*_H0; /* BLOCK HEAP POINTER */
CTL _C; /* CONTROL PARAMETERS STRUCTURE */
PRG _PR; /* PARTITION REGISTRY */
BLT **_BR; /* BLOCK REGISTRY MASTER POINTER */
BOD *_BO0; /* BODY COMPONENT MASTER POINTER */
TAB *_TABLP,*_TABLT; /* TABULATED EOS MASTER POINTER */
USR _U; /* USER STRUCTURE VARIABLE */
/* SPECIES INDICES */
int I_e,I_H[2],I_D[2],I_He[3],I_C[7],I_N[8],I_O[9],I_Ne[11],I_Mg[13],I_Si[15],
I_Fe[27],I_Hm,I_H2p,I_H2,I_HD,I_CO,I_H2O,I_OH,I_O2;
uflag_t isHe,isH2,isH2O;
/* VARIABLES FOR FINE STRUCTURE LINE COOLING */
double ***RC_TS_He[2],***RC_CS_He[2],***RC_sp_He[2],***RC_sq_He[2],
**RC_dE_He[2],**RC_A_He[2],**RC_CSS_He[2],
***RC_TS_C[6],***RC_CS_C[6],***RC_sp_C[6],***RC_sq_C[6],
**RC_dE_C[6],**RC_A_C[6],**RC_CSS_C[6],
***RC_TS_N[7],***RC_CS_N[7],***RC_sp_N[7],***RC_sq_N[7],
**RC_dE_N[7],**RC_A_N[7],**RC_CSS_N[7],
***RC_TS_O[8],***RC_CS_O[8],***RC_sp_O[8],***RC_sq_O[8],
**RC_dE_O[8],**RC_A_O[8],**RC_CSS_O[8],
***RC_TS_Ne[10],***RC_CS_Ne[10],***RC_sp_Ne[10],***RC_sq_Ne[10],
**RC_dE_Ne[10],**RC_A_Ne[10],**RC_CSS_Ne[10],
***RC_TS_Mg[12],***RC_CS_Mg[12],***RC_sp_Mg[12],***RC_sq_Mg[12],
**RC_dE_Mg[12],**RC_A_Mg[12],**RC_CSS_Mg[12],
***RC_TS_Si[14],***RC_CS_Si[14],***RC_sp_Si[14],***RC_sq_Si[14],
**RC_dE_Si[14],**RC_A_Si[14],**RC_CSS_Si[14],
***RC_TS_Fe[26],***RC_CS_Fe[26],***RC_sp_Fe[26],***RC_sq_Fe[26],
**RC_dE_Fe[26],**RC_A_Fe[26],**RC_CSS_Fe[26];
int *RC_W_He[2],*RC_W_C[6],*RC_W_N[7],*RC_W_O[8],*RC_W_Ne[10],*RC_W_Mg[12],
*RC_W_Si[14],*RC_W_Fe[26];
uflag_t **RC_nT_He[2],**RC_ttype_He[2],**RC_nT_C[6],**RC_ttype_C[6],
**RC_nT_N[7],**RC_ttype_N[7],**RC_nT_O[8],**RC_ttype_O[8],
**RC_nT_Ne[10],**RC_ttype_Ne[10],**RC_nT_Mg[12],**RC_ttype_Mg[12],
**RC_nT_Si[14],**RC_ttype_Si[14],**RC_nT_Fe[26],**RC_ttype_Fe[26];
/* THERMAL PROCESSES TAGS */
double TP_L_BREMSSTRAHLUNG,TP_L_H,TP_L_D,TP_L_He,TP_L_C[6],TP_L_N[7],TP_L_O[8],
TP_L_Ne[10],TP_L_Mg[12],TP_L_Si[14],TP_L_Fe[26],TP_L_H2[4],TP_L_HD,
TP_L_CR,TP_L_CO,TP_L_H2O,TP_L_OH;
/*############################################################################*/
......
......@@ -365,18 +365,19 @@ typedef struct /* NCCM WORKLOAD CONTAINER */
#include <User.h> /* USER-SPECIFIC STRUCT TYPES & MACROS -------------------- */
/* PUBLIC VARIABLES --------------------------------------------------------- */
int _RANK, /* RANK OF LOCAL THREAD */
_TASKS, /* NUMBER OF THREADS */
_CONTAINER; /* NUMBER OF DATA CONTAINER */
char _IODIR[BUFS]; /* BASIC IO DIRECTORY */
FILE *_FLOG; /* LOG FILE POINTER */
double _TIMINGS[20]; /* MPI TIMINGS */
GRD **_G0, /* BLOCK STRUCTURE MASTER POINTER */
*_H0; /* BLOCK HEAP POINTER */
CTL _C; /* CONTROL PARAMETERS STRUCTURE */
PRG _PR; /* PARTITION REGISTRY */
BLT **_BR; /* BLOCK REGISTRY MASTER POINTER */
BOD *_BO0; /* BODY COMPONENT MASTER POINTER */
TAB *_TABLP,*_TABLT; /* TABULATED EOS MASTER POINTER */
/* GLOBAL VARIABLES --------------------------------------------------------- */
extern int _RANK, /* RANK OF LOCAL THREAD */
_TASKS, /* NUMBER OF THREADS */
_CONTAINER; /* NUMBER OF DATA CONTAINER */
extern char _IODIR[BUFS]; /* BASIC IO DIRECTORY */
extern FILE *_FLOG; /* LOG FILE POINTER */
extern double _TIMINGS[20]; /* MPI TIMINGS */
extern GRD **_G0, /* BLOCK STRUCTURE MASTER POINTER */
*_H0; /* BLOCK HEAP POINTER */
extern CTL _C; /* CONTROL PARAMETERS STRUCTURE */
extern PRG _PR; /* PARTITION REGISTRY */
extern BLT **_BR; /* BLOCK REGISTRY MASTER POINTER */
extern BOD *_BO0; /* BODY COMPONENT MASTER POINTER */
extern TAB *_TABLP,*_TABLT; /* TABULATED EOS MASTER POINTER */
extern USR _U; /* USER STRUCTURE VARIABLE */
......@@ -29,5 +29,3 @@ typedef struct user
double Xe[10];
} USR;
USR _U; /* GLOBAL AVAILABILITY / STORED IN SNAPSHOT */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment