diff options
Diffstat (limited to 'var')
6 files changed, 368 insertions, 20 deletions
diff --git a/var/spack/repos/builtin/packages/ffb/fj_compiler.patch b/var/spack/repos/builtin/packages/ffb/fj_compiler.patch deleted file mode 100644 index 2f733ced38..0000000000 --- a/var/spack/repos/builtin/packages/ffb/fj_compiler.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- FFB8.org/util/xvx2gf/XVX.h 2013-03-26 10:09:49.000000000 +0900 -+++ FFB8.new/util/xvx2gf/XVX.h 2020-06-16 16:00:06.408500236 +0900 -@@ -5,6 +5,7 @@ - #include <algorithm>
- #include <cassert>
- #include <vector>
-+#include <stdint.h>
-
- #define MAX_LEVEL 32
-
diff --git a/var/spack/repos/builtin/packages/ffb/fortran-format.patch b/var/spack/repos/builtin/packages/ffb/fortran-format.patch new file mode 100644 index 0000000000..333f221aef --- /dev/null +++ b/var/spack/repos/builtin/packages/ffb/fortran-format.patch @@ -0,0 +1,60 @@ +diff --git a/util/convert/gfmavs.f b/util/convert/gfmavs.f +index debe3ec..34e6f66 100644 +--- a/util/convert/gfmavs.f ++++ b/util/convert/gfmavs.f +@@ -422,7 +422,7 @@ C + C + WRITE(IUT6,*) 'GFMAVS: OUTPUTING GRID COORDINATES...' + DO 1100 IP = 1,NP +- WRITE(IUTAVS,'(I8,P3E13.5)') IP,X(IP),Y(IP),Z(IP) ++ WRITE(IUTAVS,'(I8,1P3E13.5)') IP,X(IP),Y(IP),Z(IP) + 1100 CONTINUE + C + WRITE(IUT6,*) 'GFMAVS: OUTPUTING ELEMENT DATA...' +@@ -448,7 +448,7 @@ C + C + WRITE(IUT6,*) 'GFMAVS: OUTPUTING VARIABLES DATA...' + DO 1400 IP = 1,NP +- WRITE(IUTAVS,'(I8,P4E13.5)') ++ WRITE(IUTAVS,'(I8,1P4E13.5)') + * IP,U(IP),V(IP),W(IP),P(IP) + 1400 CONTINUE + C +@@ -470,7 +470,7 @@ C + C + DO 2100 JB = 1,NPTMP + IP = LPBOUN(JB,ITYPE) +- WRITE(IUTAVS,'(I8,P3E13.5)') ++ WRITE(IUTAVS,'(I8,1P3E13.5)') + * IP,X(IP),Y(IP),Z(IP) + 2100 CONTINUE + C +@@ -498,7 +498,7 @@ C + C + DO 2400 JB = 1,NPTMP + IP = LPBOUN(JB,ITYPE) +- WRITE(IUTAVS,'(I8,P7E13.5)') ++ WRITE(IUTAVS,'(I8,1P7E13.5)') + * IP,U(IP),V(IP),W(IP),P(IP),F(IP),T(IP),VIS(IP) + 2400 CONTINUE + C +diff --git a/util/multi/partdx_rcap.f b/util/multi/partdx_rcap.f +index a0962b7..aab1876 100644 +--- a/util/multi/partdx_rcap.f ++++ b/util/multi/partdx_rcap.f +@@ -448,11 +448,11 @@ C + C + CLOSE(IUTPT) + C +- 700 FORMAT(A,1X,I) ++ 700 FORMAT(A,1X,I8) + 701 FORMAT(A,1X,A) +- 702 FORMAT(A,1X,I) +- 703 FORMAT(I,1X,A,1X,8(I,1X)) +- 704 FORMAT(I,3(1X,F)) ++ 702 FORMAT(A,1X,I8) ++ 703 FORMAT(I8,1X,A,1X,8(I8,1X)) ++ 704 FORMAT(I8,3(1X,F13.5)) + CC + CC 700 FORMAT(A,1X,I8) + CC 701 FORMAT(A,1X,A) diff --git a/var/spack/repos/builtin/packages/ffb/gffv3tr.patch b/var/spack/repos/builtin/packages/ffb/gffv3tr.patch new file mode 100644 index 0000000000..d3f9fcc26b --- /dev/null +++ b/var/spack/repos/builtin/packages/ffb/gffv3tr.patch @@ -0,0 +1,33 @@ +--- FFB8.org/util/tetra/gffv3tr.f 2013-03-26 10:10:51.000000000 +0900 ++++ FFB8.new/util/tetra/gffv3tr.f 2020-06-23 10:32:13.673071588 +0900 +@@ -832,7 +832,7 @@ C + LIST2(3)=LEBUF(5,IS2) + C + IMATCH=0 +- CALL MATCH4(LIST1,LIST2,IMATCH) ++ CALL MATCH3(LIST1,LIST2,IMATCH) + IF(IMATCH.EQ.1)THEN + LEBUF(6,IS1)=0 + LEBUF(6,IS2)=0 +@@ -859,17 +859,17 @@ C + RETURN + END + CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC +- SUBROUTINE MATCH4(LIST1,LIST2,IMATCH) +- INTEGER LIST1(4), LIST2(4) ++ SUBROUTINE MATCH3(LIST1,LIST2,IMATCH) ++ INTEGER LIST1(3), LIST2(3) + INTEGER IMATCH + C [INPUT] LIST1,LIST2 :VECTORS TO BE CHECK + C [OUTPUT] IMATCH :0 NOT MATCH ,1 MATCH + C + IMATCH = 0 + C +- DO 100 I=1,4 ++ DO 100 I=1,3 + IBUF=1 +- DO 200 J=1,4 ++ DO 200 J=1,3 + IBUF=IBUF*(LIST1(I)-LIST2(J)) + 200 CONTINUE + IF(IBUF.NE.0)RETURN diff --git a/var/spack/repos/builtin/packages/ffb/package.py b/var/spack/repos/builtin/packages/ffb/package.py index c7d1095583..7f55d74a6e 100644 --- a/var/spack/repos/builtin/packages/ffb/package.py +++ b/var/spack/repos/builtin/packages/ffb/package.py @@ -15,7 +15,10 @@ class Ffb(MakefilePackage): version('8.1', sha256='1ad008c909152b6c27668bafbad820da3e6ec3309c7e858ddb785f0a3d6e43ae') patch('revocap_refiner.patch') - patch('fj_compiler.patch', when='%fj') + patch('revocap_refiner-size_t.patch') + patch('fortran-format.patch') + patch('xvx.patch') + patch('gffv3tr.patch') depends_on('mpi') depends_on('blas') @@ -79,7 +82,7 @@ class Ffb(MakefilePackage): m.write('#!/bin/csh -f\n') m.write('setenv LES3DHOME {0}\n'.format(workdir)) m.write('cd {0}\n'.format(dd_mpi_dir)) - m.write('make lib\n') + m.write('make lib FCOM={0}\n'.format(spec['mpi'].mpifc)) os.chmod(makeall, 0o755) makeall = join_path('.', 'Makeall.les') @@ -143,16 +146,16 @@ class Ffb(MakefilePackage): m.filter(r'LIBS = -lfort -lgf2 -ldd_mpi -lmpi_f77', 'LIBS = -lfort -lgf2 -ldd_mpi') + editfile = join_path('util', 'xvx2gf', 'FILES') + cxx_fortran_flags = [] if spec.satisfies('%gcc'): - editfile = join_path('util', 'xvx2gf', 'FILES') - m = FileFilter(editfile) - m.filter(r'LIBS = -lgf2 -lz -lifcore -limf -ldl', - 'LIBS = -lgf2 -lz -ldl') + cxx_fortran_flags.append('-lgfortran') + elif spec.satisfies('%intel'): + cxx_fortran_flags.expand(['-lifcore', '-limf']) elif spec.satisfies('%fj'): - editfile = join_path('util', 'xvx2gf', 'FILES') - m = FileFilter(editfile) - m.filter(r'LIBS = -lgf2 -lz -lifcore -limf -ldl', - 'LIBS = -lgf2 -lz -ldl -linkfortran') + cxx_fortran_flags.append('--linkfortran') + m = FileFilter(editfile) + m.filter('-lifcore -limf', ' '.join(cxx_fortran_flags)) def build(self, spec, prefix): for m in [join_path('make', 'Makeall'), diff --git a/var/spack/repos/builtin/packages/ffb/revocap_refiner-size_t.patch b/var/spack/repos/builtin/packages/ffb/revocap_refiner-size_t.patch new file mode 100644 index 0000000000..a15a6ee9b4 --- /dev/null +++ b/var/spack/repos/builtin/packages/ffb/revocap_refiner-size_t.patch @@ -0,0 +1,225 @@ +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainer.h b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainer.h +index b5b8525..3e95332 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainer.h ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainer.h +@@ -38,6 +38,8 @@ + + namespace kmb{ + ++using std::size_t; ++ + class Matrix4x4; + + class Point3DContainer +diff --git a/spack-src/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h b/spack-src/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h +index cd1d5df..a2fff46 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h +@@ -194,7 +194,7 @@ + return itClone; + }; + +- size_t getCount(int i,int j,int k) const{ ++ std::size_t getCount(int i,int j,int k) const{ + return regions.count(getIndex(i,j,k)); + }; + + +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_BLArray.h b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_BLArray.h +index 4761262..b9a0c8c 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_BLArray.h ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_BLArray.h +@@ -30,6 +30,8 @@ + + namespace kmb{ + ++using std::size_t; ++ + class BLArrayIndex; + + class BLArrayBase +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Classification.h b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Classification.h +index 81b3b9f..51c06cc 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Classification.h ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Classification.h +@@ -39,6 +39,8 @@ + + namespace kmb{ + ++using std::size_t; ++ + typedef int classificationType; + + template<typename T> +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point2DContainer.h b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point2DContainer.h +index 0f7e548..39278e6 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point2DContainer.h ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point2DContainer.h +@@ -38,6 +38,8 @@ + + namespace kmb{ + ++using std::size_t; ++ + class Point2DContainer + { + protected: +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerArray.h b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerArray.h +index c4c0dc9..8852677 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerArray.h ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerArray.h +@@ -17,6 +17,8 @@ + + namespace kmb{ + ++using std::size_t; ++ + class Point3DContainerArray : public Point3DContainer + { + private: +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerMArray.h b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerMArray.h +index 51bb315..8bb557f 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerMArray.h ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerMArray.h +@@ -19,6 +19,8 @@ + + namespace kmb{ + ++using std::size_t; ++ + class Point3DContainerMArray : public Point3DContainer + { + private: +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerVect.h b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerVect.h +index 1254a5c..57b1763 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerVect.h ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerVect.h +@@ -31,6 +31,8 @@ + + namespace kmb{ + ++using std::size_t; ++ + class Point3DContainerVect : public Point3DContainer + { + private: +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DOctree.h b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DOctree.h +index 778e253..b743069 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DOctree.h ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DOctree.h +@@ -32,6 +32,8 @@ + + namespace kmb{ + ++using std::size_t; ++ + class Point3DOctree + { + private: +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DOctree.cpp b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DOctree.cpp +index 6a8bb38..d29e6fa 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DOctree.cpp ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DOctree.cpp +@@ -85,10 +85,10 @@ kmb::Point3DOctree::getLocalCount(void) const + return count; + } + +-size_t ++std::size_t + kmb::Point3DOctree::getCount(void) const + { +- size_t sum = 0; ++ std::size_t sum = 0; + if( children != NULL ){ + for(int i=0;i<8;++i){ + sum += children[i]->getCount(); +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point2DContainerMap.cpp b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point2DContainerMap.cpp +index 6838486..2d4874c 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point2DContainerMap.cpp ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point2DContainerMap.cpp +@@ -33,6 +33,8 @@ + #pragma warning(disable:4100) + #endif + ++using std::size_t; ++ + + + const char* kmb::Point2DContainerMap::CONTAINER_TYPE = "stl::map<id,Point2D*>"; +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerArray.cpp b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerArray.cpp +index 02362fc..b9bf597 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerArray.cpp ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerArray.cpp +@@ -19,6 +19,8 @@ + #pragma warning(disable:4100) + #endif + ++using std::size_t; ++ + const char* kmb::Point3DContainerArray::CONTAINER_TYPE = "double_array"; + + kmb::Point3DContainerArray::Point3DContainerArray(void) +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerMap.cpp b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerMap.cpp +index 9619325..24997b6 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerMap.cpp ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerMap.cpp +@@ -33,6 +33,7 @@ + #pragma warning(disable:4100) + #endif + ++using std::size_t; + + + const char* kmb::Point3DContainerMap::CONTAINER_TYPE = "stl::map<id,Point3D*>"; +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerVect.cpp b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerVect.cpp +index 06add56..ec55033 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerVect.cpp ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Point3DContainerVect.cpp +@@ -32,6 +32,8 @@ + #pragma warning(disable:4100) + #endif + ++using std::size_t; ++ + const char* kmb::Point3DContainerVect::CONTAINER_TYPE = "stl::vector<Point3D*>"; + + kmb::Point3DContainerVect::Point3DContainerVect(void) +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/MeshDB/kmbElementContainerNArray.h b/lib/src/REVOCAP_Refiner-0.4.3/MeshDB/kmbElementContainerNArray.h +index f3335d0..138aa5e 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/MeshDB/kmbElementContainerNArray.h ++++ b/lib/src/REVOCAP_Refiner-0.4.3/MeshDB/kmbElementContainerNArray.h +@@ -27,6 +27,8 @@ + + namespace kmb{ + ++using std::size_t; ++ + class ElementContainerNArray : public ElementContainer + { + protected: +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/MeshDB/kmbNodeNeighborPtrInfo.h b/lib/src/REVOCAP_Refiner-0.4.3/MeshDB/kmbNodeNeighborPtrInfo.h +index 70cdc5e..6a7a4b7 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/MeshDB/kmbNodeNeighborPtrInfo.h ++++ b/lib/src/REVOCAP_Refiner-0.4.3/MeshDB/kmbNodeNeighborPtrInfo.h +@@ -24,6 +24,8 @@ + + namespace kmb{ + ++using std::size_t; ++ + class Element; + class ElementContainer; + class MeshData; +diff --git a/lib/src/REVOCAP_Refiner-0.4.3/Shape/kmbFittingToSurface.h b/lib/src/REVOCAP_Refiner-0.4.3/Shape/kmbFittingToSurface.h +index 3a6d7dd..5910b77 100644 +--- a/lib/src/REVOCAP_Refiner-0.4.3/Shape/kmbFittingToSurface.h ++++ b/lib/src/REVOCAP_Refiner-0.4.3/Shape/kmbFittingToSurface.h +@@ -19,6 +19,8 @@ + + namespace kmb{ + ++using std::size_t; ++ + class MeshData; + class Surface3D; + template <typename> class Vector2WithIntBindings; diff --git a/var/spack/repos/builtin/packages/ffb/xvx.patch b/var/spack/repos/builtin/packages/ffb/xvx.patch new file mode 100644 index 0000000000..6d14900d1e --- /dev/null +++ b/var/spack/repos/builtin/packages/ffb/xvx.patch @@ -0,0 +1,37 @@ +--- FFB8.org/util/xvx2gf/XVX.h 2013-03-26 10:09:49.000000000 +0900 ++++ FFB8.new/util/xvx2gf/XVX.h 2020-06-24 14:27:32.000000000 +0900 +@@ -5,6 +5,7 @@ + #include <algorithm>
+ #include <cassert>
+ #include <vector>
++#include <inttypes.h>
+
+ #define MAX_LEVEL 32
+
+@@ -182,25 +183,7 @@ public: + void *_ptr;
+ unsigned char volptr[3];// とりあえず最大256^3まで uintにしてbitmaskすれば1024^3
+
+- #if _WIN64 // _WIN32と順番を変えるとおかしくなるので注意(64ビットWindows環境では、_WIN32と_WIN64の両方が定義される)
+- typedef unsigned long long int PtrAsInt;
+- #elif _WIN32
+- typedef unsigned int PtrAsInt;
+- #elif __APPLE__
+- #if x86_64
+- typedef unsigned long long int PtrAsInt;
+- #else
+- typedef unsigned int PtrAsInt;
+- #endif
+- #elif __linux__
+- #if __x86_64__
+- typedef unsigned long long int PtrAsInt;
+- #else
+- typedef unsigned int PtrAsInt;
+- #endif
+- #else
+- #error you must typedef 'PtrAsInt'
+- #endif
++ typedef size_t PtrAsInt;
+ }ALIGNMENT;
+ #ifdef __GNUC__
+ #pragma pack(pop)
|