Skip to content

Commit

Permalink
moved the initialisation of global variables to read_input.l
Browse files Browse the repository at this point in the history
  • Loading branch information
urbach committed Apr 4, 2014
1 parent 58f90c2 commit 14bd514
Show file tree
Hide file tree
Showing 21 changed files with 2 additions and 49 deletions.
2 changes: 0 additions & 2 deletions LapH_ev.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
*
*******************************************************************************/

#define MAIN_PROGRAM

#ifdef HAVE_CONFIG_H
# include "config.h"
#else
Expand Down
1 change: 0 additions & 1 deletion benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*
*******************************************************************************/

#define MAIN_PROGRAM
#ifdef HAVE_CONFIG_H
# include<config.h>
#endif
Expand Down
10 changes: 0 additions & 10 deletions check_locallity.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@
* You should have received a copy of the GNU General Public License
* along with tmLQCD. If not, see <http://www.gnu.org/licenses/>.
***********************************************************************/
/*******************************************************************************
*
* Hybrid-Monte-Carlo for twisted mass QCD
*
* Author: Carsten Urbach
* [email protected]
*
*******************************************************************************/

#define MAIN_PROGRAM

#include"lime.h"
#ifdef HAVE_CONFIG_H
Expand Down
1 change: 0 additions & 1 deletion gen_sources.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
* [email protected]
*
*******************************************************************************/
#define MAIN_PROGRAM

#include "lime.h"
#ifdef HAVE_CONFIG_H
Expand Down
5 changes: 1 addition & 4 deletions global.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
/* size of the extra_masses array for operators using the CGMMS solver */
#define MAX_EXTRA_MASSES 30

#if defined MAIN_PROGRAM
#if defined INIT_GLOBALS
# define EXTERN
#else
# define EXTERN extern
Expand Down Expand Up @@ -256,8 +256,5 @@ EXTERN int ** g_idn3d;

void fatal_error(char const *error, char const *function);

#ifdef MAIN_PROGRAM
#endif

#endif

3 changes: 0 additions & 3 deletions hmc_tm.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
* Author: Carsten Urbach
* [email protected]
*
* Modified by Jenifer Gonzalez Lopez for the Schroedinger Functional
*
*******************************************************************************/
#define MAIN_PROGRAM
#include "lime.h"
#if HAVE_CONFIG_H
#include<config.h>
Expand Down
2 changes: 0 additions & 2 deletions hopping_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
*
*******************************************************************************/

#define MAIN_PROGRAM

#ifdef HAVE_CONFIG_H
# include<config.h>
#endif
Expand Down
2 changes: 0 additions & 2 deletions invert.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
*
*******************************************************************************/

#define MAIN_PROGRAM

#include"lime.h"
#ifdef HAVE_CONFIG_H
# include<config.h>
Expand Down
1 change: 1 addition & 0 deletions read_input.l
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ EQL {SPC}*={SPC}*
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#define INIT_GLOBALS
#include"global.h"
#include"read_input.h"
#include"default_input_values.h"
Expand Down
3 changes: 0 additions & 3 deletions su3adj.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,4 @@ __asm__ __volatile__ ("movapd %%xmm4, %0 \n\t" \
(res).d8-=(c)*(in).d8;
#endif

#ifdef MAIN_PROGRAM
#endif

#endif
2 changes: 0 additions & 2 deletions test/check_overlap.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
*
*******************************************************************************/

#define MAIN_PROGRAM

#include"lime.h"
#ifdef HAVE_CONFIG_H
# include<config.h>
Expand Down
2 changes: 0 additions & 2 deletions test/test_eigenvalues.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
*
*******************************************************************************/

#define MAIN_PROGRAM

#ifdef HAVE_CONFIG_H
# include<config.h>
#endif
Expand Down
2 changes: 0 additions & 2 deletions test_lemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
*
*******************************************************************************/

#define MAIN_PROGRAM

#include <lime.h>
#ifdef HAVE_CONFIG_H
# include<config.h>
Expand Down
2 changes: 0 additions & 2 deletions tests/test_buffers.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define MAIN_PROGRAM

#include <global.h>
#include <config.h>
Expand Down Expand Up @@ -32,5 +31,4 @@ int main(int argc,char *argv[]){
return 0;
}

#undef MAIN_PROGRAM

2 changes: 0 additions & 2 deletions tests/test_clover.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define MAIN_PROGRAM

#include "../global.h"
#include "test_clover_six_invert.h"
Expand All @@ -14,4 +13,3 @@ int main(int argc,char *argv[]){
return 0;
}

#undef MAIN_PROGRAM
2 changes: 0 additions & 2 deletions tests/test_linalg.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define MAIN_PROGRAM

#if HAVE_CONFIG_H
#include<config.h>
Expand All @@ -17,4 +16,3 @@ int main(int argc,char *argv[]){
return 0;
}

#undef MAIN_PROGRAM
2 changes: 0 additions & 2 deletions tests/test_qpx.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define MAIN_PROGRAM

#include "test_qpx_algebra.h"

Expand All @@ -13,4 +12,3 @@ int main(int argc,char *argv[]){
return 0;
}

#undef MAIN_PROGRAM
2 changes: 0 additions & 2 deletions tests/test_rat.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define MAIN_PROGRAM

#if HAVE_CONFIG_H
#include<config.h>
Expand All @@ -17,6 +16,5 @@ int main(int argc,char *argv[]){
return 0;
}

#undef MAIN_PROGRAM


2 changes: 0 additions & 2 deletions tests/test_sample.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define MAIN_PROGRAM

#include "test_sample_ts1.h"
#include "test_sample_ts2.h"
Expand All @@ -16,5 +15,4 @@ int main(int argc, char *argv[]) {
return 0;
}

#undef MAIN_PROGRAM

2 changes: 0 additions & 2 deletions tests/test_su3.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define MAIN_PROGRAM

#include "test_su3_algebra.h"

Expand All @@ -13,5 +12,4 @@ int main(int argc,char *argv[]){
return 0;
}

#undef MAIN_PROGRAM

1 change: 0 additions & 1 deletion wrapper/lib_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#ifdef OMP
# include <omp.h>
#endif
#define MAIN_PROGRAM
#include "global.h"
#include "git_hash.h"
#include "getopt.h"
Expand Down

0 comments on commit 14bd514

Please sign in to comment.