Changeset 80 in PSPA for parmelaPSPA


Ignore:
Timestamp:
Nov 15, 2012, 12:36:13 PM (12 years ago)
Author:
lemeur
Message:

prise en compte d'un path pour les fichiers

Location:
parmelaPSPA/trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • parmelaPSPA/trunk/cellfeld.f

    r12 r80  
    1       subroutine cellfeld(filesuper,nc,ne,ns)
     1      subroutine cellfeld(fileelec,nc,ne,ns)
    22c----------------------------------------------------------------------
     3c modifie glm : suppression de filesuper (var_char.h) remplace par fileelec
    34c
    45      include 'param_sz.h'
     
    78      include 'misccom.h'
    89      include 'syscom.h'
    9       include 'var_char.h'
     10c      include 'var_char.h'
    1011      include 'ucom.h'
    1112c
     
    1516c--------------------------------------------------------------------------
    1617c*
     18      character*256 fileelec
    1719      data rcurflag/.true./
    1820      itest=0
    1921      iorsay=0
    2022c      open (unit=nfld,file=filesuper//'.sffld',status='old')
    21       nlast = index(filesuper, ' ')
    22       if (nlast .eq. 0) nlast = len(filesuper) + 1
    23       open (unit=nfld,file=filesuper(1:nlast-1)//'.sffld',
     23      nlast = index(fileelec, ' ')
     24      print *, ' cellfeld recoit : ', fileelec
     25      if (nlast .eq. 0) nlast = len(fileelec) + 1
     26      open (unit=nfld,file=fileelec(1:nlast-1)//'.sffld',
    2427     1  status='old')
    2528      do 100 i=nc,ne,ns
  • parmelaPSPA/trunk/file.f

    r12 r80  
    22c     system dependant                                                 *
    33c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
    4       subroutine ouvrir
     4      subroutine ouvrir(lonnom, work_path)
     5
     6C **********************************************
     7C BUT :   glm
     8C ----
     9C       work_path: PATH des fichiers a ouvrir
     10C       lonnom  : longueur de la chaine precedente
     11C **********************************************
     12
     13
     14
    515c
    616      include 'ucom.h'
    717      include 'debug.h'
    818      include 'flagcom.h'
     19
     20      character*256 nomfic
     21      character*256  work_path
     22      character*256  nomf
     23      integer  lonnom
     24
    925c
    1026c------------------------- open --------------------------------------
     
    2743      open(unit=nav,access='sequential',
    2844     *     form='formatted',status='scratch')
    29       open(unit=ndes1,file='parmdesz',form='formatted',
     45
     46      nomf = nomfic(work_path(1:lonnom),'parmdesz')
     47      print *, ' parmela file : fichier desz : ', nomf
     48
     49
     50      open(unit=ndes1,file=nomf,form='formatted',
    3051     *     status='unknown')
    3152      open(unit=ndes2,file='/tmp/parmdest',form='unformatted',
  • parmelaPSPA/trunk/main.c

    r73 r80  
     1#include <string.h>
     2#include <stdio.h>
     3#include <stdlib.h>
    14
    2 #include <stdio.h>
     5static int maxLongPath=132;
    36
    4 void parmela_();
     7void parmela_(char*, int*);
    58
    69int main(int argc,char* argv[])
    710{
    8   parmela_();
     11
     12  if ( argc != 2 )
     13    {
     14    printf(" usage : parmela complete_path_of_files  \n");
     15    return 0;
     16    }
     17 
     18  char workingPath[maxLongPath];
     19
     20
     21  int taille = strlen(argv[1]);
     22  if ( taille < maxLongPath - 1)
     23    {
     24      strcpy(workingPath, argv[1]);
     25    }
     26  else
     27    {
     28      printf(" parmela ERROR : path name of working area too long (should be < %d \n",maxLongPath);
     29      return 0;
     30    }
     31
     32  parmela_(workingPath, &taille);
    933  return 0;
    1034}
  • parmelaPSPA/trunk/makefile

    r78 r80  
    22#FFLAGS= -O4 -m32 -fno-second-underscore -funroll-loops -I.
    33#FFLAGS= -O4 -fno-second-underscore -funroll-loops -I.
    4 FFLAGS= -O4 -fno-second-underscore -funroll-loops -I.
     4FFLAGS= -O4 -funroll-loops -I.
    55 
    66#VER=macOS
    77VER=
    88
    9 SRC= adjust.f alpham.f bend.f bfld.f bfldlal.f blockdata.f buncher.f byfield.f card.f cathod.f cathode.f cellfeld.f cellimp.f cfield.f change.f cread.f datime.f dawfc.f ddate.f design.f distriphase.f distrir.f distrirhom.f dpout.f drift.f eh.f eint.f elispdp.f emit90dp.f erf.f field.f fieldlal.f file.f fldring.f flds.f fsch.f gammln.f gammp.f gaus.f gcf.f geners.f genfc.f genfld.f gpindp.f graphic.f gser.f indx.f input.f interp.f interv.f irschfgt.f lodgau.f loduni.f luf.f norran.f out1.f out2.f out3.f out4.f out5.f out6dp.f outlaldp.f output.f pardyn.f parmelamainv503.f pdist.f poisson.f prch.f prchold.f pvoldp.f quad.f ranf.f rannor.f rn32.f rndm.f rnorth.f rotate.f rtmfc.f rtrans.f sandom.f sbload.f sccfc.f scheff1.f scheff2.f scheff3.f scwall.f search.f setwall.f sextupole.f solnoid.f sort.f sortie.f spl1d1.f spl1d2.f spl2d1.f spl2d2.f spln1.f spln2.f srchfd.f sscal.f swap.f tank.f trwave.f trwfield.f trwimp.f wiggler.f xi0.f xi10x.f zout.f zoutlal.f
     9SRC= adjust.f alpham.f bend.f bfld.f bfldlal.f blockdata.f buncher.f byfield.f card.f cathod.f cathode.f cellfeld.f cellimp.f cfield.f change.f cread.f datime.f dawfc.f ddate.f design.f distriphase.f distrir.f distrirhom.f dpout.f drift.f eh.f eint.f elispdp.f emit90dp.f erf.f field.f fieldlal.f file.f fldring.f flds.f fsch.f gammln.f gammp.f gaus.f gcf.f geners.f genfc.f genfld.f gpindp.f graphic.f gser.f indx.f input.f interp.f interv.f irschfgt.f lodgau.f loduni.f luf.f nomfic.f norran.f out1.f out2.f out3.f out4.f out5.f out6dp.f outlaldp.f output.f pardyn.f parmelamainv503.f pdist.f poisson.f prch.f prchold.f pvoldp.f quad.f ranf.f rannor.f rn32.f rndm.f rnorth.f rotate.f rtmfc.f rtrans.f sandom.f sbload.f sccfc.f scheff1.f scheff2.f scheff3.f scwall.f search.f setwall.f sextupole.f solnoid.f sort.f sortie.f spl1d1.f spl1d2.f spl2d1.f spl2d2.f spln1.f spln2.f srchfd.f sscal.f swap.f tank.f trwave.f trwfield.f trwimp.f wiggler.f xi0.f xi10x.f zout.f zoutlal.f
    1010 
    1111OBJ=$(SRC:.f=.o)
     
    1414
    1515parmela : main.o $(OBJ)
    16         gfortran main.o $(OBJ) -o parmela
     16        gfortran  main.o $(OBJ) -o parmela
    1717
    1818main.o:main.c
     
    181181         $(FF) -c $(FFLAGS) luf.f
    182182 
     183nomfic.o:nomfic.f
     184         $(FF) -c $(FFLAGS) nomfic.f
     185 
    183186norran.o:norran.f
    184187         $(FF) -c $(FFLAGS) norran.f
  • parmelaPSPA/trunk/parmelamainv503.f

    r73 r80  
    233233c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
    234234c-----------------------------------------------------------------------
     235
     236c modif F. Touze, G. Le Meur 15/11/2012
    235237c---->program parmela
    236       subroutine parmela()
     238      subroutine parmela(work_path, lonnom)
    237239c-----------------------------------------------------------------------
    238240c label n --> n*100
     
    259261      include 'ucom.h'
    260262      include 'upawcom.h'
     263
     264      character*132 work_path
     265      character*256 nom_input
     266      character*256 nomfic
     267      character*256 fileelec
     268      character*256 ficpoiss
     269      integer lonnom
     270
    261271      character*25 kvers
    262272      common/aswap/acor(7,imaa)
     
    283293      common /wtstep/wtstep,nstep ! mcd
    284294c--------------------------------------------------------------------------
     295
    285296      character Istart_date*9,Iend_date*9,Istart_time*8,Iend_time*8
    286297      real*4    time_begin
     
    292303
    293304      write(*,*) ' Go Parmela'
     305
     306
    294307c_for ibm
    295308c      time_begin = secnds(0.0)
     
    345358c---
    346359c---
    347       open(unit=nin,file='parmin',status='old',
     360      nom_input = nomfic(work_path(1:lonnom),'parmin')
     361      print *, ' parmela : fichier input : ', nom_input
     362      open(unit=nin,file=nom_input,status='old',
    348363     *     access='sequential',form='formatted')
     364
     365
     366c$$$      open(unit=nin,file='parmin',status='old',
     367c$$$     *     access='sequential',form='formatted')
    349368      open(unit=nnout,file='parmdebug',status='unknown',
    350369     *        access='sequential',form='formatted')
    351       call ouvrir
     370      call ouvrir(lonnom, work_path)
    352371c---
    353372      call setwall
     
    821840C modif glm 29/10/2012      read(nin,'(a12)')filesuper
    822841      read(nin,*) filesuper
     842      print *, ' j''ai lu le fichier champ : ', filesuper
    823843      write(nnout,'(1x,a12)')filesuper
    824844      if(nn.lt.1)then
     
    839859      ns=vv(3)
    840860      endif
    841       call cellfeld(filesuper,nc,ne,ns)
     861
     862c$$$      call cellfeld(filesuper,nc,ne,ns)
     863      fileelec = nomfic(work_path(1:lonnom),filesuper)
     864      print *, ' j''envoie lu le fichier champ : ', fileelec
     865      call cellfeld(fileelec,nc,ne,ns)   ! modif glm 16/11/2012
    842866      go to 99
    843867c---after design
     
    961985      rmult=1.
    962986      endif
    963       call poisson(filepois,zoffset,rmult)
     987      ficpoiss = nomfic(work_path(1:lonnom),filepois)
     988      call poisson(ficpoiss,zoffset,rmult)
    964989      go to 99
    965990c
  • parmelaPSPA/trunk/poisson.f

    r43 r80  
    77      include 'ucom.h'
    88c
    9       character filepois*12
     9      character filepois*256 ! dimension modifiee glm (avant : 12)
    1010c-----------------------------------------------------------------------
     11      print *, ' poisson recoit : ', filepois
    1112      nlast = index(filepois, ' ')
    1213      if (nlast .eq. 0) nlast = len(filepois) + 1
Note: See TracChangeset for help on using the changeset viewer.