diff options
author | Maurizio D'Addona | 2020-12-10 11:30:02 +0100 |
---|---|---|
committer | Maurizio D'Addona | 2020-12-10 11:30:02 +0100 |
commit | 09c74d4138b8a266e51bbd47d09fa291766e3486 (patch) | |
tree | cf702c92e0706e59b0e13ccd1046fecc65bd6409 | |
parent | ce00e05c4e882930e48becf78ad3c2f0425339c5 (diff) | |
download | aur-09c74d4138b8a266e51bbd47d09fa291766e3486.tar.gz |
Adds more tests and fixes CFLAGS
-rwxr-xr-x | .SRCINFO | 8 | ||||
-rwxr-xr-x | PKGBUILD | 52 |
2 files changed, 49 insertions, 11 deletions
@@ -1,7 +1,7 @@ pkgbase = calculix pkgdesc = CalculiX: 3D finite element solver and post-processor (executables) pkgver = 2.17 - pkgrel = 2 + pkgrel = 3 url = http://www.calculix.de/ arch = i686 arch = x86_64 @@ -22,10 +22,16 @@ pkgbase = calculix options = !buildflags source = http://www.dhondt.de/ccx_2.17.src.tar.bz2 source = http://www.dhondt.de/ccx_2.17.test.tar.bz2 + source = http://www.dhondt.de/ccx_2.17.fluidtest.tar.bz2 + source = http://www.dhondt.de/ccx_2.17.fluidtestfem.tar.bz2 + source = http://www.dhondt.de/ccx_2.17.structest.tar.bz2 source = http://www.dhondt.de/cgx_2.17.all.tar.bz2 source = calculix_2.17_archlinux.patch sha256sums = ca708ad4aa729d9f84a9faba343c1bcc0b7cc84ed372616ebb55c8e6fa8f6e50 sha256sums = 798f94e536197bb10a74bae096f2a29a5111239020e7d10f93e1ad3d90c370cf + sha256sums = 5126de5f8543cb4f4c3355612d4df41541b278c3e505e7f2191fd90190eac4f7 + sha256sums = dab62ed58b1e5c1035360b59942593bf952af151fb9c9d32701cc028ee1683e3 + sha256sums = e7cd0e71a9764955bf5096c849e8bb818d35040e8c4909b2168ce4d29b41d8be sha256sums = 01b32864714d7ed7c760567e3a04077f3e41fe171d1804b305c96c344b0e4d2e sha256sums = d6bbe96457d6a773958a9eb5a783ae630c8c2ea38ebaa0c6a799f3384e85d84f @@ -7,7 +7,7 @@ pkgname=calculix pkgver=2.17 -pkgrel=2 +pkgrel=3 pkgdesc="CalculiX: 3D finite element solver and post-processor (executables)" arch=('i686' 'x86_64') options=(!makeflags !buildflags) @@ -18,16 +18,19 @@ optdepends=('calculix-doc: documentation and examples') makedepends=('gcc-fortran' 'perl') checkdepends=('perl') -# NOTE: in the current version of the source tarball, some files are -# missing. I took the files from the previus version. To be removed -# when upstream fixes the issue source=("http://www.dhondt.de/ccx_${pkgver}.src.tar.bz2" "http://www.dhondt.de/ccx_${pkgver}.test.tar.bz2" + "http://www.dhondt.de/ccx_${pkgver}.fluidtest.tar.bz2" + "http://www.dhondt.de/ccx_${pkgver}.fluidtestfem.tar.bz2" + "http://www.dhondt.de/ccx_${pkgver}.structest.tar.bz2" "http://www.dhondt.de/cgx_${pkgver}.all.tar.bz2" "calculix_${pkgver}_archlinux.patch") sha256sums=('ca708ad4aa729d9f84a9faba343c1bcc0b7cc84ed372616ebb55c8e6fa8f6e50' '798f94e536197bb10a74bae096f2a29a5111239020e7d10f93e1ad3d90c370cf' + '5126de5f8543cb4f4c3355612d4df41541b278c3e505e7f2191fd90190eac4f7' + 'dab62ed58b1e5c1035360b59942593bf952af151fb9c9d32701cc028ee1683e3' + 'e7cd0e71a9764955bf5096c849e8bb818d35040e8c4909b2168ce4d29b41d8be' '01b32864714d7ed7c760567e3a04077f3e41fe171d1804b305c96c344b0e4d2e' 'd6bbe96457d6a773958a9eb5a783ae630c8c2ea38ebaa0c6a799f3384e85d84f') @@ -47,7 +50,7 @@ build() msg2 "Building solver..." cd "${srcdir}/CalculiX/ccx_${pkgver}/src" - make CFLAGS='-Wall -O2 -fopenmp -I /usr/include/spooles -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE -DNETWORKOUT -DUSE_MT=1' FFLAGS='-Wall -O2 -fallow-argument-mismatch' LIBS='-lpthread -lm -lc -lspooles -larpack -lblas -llapack' + make CFLAGS="${CFLAGS} -Wall -O2 -fopenmp -I /usr/include/spooles -DARCH=\"Linux\" -DSPOOLES -DARPACK -DMATRIXSTORAGE -DNETWORKOUT -DUSE_MT=1" FFLAGS='-Wall -O2 -fopenmp -fpic -fallow-argument-mismatch' LIBS='-lpthread -lm -lc -lspooles -larpack -lblas -llapack -lgomp' msg2 "Building gui..." cd "${srcdir}/CalculiX/cgx_${pkgver}/src" @@ -78,6 +81,8 @@ check() msg "Testing solver..." cd ${srcdir}/CalculiX/ccx_${pkgver}/test + error_status=0 + start_time="$(date -u +%s)" for test_name in "${tests[@]}" ; do ref_file=${test_name}.dat.ref dat_file=${test_name}.dat @@ -94,26 +99,53 @@ check() if [ ! -f ${dat_file} ]; then warning "${dat_file} does not exist" - false + error_status=1 fi sum1="$(wc -l ${dat_file})" sum2="$(wc -l ${ref_file})" if [ ${sum1%* *} != ${sum2%* *} ]; then warning "The data file generated by ccx is not valid" - false + error_status=1 fi if grep "NaN" ${dat_file} ; then - warning "${dat_file} contains NaN!" - false + warning "${dat_file} contains NaNs!" + error_status=1 fi if ! ./datcheck.pl ${test_name} ; then warning "Result is inconsistent with reference data!" - false + error_status=1 fi done + + cd ${srcdir}/CalculiX/ccx_${pkgver}/fluidtest + for test_name in ./*.inp ; do + msg2 "testing ${test_name}" + OMP_NUM_THREADS=4 ../src/ccx_${pkgver} ${test_name} &> ${log_file} ||\ + error_status=1 warning "check $(pwd)/${log_file}" + done + + cd ${srcdir}/CalculiX/ccx_${pkgver}/fluidtestfem + for test_name in ./*.inp ; do + msg2 "testing ${test_name}" + OMP_NUM_THREADS=4 ../src/ccx_${pkgver} ${test_name} &> ${log_file} ||\ + error_status=1 warning "check $(pwd)/${log_file}" + done + + cd ${srcdir}/CalculiX/ccx_${pkgver}/structest + for test_name in ./*.inp ; do + msg2 "testing ${test_name}" + OMP_NUM_THREADS=4 ../src/ccx_${pkgver} ${test_name} &> ${log_file} ||\ + error_status=1 warning "check $(pwd)/${log_file}" + done + end_time="$(date -u +%s)" + elapsed="$(($end_time-$start_time))" + + msg "Total of $elapsed seconds elapsed for tesing" + + return $error_status } package() |