Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Jean-Eric Campagne
LagSHT
Commits
a5713a67
Commit
a5713a67
authored
May 08, 2015
by
Jean-Eric Campagne
Browse files
(JEC) 8/5/15 first attempt (simple) check of directory/config
parent
f9d1d033
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
Linux_g++_make.inc
Linux_g++_make.inc
+1
-1
Makefile
Makefile
+26
-7
No files found.
Linux_g++_make.inc
View file @
a5713a67
...
...
@@ -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
...
...
Makefile
View file @
a5713a67
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
$@
######################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment