Modified for Fujitsu compiler. (#17124)
This commit is contained in:
parent
8e6f0c353c
commit
fd8971feec
3 changed files with 49 additions and 12 deletions
10
var/spack/repos/builtin/packages/ffb/fj_compiler.patch
Normal file
10
var/spack/repos/builtin/packages/ffb/fj_compiler.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- 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
|
||||
|
|
@ -15,6 +15,7 @@ class Ffb(MakefilePackage):
|
|||
version('8.1', sha256='1ad008c909152b6c27668bafbad820da3e6ec3309c7e858ddb785f0a3d6e43ae')
|
||||
|
||||
patch('revocap_refiner.patch')
|
||||
patch('fj_compiler.patch', when='%fj')
|
||||
|
||||
depends_on('mpi')
|
||||
depends_on('blas')
|
||||
|
@ -52,6 +53,7 @@ def edit(self, spec, prefix):
|
|||
r'#LES3DHOME =', 'LES3DHOME= {0}\n'.format(workdir))
|
||||
make = join_path('make', 'OPTION')
|
||||
m = FileFilter(make)
|
||||
m.filter(r'CPP\s*=.*$', 'CPP = /usr/bin/cpp')
|
||||
m.filter(r'CCOM\s*=.*$', 'CCOM = {0}'.format(spack_cc))
|
||||
m.filter(r'COPT\s*=.*$', 'COPT = {0}'.format(cflags))
|
||||
m.filter(r'FCOM\s*=.*$', 'FCOM = {0}\n'.format(spack_fc))
|
||||
|
@ -141,6 +143,17 @@ def edit(self, spec, prefix):
|
|||
m.filter(r'LIBS = -lfort -lgf2 -ldd_mpi -lmpi_f77',
|
||||
'LIBS = -lfort -lgf2 -ldd_mpi')
|
||||
|
||||
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')
|
||||
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')
|
||||
|
||||
def build(self, spec, prefix):
|
||||
for m in [join_path('make', 'Makeall'),
|
||||
join_path('lib', 'src', 'dd_mpi', 'Makeall'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
diff -uprN FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h
|
||||
--- FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h 2013-03-26 10:09:31.000000000 +0900
|
||||
+++ FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h 2020-05-29 16:35:09.690918296 +0900
|
||||
+++ FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h 2020-06-16 11:33:05.765408337 +0900
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
numY = this->ynum;
|
||||
numZ = this->znum;
|
||||
|
@ -10,15 +10,29 @@ diff -uprN FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h FFB8.new
|
|||
return this->xnum * this->ynum * this->znum;
|
||||
};
|
||||
|
||||
diff -uprN FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h
|
||||
--- FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h 2013-03-26 10:09:31.000000000 +0900
|
||||
+++ FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h 2020-05-29 16:35:48.756606155 +0900
|
||||
@@ -13,7 +13,7 @@
|
||||
# #
|
||||
----------------------------------------------------------------------*/
|
||||
#pragma once
|
||||
@@ -81,12 +81,6 @@ public:
|
||||
|
||||
int getIndex() const{ return it->first; };
|
||||
|
||||
- void getIndices(int &i,int &j,int &k) const{
|
||||
- i = it->first / (ynum*znum);
|
||||
- j = (it->first - i*ynum*znum) / znum;
|
||||
- k = it->first - i*ynum*znum - j*znum;
|
||||
- };
|
||||
-
|
||||
+#include <cstdlib>
|
||||
#ifndef PI
|
||||
#define PI 3.1415926535897932384626
|
||||
#endif
|
||||
iterator& operator++(void){ ++it; return *this; };
|
||||
|
||||
iterator operator++(int n){
|
||||
@@ -124,12 +118,6 @@ public:
|
||||
|
||||
int getIndex() const{ return it->first; };
|
||||
|
||||
- void getIndices(int &i,int &j,int &k) const{
|
||||
- i = it->first / (ynum*znum);
|
||||
- j = (it->first - i*ynum*znum) / znum;
|
||||
- k = it->first - i*ynum*znum - j*znum;
|
||||
- };
|
||||
-
|
||||
const_iterator& operator++(void){ ++it; return *this; };
|
||||
|
||||
const_iterator operator++(int n){
|
||||
|
|
Loading…
Reference in a new issue