Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
west-public
West
Commits
bef7387b
Commit
bef7387b
authored
Jul 20, 2018
by
Marco Govoni
Browse files
Simplified Makefile
parent
52184c93
Changes
6
Hide whitespace changes
Inline
Side-by-side
test-suite/Makefile
View file @
bef7387b
# Makefile
#
testdirs
:=
test001 test002 test003 test003
default
:
title all
all
:
\
test001_all
\
test002_all
\
test003_all
\
test004_all
clean
:
\
test001_clean
\
test002_clean
\
test003_clean
\
test004_clean
test001_all
:
if
test
-d
test001
;
then
\
(
cd
test001
;
if
test
"
$(MAKE)
"
=
""
;
then
make
$(MFLAGS)
all
;
\
else
$(MAKE)
$(MFLAGS)
all
;
fi
)
;
fi
test001_clean
:
if
test
-d
test001
;
then
\
(
cd
test001
;
if
test
"
$(MAKE)
"
=
""
;
then
make clean
;
\
else
$(MAKE)
clean
;
fi
)
;
fi
test002_all
:
if
test
-d
test002
;
then
\
(
cd
test002
;
if
test
"
$(MAKE)
"
=
""
;
then
make
$(MFLAGS)
all
;
\
else
$(MAKE)
$(MFLAGS)
all
;
fi
)
;
fi
test002_clean
:
if
test
-d
test002
;
then
\
(
cd
test002
;
if
test
"
$(MAKE)
"
=
""
;
then
make clean
;
\
else
$(MAKE)
clean
;
fi
)
;
fi
test003_all
:
if
test
-d
test003
;
then
\
(
cd
test003
;
if
test
"
$(MAKE)
"
=
""
;
then
make
$(MFLAGS)
all
;
\
else
$(MAKE)
$(MFLAGS)
all
;
fi
)
;
fi
test003_clean
:
if
test
-d
test003
;
then
\
(
cd
test003
;
if
test
"
$(MAKE)
"
=
""
;
then
make clean
;
\
else
$(MAKE)
clean
;
fi
)
;
fi
test004_all
:
if
test
-d
test004
;
then
\
(
cd
test004
;
if
test
"
$(MAKE)
"
=
""
;
then
make
$(MFLAGS)
all
;
\
else
$(MAKE)
$(MFLAGS)
all
;
fi
)
;
fi
test004_clean
:
if
test
-d
test004
;
then
\
(
cd
test004
;
if
test
"
$(MAKE)
"
=
""
;
then
make clean
;
\
else
$(MAKE)
clean
;
fi
)
;
fi
default
:
title all
all
:
for
d
in
$(testdirs)
;
do
(
cd
$$
d
;
$(MAKE)
all
)
;
done
clean
:
for
d
in
$(testdirs)
;
do
(
cd
$$
d
;
$(MAKE)
clean
)
;
done
title
:
@
echo
" "
...
...
@@ -58,4 +15,3 @@ title :
@
echo
"################"
@
echo
" "
test-suite/README
0 → 100644
View file @
bef7387b
WEST test-suite
1) Edit the file maketest.inc
2) make
test-suite/maketest.inc
View file @
bef7387b
#
# Parallel execution knobs
#
NP
=
2
NI
=
1
NT
=
1
NP
=
2
# Number of MPI processes
NI
=
1
# NUmber of images
NT
=
1
# Number of OPENMP threads
#
# Commands needed by the scripts
#
# Directory where the executables (*.x) are located
BINDIR
=
..
/../../
bin
# How to run in a parallel executable with MPI
PARA_PREFIX
=
mpirun
-
np
$
{
NP
}
--
allow
-
run
-
as
-
root
# How to download files
WGET
=
wget
-
N
-
q
###### DO NOT TOUCH BELOW ######
NIMAGE
=
$
{
NI
}
OMP_NUM_THREADS
=
$
{
NT
}
PARA_PREFIX
=
mpirun
-
np
$
{
NP
}
--
allow
-
run
-
as
-
root
WGET
=
wget
-
N
-
q
BINDIR
=
..
/../../
bin
tests/Makefile
deleted
100644 → 0
View file @
52184c93
# Makefile
#
default
:
title all
all
:
\
test001_all
run
:
\
test001_run
clean
:
\
test001_clean
test001_all
:
if
test
-d
test001
;
then
\
(
cd
test001
;
if
test
"
$(MAKE)
"
=
""
;
then
make
$(MFLAGS)
all
;
\
else
$(MAKE)
$(MFLAGS)
all
;
fi
)
;
fi
test001_run
:
if
test
-d
test001
;
then
\
(
cd
test001
;
if
test
"
$(MAKE)
"
=
""
;
then
make
$(MFLAGS)
run
;
\
else
$(MAKE)
$(MFLAGS)
run
;
fi
)
;
fi
test001_clean
:
if
test
-d
test001
;
then
\
(
cd
test001
;
if
test
"
$(MAKE)
"
=
""
;
then
make clean
;
\
else
$(MAKE)
clean
;
fi
)
;
fi
title
:
@
echo
" "
@
echo
"#############"
@
echo
"## Testing ##"
@
echo
"#############"
@
echo
" "
tests/maketest.inc
deleted
100644 → 0
View file @
52184c93
NP
=
2
NI
=
1
NT
=
1
NIMAGE
=
$
{
NI
}
OMP_NUM_THREADS
=
$
{
NT
}
PARA_PREFIX
=
mpirun
-
np
$
{
NP
}
--
allow
-
run
-
as
-
root
WGET
=
wget
BINDIR
=
..
/../../
bin
tests/test001/Makefile
deleted
100644 → 0
View file @
52184c93
# Makefile
include
../maketest.inc
default
:
title all
all
:
prepare_input run
prepare_input
:
-
wget
-N
-q
http://www.quantum-simulation.org/potentials/sg15_oncv/upf/H_ONCV_PBE-1.0.upf
-
wget
-N
-q
http://www.quantum-simulation.org/potentials/sg15_oncv/upf/Si_ONCV_PBE-1.1.upf
-
wget
-N
-q
http://www.west-code.org/doc/training/silane/pw.in
-
wget
-N
-q
http://www.west-code.org/doc/training/silane/wstat.in
-
wget
-N
-q
http://www.west-code.org/doc/training/silane/wfreq.in
run
:
-
${PARA_PREFIX}
${BINDIR}
/pw.x
-i
pw.in
>
pw.out
-
tail
-5
pw.out
-
${PARA_PREFIX}
${BINDIR}
/wstat.x
-nimage
${NIMAGE}
-i
wstat.in
>
wstat.out
-
tail
-5
wstat.out
-
${PARA_PREFIX}
${BINDIR}
/wfreq.x
-nimage
${NIMAGE}
-i
wfreq.in
>
wfreq.out
-
tail
-5
wfreq.out
clean
:
-
/bin/rm
-rf
*
out
*in
*
upf
*
save
>
& /dev/null
title
:
@
echo
" "
@
echo
"###############"
@
echo
"### test001 ###"
@
echo
"###############"
@
echo
" "
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