Commit a5713a67 authored by Jean-Eric Campagne's avatar Jean-Eric Campagne
Browse files

(JEC) 8/5/15 first attempt (simple) check of directory/config

parent f9d1d033
......@@ -13,7 +13,7 @@ CFLAGS = -Wall -Wpointer-arith -Wmissing-prototypes -O -g -fPIC
CXX = g++
# Flag de warning -Wsynth NON inclus par defaut (04/2007)
###CXXFLAGS = -Wall -Wpointer-arith -O -g -fPIC CNFPHFLF
CXXFLAGS = -Wall -Wpointer-arith -O3 -g -fPIC -fopenmp -fno-common -Wall -std=c++11
CXXFLAGS = -Wall -Wpointer-arith -O3 -g -fPIC -fopenmp -fno-common -Wall
# flags specifiques pour templates repository...
CXXTEMPFLG =
# Compilo fortran
......
ifndef MACH
MACH := $(shell uname)
endif
ifeq ($(MACH), Linux)
include Linux_g++_make.inc
ifeq ($(BLAS), 1)
# ===== OpenBLAS ========
BLASYES = -DCBLAS
BLASDIR = /opt/OpenBLAS
BLASDIR = /exp/opera/kits/OpenBLAS
BLASINC = -I$(BLASDIR)/include
BLASLIB = -L$(BLASDIR)/lib
BLASLIBN = $(BLASLIB) -lopenblas
endif
else
else
include Darwin_g++_omp_make.inc
# ===== nNative BLAS (Darwin)
BLASYES = -DCBLAS -flax-vector-conversions
......@@ -20,7 +25,7 @@ endif
# ===== Libsharp =====
#SHARPDIR = <yourdir>/libsharp-code/auto/
SHARPDIR = /Users/campagne/Travail/kits/libsharp-code/auto
SHARPDIR = /exp/opera/kits/libsharp-code/auto
SHARPLIB = $(SHARPDIR)/lib
SHARPINC = -I$(SHARPDIR)/include
SHARPLIBN = -L$(SHARPLIB) -lsharp -lc_utils -lfftpack
......@@ -34,14 +39,14 @@ INCL = ./include/LagSHT/
# Define our target list
.PHONY: default
default: makedir lib lagsht_testsuite
default: confcheck makedir lib lagsht_testsuite
.PHONY: all
all : makedir lib lagsht_testsuite
all : confcheck makedir lib lagsht_testsuite
.PHONY: check
check : makedir lagsht_testsuite
check : confcheck makedir lagsht_testsuite
$(EXE)lagsht_testsuite -t 1 -n 1024
@paste lagWeights-1024-Func.txt $(DATA)lagWeights-1024-Func.txt.TEST | awk '{x=($$1-$$2)/$$2;y=(x<0?-x:x);if(max==""){max=y};if(y>max){max=y};sum+=(x<0?-x:x)} END {print "Weight Test: Max Err. ",max,"Abs. Relativ. Err =",sum/NR}'
@paste lagNodes-1024-Func.txt $(DATA)lagNodes-1024-Func.txt.TEST | awk '{x=($$1-$$2)/$$2;y=(x<0?-x:x);if(max==""){max=y};if(y>max){max=y};sum+=(x<0?-x:x)} END {print "Nodes Test: Max Err. ",max,"Abs. Relativ. Err =",sum/NR}'
......@@ -53,6 +58,20 @@ makedir :
mkdir -p $(EXE)
mkdir -p $(LIB)
confcheck :
echo "Config check mach=<$(MACH)> sharp=<$(SHARPDIR)> blas=<$(BLASDIR)>"
ifeq ($(BLAS), 1)
@if [ ! -d "$(BLASDIR)" ]; then \
echo "BLAS directory not defined properly!"; \
exit 1; \
fi ;
endif
@if [ ! -d "$(SHARPDIR)" ]; then \
echo "SHARP directory not defined properly!"; \
exit 1; \
fi ;
.PHONY: tidy
tidy :
rm *~
......@@ -103,7 +122,7 @@ LDFLAGS += $(SHARPLIBN) $(BLASLIBN) -lm
#C++ rule for compiling
$(OBJ)%.o: $(SRC)%.cc $(CXXHDR)
echo "compile... $<",
echo "compile... $<"
$(CXXCOMPILE) $< -o $@
######################
......
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