*IDENT WMCSETENV */ */ Note you also need wmc-set-env-c.upd to modify PORTIO2A.dk */ */ 2002/04/19: revised version to read name of file to be read from include file */ *DECLARE UMSHELL1 *I GDW1F404.107 C WMC C Arrange to read in our environment (on all processors) call wmc_set_env() */ */ And now include the file to do it as a deck here, for convenience. */ *DECK WSETENV SUBROUTINE wmc_set_env () integer icode character*80 fastrun, ename, evalue,evalue1 integer n, i, k, l, m character*1 w INCLUDE '../wsetenv-include' read(unit=200,fmt='(i)') n print *,'I think there will be ',n,' pairs' do i=1,n C print *,'Var: ',i do k=1,80 ename(k:k)=' ' evalue(k:k)=' ' enddo read(unit=200,fmt='(a)') ename read(unit=200,fmt='(a)') evalue do k=80,1,-1 w=ename(k:k) if (w .eq. ' ') l=k enddo l=l-1 do k=80,1,-1 w=evalue(k:k) if (w .eq. ' ') m=k enddo m=m-1 C print *,'l,m=',l,m C if (m .eq. 0) m=2 C print *,'ename, value: ',ename(1:l),' ',evalue(1:m) CALL FORT_SET_ENV(ename,l,evalue,m,ICODE) CALL FORT_GET_ENV(ename,l,evalue1,m,ICODE) C print *,ename(1:l),' value: ',evalue1(1:m) // '