From 536e2d4fab3cb8deb3e0668918a9fd7b932770701471af8a61a0d72de03735c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Tue, 23 Feb 2021 19:02:53 +0000 Subject: [PATCH] Accepting request 874675 from home:StefanBruens:branches:science - update to 2.17: Too many changes to list, a full list of changes is available in the included LOGFILE. - Rebase patches, renamed ccx-2.16-spooles-dynamic.patch -> 0001-Fixup-spooles-include-dir.patch - Add 0001-Add-missing-argument-for-inputerror-function-call.patch - Add 0001-Use-interface-for-cubtri-callback-function.patch - Enable check section OBS-URL: https://build.opensuse.org/request/show/874675 OBS-URL: https://build.opensuse.org/package/show/science/ccx?expand=0&rev=11 --- ...rgument-for-inputerror-function-call.patch | 25 ++++++ 0001-Fixup-spooles-include-dir.patch | 68 +++++++++++++++++ ...terface-for-cubtri-callback-function.patch | 76 +++++++++++++++++++ ...us-shell-heat-transfer-elements-read.patch | 15 +++- ccx-2.16-build.patch | 17 ++++- ccx-2.16-spooles-dynamic.patch | 37 --------- ccx.changes | 12 +++ ccx.spec | 51 +++++++++---- ccx_2.16.src.tar.bz2 | 3 - ccx_2.16.test.tar.bz2 | 3 - ccx_2.17.src.tar.bz2 | 3 + ccx_2.17.test.tar.bz2 | 3 + 12 files changed, 248 insertions(+), 65 deletions(-) create mode 100644 0001-Add-missing-argument-for-inputerror-function-call.patch create mode 100644 0001-Fixup-spooles-include-dir.patch create mode 100644 0001-Use-interface-for-cubtri-callback-function.patch delete mode 100644 ccx-2.16-spooles-dynamic.patch delete mode 100644 ccx_2.16.src.tar.bz2 delete mode 100644 ccx_2.16.test.tar.bz2 create mode 100644 ccx_2.17.src.tar.bz2 create mode 100644 ccx_2.17.test.tar.bz2 diff --git a/0001-Add-missing-argument-for-inputerror-function-call.patch b/0001-Add-missing-argument-for-inputerror-function-call.patch new file mode 100644 index 0000000..c7a8c3f --- /dev/null +++ b/0001-Add-missing-argument-for-inputerror-function-call.patch @@ -0,0 +1,25 @@ +From 6b2b0cecc1073754c3c11f65f3aa2400d76fb842 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Mon, 22 Feb 2021 23:42:52 +0100 +Subject: [PATCH] Add missing argument for inputerror function call + +--- + src/allocation_rfn.f | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/allocation_rfn.f b/src/allocation_rfn.f +index 5ce50dc..62c3f3a 100644 +--- a/src/allocation_rfn.f ++++ b/src/allocation_rfn.f +@@ -112,7 +112,7 @@ + read(textpart(1)(1:10),'(i10)',iostat=istat) i + if(istat.gt.0) then + call inputerror(inpc,ipoinpc,iline, +- & "*NODE%") ++ & "*NODE%",ier) + exit + endif + nk_=max(nk_,i) +-- +2.30.1 + diff --git a/0001-Fixup-spooles-include-dir.patch b/0001-Fixup-spooles-include-dir.patch new file mode 100644 index 0000000..4a3b8c6 --- /dev/null +++ b/0001-Fixup-spooles-include-dir.patch @@ -0,0 +1,68 @@ +From e551c655e45c8aa84b60a2540a35eecfd4d9cc5f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Thu, 12 Nov 2020 03:59:31 +0100 +Subject: [PATCH] Fixup spooles include dir + +--- + src/cascade.c | 6 +++--- + src/cascadefem.c | 6 +++--- + src/spooles.h | 8 ++++---- + 3 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/src/cascade.c b/src/cascade.c +index 796d5cf..c996f12 100644 +--- a/src/cascade.c ++++ b/src/cascade.c +@@ -21,9 +21,9 @@ + #include + + #ifdef SPOOLES +-#include +-#include +-#include ++#include ++#include ++#include + #endif + + #include "CalculiX.h" +diff --git a/src/cascadefem.c b/src/cascadefem.c +index 308960c..578d4e3 100755 +--- a/src/cascadefem.c ++++ b/src/cascadefem.c +@@ -21,9 +21,9 @@ + #include + + #ifdef SPOOLES +-#include +-#include +-#include ++#include ++#include ++#include + #endif + + #include "CalculiX.h" +diff --git a/src/spooles.h b/src/spooles.h +index 388f1ff..6966215 100755 +--- a/src/spooles.h ++++ b/src/spooles.h +@@ -23,11 +23,11 @@ + */ + + #include +-#include +-#include +-#include ++#include ++#include ++#include + #if USE_MT +-#include ++#include + #endif + + /* increase this for debugging */ +-- +2.30.1 + diff --git a/0001-Use-interface-for-cubtri-callback-function.patch b/0001-Use-interface-for-cubtri-callback-function.patch new file mode 100644 index 0000000..c7ff0dd --- /dev/null +++ b/0001-Use-interface-for-cubtri-callback-function.patch @@ -0,0 +1,76 @@ +From 0f4753160768a89677d8df14b0759a4edce9a966 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Tue, 23 Feb 2021 12:19:31 +0100 +Subject: [PATCH] Use interface for cubtri callback function + +Non-legacy gfortran refuses to compile with an implicit interface for +the callback function. +--- + src/calcview.f | 17 +++++++++++++---- + src/cubtri.f | 9 ++++++++- + 2 files changed, 21 insertions(+), 5 deletions(-) + +diff --git a/src/calcview.f b/src/calcview.f +index 531dbc6..f138bbb 100644 +--- a/src/calcview.f ++++ b/src/calcview.f +@@ -47,12 +47,18 @@ + & xxmid,xqmax,dummy,a(3,3),b(3,3),c(3,3),ddd(3),p31(3), + & xq(3),yq(3),ftij,adview(*),auview(*),dint,dir(3), + & dirloc(3),dist(*),area(*),dd,p21(3),sidemean,r(3,3), +- & fform,pl(2,3),epsabs,epsrel,abserr,q(3,3), ++ & pl(2,3),epsabs,epsrel,abserr,q(3,3), + & rdata(21),factor,argument + ! + c real*8 vertex(3,3),vertexl(2,3),unitvec(3,3) + ! +- external fform ++ interface ++ function fform(x,y,idata,rdata) ++ real*8 :: x,y,rdata(:) ++ integer :: idata(:) ++ real*8 :: fform ++ end function fform ++ end interface + ! + nzsradv(3)=nzsrad + ! +@@ -505,10 +511,13 @@ c & (ddd(k)*ddd(l)) + ! + implicit none + ! +- integer k,l,idata(1) ++ real*8 :: x,y,rdata(:) ++ integer :: idata(:) ++! ++ integer k,l + ! + real*8 pint(3),ddd(3),xn(3),q(3,3), +- & unitvec(3,3),r(3,3),xxn,x,y,porigin(3),rdata(21) ++ & unitvec(3,3),r(3,3),xxn,porigin(3) + ! + ! retrieving common data from field rdata + ! +diff --git a/src/cubtri.f b/src/cubtri.f +index c13aa5b..fc654c7 100644 +--- a/src/cubtri.f ++++ b/src/cubtri.f +@@ -72,7 +72,14 @@ C ERROR TEST BY REMOVING THE IF STATEMENT SHORTLY AFTER STATEMENT + C NUMBER 70. + C + implicit none +- EXTERNAL F,rnderr ++ EXTERNAL rnderr ++ interface ++ real*8 function f(x,y,idata,rdata) ++ real*8 :: x,y,rdata(21) ++ integer :: idata(1) ++ end function f ++ end interface ++ + INTEGER IDATA(1), IER, MCALLS, NCALLS, NW,jkp,i,j,k,l,maxc,maxk, + & mw,nfe + REAL*8 ALFA, ANS, ANSKP, AREA, EPS, ERR, ERRMAX, H, Q1, Q2, R1,R2, +-- +2.30.1 + diff --git a/ccx-2.16-abaqus-shell-heat-transfer-elements-read.patch b/ccx-2.16-abaqus-shell-heat-transfer-elements-read.patch index 1355afc..9c5270a 100644 --- a/ccx-2.16-abaqus-shell-heat-transfer-elements-read.patch +++ b/ccx-2.16-abaqus-shell-heat-transfer-elements-read.patch @@ -1,8 +1,17 @@ -Index: ccx-2.12/CalculiX/ccx_2.12/src/elements.f -=================================================================== +From 9b5e1f4bc119409a9b3edc72b1b7114d5b0b5141 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Thu, 12 Nov 2020 04:01:21 +0100 +Subject: [PATCH] Abaqus shell heat transfer elements read + +--- + src/elements.f | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/elements.f b/src/elements.f +index fa4c25a..1c587f4 100644 --- a/src/elements.f +++ b/src/elements.f -@@ -128,7 +128,8 @@ +@@ -129,7 +129,8 @@ c endif ! ! removing the ABAQUS label for heat transfer elements ! diff --git a/ccx-2.16-build.patch b/ccx-2.16-build.patch index 448b6c5..73f5850 100644 --- a/ccx-2.16-build.patch +++ b/ccx-2.16-build.patch @@ -1,11 +1,20 @@ -Index: ccx-2.12/CalculiX/ccx_2.12/src/Makefile -=================================================================== +From 8a96d2e5de44a7ed1fcaa5b6c283aefe4b866cc3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Thu, 12 Nov 2020 03:54:54 +0100 +Subject: [PATCH] Fixup Makefile + +--- + src/Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index 97ce9d1..c785f62 100755 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,6 @@ -CFLAGS = -Wall -O2 -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE -DNETWORKOUT --FFLAGS = -Wall -O2 +-FFLAGS = -Wall -O2 +CFLAGS += -DARCH="Linux" -DUSE_MT -DSPOOLES -DARPACK -DMATRIXSTORAGE -Wno-unused +FFLAGS += -Wno-unused @@ -21,4 +30,4 @@ Index: ccx-2.12/CalculiX/ccx_2.12/src/Makefile + -larpack -llapack -lblas \ -lpthread -lm -lc - ccx_2.16: $(OCCXMAIN) ccx_2.16.a $(LIBS) + ccx_2.17: $(OCCXMAIN) ccx_2.17.a $(LIBS) diff --git a/ccx-2.16-spooles-dynamic.patch b/ccx-2.16-spooles-dynamic.patch deleted file mode 100644 index 18bbaa9..0000000 --- a/ccx-2.16-spooles-dynamic.patch +++ /dev/null @@ -1,37 +0,0 @@ -Index: b/src/cascade.c -=================================================================== ---- a/src/cascade.c -+++ b/src/cascade.c -@@ -21,9 +21,9 @@ - #include - - #ifdef SPOOLES --#include --#include --#include -+#include -+#include -+#include - #endif - - #include "CalculiX.h" -Index: b/src/spooles.h -=================================================================== ---- a/src/spooles.h -+++ b/src/spooles.h -@@ -23,11 +23,11 @@ - */ - - #include --#include --#include --#include -+#include -+#include -+#include - #if USE_MT --#include -+#include - #endif - - /* increase this for debugging */ diff --git a/ccx.changes b/ccx.changes index eb6220e..ffa9200 100644 --- a/ccx.changes +++ b/ccx.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Feb 23 11:23:36 UTC 2021 - Stefan Brüns + +- update to 2.17: + Too many changes to list, a full list of changes is + available in the included LOGFILE. +- Rebase patches, renamed ccx-2.16-spooles-dynamic.patch + -> 0001-Fixup-spooles-include-dir.patch +- Add 0001-Add-missing-argument-for-inputerror-function-call.patch +- Add 0001-Use-interface-for-cubtri-callback-function.patch +- Enable check section + ------------------------------------------------------------------- Thu Nov 28 13:07:58 UTC 2019 - Stefan Brüns diff --git a/ccx.spec b/ccx.spec index c6126f9..095d149 100644 --- a/ccx.spec +++ b/ccx.spec @@ -1,7 +1,7 @@ # # spec file for package ccx # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: ccx -Version: 2.16 +Version: 2.17 Release: 0 Summary: An open source finite element package License: GPL-2.0-only AND BSD-3-Clause AND SUSE-Public-Domain @@ -28,9 +28,10 @@ Source1: http://www.dhondt.de/ccx_%{version}.test.tar.bz2 Source2: ccx-rpmlintrc # PATCH-FIX-OPENSUSE -- pass global optflags Patch0: ccx-2.16-build.patch -Patch1: ccx-2.16-spooles-dynamic.patch +Patch1: 0001-Fixup-spooles-include-dir.patch Patch2: ccx-2.16-abaqus-shell-heat-transfer-elements-read.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Patch3: 0001-Add-missing-argument-for-inputerror-function-call.patch +Patch4: 0001-Use-interface-for-cubtri-callback-function.patch BuildRequires: arpack-ng-devel BuildRequires: fdupes BuildRequires: gcc-fortran @@ -64,18 +65,17 @@ to check your installation. mv CalculiX/ccx_%{version}/{src,test} ./ rmdir -p CalculiX/ccx_%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 +%autopatch -p1 + +# Make reproducible +sed -i 's@./date.pl; *@@' src/Makefile %build -# use rpm's proposal for CFLAGS -export GLOBAL_OFLAGS="%{optflags} -pthread" - -# and now build calculix cd src -make %{?_smp_mflags} +export CFLAGS="%{optflags}" +export FFLAGS="%{optflags}" +%make_build %install mkdir -p %{buildroot}/%{_bindir} @@ -97,16 +97,37 @@ chmod 444 src/BUGS src/LOGBOOK src/README.INSTALL src/TODO %fdupes %{buildroot}/%{_datadir}/%{name}-examples-%{version} %check -# TODO +cd test +# beamread* depends on beamwrite* +# beamprand is random +# beamptied{5,6} have nondeterministic order of eigenvalues +for f in beamread*.inp beamprand.inp beamptied{5,6}.inp ; do mv $f ${f}_disabled ; done +set +x +for input in beam*.inp ; do + f=`basename $input .inp` + echo -n "Procesing $f " + %{buildroot}/%{_bindir}/ccx $f >> ccxlog || echo -n "-> $?" ; echo + [ -f $f.dat -a -f $f.frd ] || echo "$f failed!" | tee -a errorlog + [ "$(wc -l < $f.dat)" -eq "$(wc -l < $f.dat.ref)" ] || echo "Wrong size: $f.dat" | tee -a errorlog + grep NaN $f.dat && echo "Contains NaN: $f.dat" | tee -a errorlog + ./datcheck.pl $f | tee -a errorlog + [ -f $f.frd.ref ] || continue + [ "$(wc -l < $f.frd)" -eq "$(wc -l < $f.frd.ref)" ] || echo "Wrong size: $f.frd" | tee -a errorlog + ./frdcheck.pl $f | tee -a errorlog +done +set -x +if [ -s errorlog ] ; then + cat ccxlog + cat errorlog + exit 1 +fi %files -%defattr(-,root,root) %{_bindir}/ccx %{_bindir}/ccx_%{version} %doc src/BUGS src/LOGBOOK src/README.INSTALL src/TODO %files examples -%defattr(-,root,root) %{_datadir}/%{name}-examples-%{version} %changelog diff --git a/ccx_2.16.src.tar.bz2 b/ccx_2.16.src.tar.bz2 deleted file mode 100644 index 7d84003..0000000 --- a/ccx_2.16.src.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8f074a402dbd8196d90e476801d502748cf78342f1e881096b398b9d2f897f5d -size 1399684 diff --git a/ccx_2.16.test.tar.bz2 b/ccx_2.16.test.tar.bz2 deleted file mode 100644 index ff4351b..0000000 --- a/ccx_2.16.test.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fcbeb4d03a960ec26b5027fd729f6a13b607ab5fece4c5673c16fa740592f687 -size 10613987 diff --git a/ccx_2.17.src.tar.bz2 b/ccx_2.17.src.tar.bz2 new file mode 100644 index 0000000..53a378f --- /dev/null +++ b/ccx_2.17.src.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca708ad4aa729d9f84a9faba343c1bcc0b7cc84ed372616ebb55c8e6fa8f6e50 +size 1503269 diff --git a/ccx_2.17.test.tar.bz2 b/ccx_2.17.test.tar.bz2 new file mode 100644 index 0000000..2544265 --- /dev/null +++ b/ccx_2.17.test.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:798f94e536197bb10a74bae096f2a29a5111239020e7d10f93e1ad3d90c370cf +size 12396359