Skip to content
Snippets Groups Projects
Commit d3f2e526 authored by Claudio Gheller's avatar Claudio Gheller
Browse files

external global veriables problem fixed

parent d17c04c3
No related branches found
No related tags found
No related merge requests found
......@@ -122,7 +122,7 @@ CFLAGS = -std=c99 -fopenmp $(OPTIMIZE) $(GSL_INCL)
$(EXEC) : $(OBJS)
$(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $(EXEC)
ctags -R src/*.[ch]
#ctags -R src/*.[ch]
$(OBJS) : $(INCL)
......
File deleted
#include "common.h"
struct cosmology Cosmo;
double (*t2a)(double);
double (*a2t)(double);
void set_cosmology(int cosmology)
{
......
......@@ -2,7 +2,7 @@ void set_cosmology(int);
double NoComov(float);
struct cosmology {
extern struct cosmology {
char name[10]; /* Identifier */
float h; /* hubble parameter */
float Omega_b; /* baryon overdensity */
......@@ -13,11 +13,11 @@ struct cosmology {
double rho0; /* critical density */
float sigma8; /* galaxy fluctuation amplitude */
float t0; /* age of the universe */
} Cosmo, WMAP3,null,deSitter;
}Cosmo, WMAP3,null,deSitter;
/* Time conversions */
double (*a2t)(double);
double (*t2a)(double);
extern double (*a2t)(double);
extern double (*t2a)(double);
double a2t_deSitter(double);
double t2a_deSitter(double);
......
......@@ -13,6 +13,8 @@
#define FLOAT sizeof(float)
#define DBL sizeof(double)
struct units Comv2phys;
#ifdef I_GADGET2
int4bytes blksize, swap = 0;
......
......@@ -10,6 +10,10 @@
int id[MAXTAGS] = {0};
void *addr[MAXTAGS] = {NULL};
char tag[MAXTAGS][50],comment[MAXTAGS][50];
struct units Unit;
char comment[MAXTAGS][50];
void *addr[MAXTAGS];
int id[MAXTAGS];
/* Reads a number of tags from an ascii file
* the comment sign is %
......
......@@ -17,8 +17,8 @@ extern void write_spectra();
extern void read_spectra();
/* Parameter File Tags, also used to write fits header */
int id[MAXTAGS];
void *addr[MAXTAGS];
char tag[MAXTAGS][50],comment[MAXTAGS][50];
extern int id[MAXTAGS];
extern void *addr[MAXTAGS];
extern char tag[MAXTAGS][50],comment[MAXTAGS][50];
int Find_files(char *);
/* Timings & Benchmarking */
#include "common.h"
struct Timings Cpu;
enum TimeMarks mark;
char TimeMarkDescr[CPU_LASTENTRY][20] = {
"Solver ",
......
......@@ -5,13 +5,13 @@
* track of what is measured.
*/
enum TimeMarks {
extern enum TimeMarks {
CPU_SOLVER,
CPU_MAIN,
CPU_MAIN,
CPU_LASTENTRY /* Keep this entry at the end */
} mark;
struct Timings {
extern struct Timings {
double Zero; /* Absolute Zeropoint */
double Total[CPU_LASTENTRY]; /* Total Time for mark */
double Start[CPU_LASTENTRY]; /* Start time for mark */
......@@ -22,3 +22,4 @@ void finish_timing();
void start_timing(enum TimeMarks mark);
void stop_timing(enum TimeMarks mark);
double get_current_time();
/* Code Units */
void set_units();
struct units { /* For unit Conversion. */
extern struct units { /* For unit Conversion. */
double Length;
double Mass;
double Vel;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment