Commit f4972339 authored by Marco Govoni's avatar Marco Govoni
Browse files

Added test folder.

parent 5f823c35
......@@ -27,13 +27,6 @@ west_build:
- git describe
- make
- ls ../bin
# - mpif90 hello.f90 -o hello.x
# - ls
# - mpirun -np 28 --allow-run-as-root hello.x
# - cd West
# - git checkout $CI_COMMIT_SHA
# - cd test
# - cd make
west_test_gamma:
tags: [rcc,docker,node-01]
......@@ -53,10 +46,5 @@ west_test_gamma:
- git clone -b $CI_COMMIT_REF_NAME $CI_REPOSITORY_URL West
- cd West
- make
# - mpif90 hello.f90 -o hello.x
# - ls
# - mpirun -np 28 --allow-run-as-root hello.x
# - cd West
# - git checkout $CI_COMMIT_SHA
# - cd test
# - cd make
- cd test
- make NP=28 NI=1 NT=1
# Makefile
#
default: all
all: \
test001_all \
test002_all
run: \
test001_run \
test002_run
clean: \
test001_clean \
test002_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 " "
program hello
include 'mpif.h'
integer rank, size, ierror, tag, status(MPI_STATUS_SIZE)
call MPI_INIT(ierror)
call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierror)
call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierror)
print*, 'node', rank, ': Hello world'
call MPI_FINALIZE(ierror)
end
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
# Makefile
include ../maketest.inc
default: 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
- ${PARA_PREFIX} ${BINDIR}/wstat.x -nimage ${NIMAGE} -i wstat.in
- ${PARA_PREFIX} ${BINDIR}/wfreq.x -nimage ${NIMAGE} -i wfreq.in
clean:
- /bin/rm -rf *out *in *upf *save >& /dev/null
title:
@echo " "
@echo "###############"
@echo "### test001 ###"
@echo "###############"
@echo " "
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