~madteam/mg5amcnlo/series2.0

« back to all changes in this revision

Viewing changes to Template/loop_material/StandAlone/SubProcesses/MadLoopCommons.inc

mwrge with 2.7.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
 
142
142
      character(512) path
143
143
      character(512) dummy      
144
 
 
 
144
      character(512) epath ! path of the executable
 
145
      integer pos
145
146
      character(512) prefix,fpath
146
147
      character(17) nameToCheck
147
148
      parameter (nameToCheck='MadLoopParams.dat')
185
186
          close(1)
186
187
          prefix='../MadLoop5_resources/'
187
188
          call joinPath(prefix,nameToCheck,fpath)
188
 
          OPEN(1, FILE=fpath, ERR=66, STATUS='OLD',ACTION='READ')
189
 
          MLPath=prefix
190
 
          goto 10
191
 
66        continue
192
 
          close(1)
 
189
          OPEN(1, FILE=fpath, ERR=3, STATUS='OLD',ACTION='READ')
 
190
          MLPath=prefix
 
191
          goto 10
 
192
 3        continue
 
193
          close(1)
 
194
c
 
195
c     Try to automatically find the path from the executable location
 
196
c     particularly usefull in gridpack readonly mode
 
197
c
 
198
          call getarg(0,path) !path is the PATH to the madevent executable (either global or from launching directory)
 
199
          pos = index(path,'/',.true.)
 
200
          prefix = path(:pos)
 
201
          call joinPath(prefix,nameToCheck,fpath)
 
202
          write(*,*) 'test', fpath
 
203
          OPEN(1, FILE=fpath, ERR=4, STATUS='OLD',ACTION='READ')
 
204
          MLPath=prefix
 
205
          goto 10
 
206
4         continue
 
207
          close(1)
 
208
          prefix= prefix // '/MadLoop5_resources/'
 
209
          call joinPath(prefix,nameToCheck,fpath)
 
210
          write(*,*) 'test', fpath
 
211
          OPEN(1, FILE=fpath, ERR=5, STATUS='OLD',ACTION='READ')
 
212
          MLPath=prefix
 
213
          goto 10
 
214
5         continue
 
215
          close(1)
 
216
          prefix= path(:pos) // '/../MadLoop5_resources/'
 
217
          call joinPath(prefix,nameToCheck,fpath)
 
218
          write(*,*) 'test', fpath
 
219
          OPEN(1, FILE=fpath, ERR=6, STATUS='OLD',ACTION='READ')
 
220
          MLPath=prefix
 
221
          goto 10
 
222
 6        continue
 
223
          close(1)
 
224
 
193
225
c     We could not automatically find the auxiliary files
194
226
          write(*,*) '==='
195
227
          write(*,*) 'ERROR: MadLoop5 could not automatically find the file MadLoopParams.dat.'
215
247
 
216
248
C     Check that the FilePath set is correct
217
249
      call joinPath(MLPath,nameToCheck,fpath)
218
 
      OPEN(1, FILE=fpath, ERR=3, STATUS='OLD',ACTION='READ')
 
250
      OPEN(1, FILE=fpath, ERR=33, STATUS='OLD',ACTION='READ')
219
251
      goto 11
220
 
3     continue
 
252
33     continue
221
253
      close(1)
222
254
      write(*,*) '==='
223
255
      write(*,*) 'ERROR: The MadLoop5 auxiliary files could not be found in ',MLPath
606
638
      IMPLICIT  NONE
607
639
      INTEGER MAXNREF_EVALS
608
640
      PARAMETER (MAXNREF_EVALS=100)
609
 
      INTEGER, DIMENSION(MAXNREF_EVALS), INTENT(IN) :: x
 
641
      Double Precision, DIMENSION(MAXNREF_EVALS), INTENT(IN) :: x
610
642
      INTEGER, INTENT(IN)                                                         :: mStart, mEnd
611
643
      INTEGER                                                                             :: Minimum
612
644
      INTEGER                                                                             :: Location