Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I

Call Error

Steve:
I fixed the WULF program for the stack error. Thanks for the help.  
​I tried to put a note of thanks and a picture on this forum but it got lost again.
​First call to PXFCDDIR fails. IFPOSIX - as use statement does not work either.
John
!      ****************************************************************
!     
      subroutine chdirA(i)
!
!      ****************************************************************
      
      
      use IFPORT
      implicit none


      CHARACTER(len=255) :: path
      integer i,ilen, ierror
    
    
      CALL PXFGETCWD (path,ilen,ierror)
      WRITE(*,*) TRIM(path)
      call PXFCHDIR("C:\",3,i)
      call PXFCHDIR("users\macne\documents\Visual Studio 2013\Projects\Program070 - Beams\Lothurr",76,i)
       write(*,*)i
       CALL PXFGETCWD (path,ilen,ierror)
       WRITE(*,*) TRIM(path)
       return 
       end subroutine

 

0 Kudos
7 Replies
Highlighted
New Contributor I

 

 

Picture of error

Steve: The other picture is the result from the FFT analysis. This is based on Kappler's 1931 research in Germany on vibration due a differential number of atoms hitting the surface causing vibration.  The movement is 10 billionth of a meter.  Picture is acceleration

Thanks for the help

John

0 Kudos
Highlighted
New Contributor I

I also worked out the

I also worked out the incorrect posts occur when I upload a picture in a post that creates a new topic.

Ying from the MKL pointed out the error - this code came in part from the MKL examples, perhaps these could be adjusted.

John

0 Kudos
Highlighted
New Contributor I

This is where I got the code

This is where I got the code from

0 Kudos
Highlighted
Black Belt

The second argument to

The second argument to PFXCHDIR is the length of the input string, which is the first argument, as you can see from the documentation at https://software.intel.com/en-us/node/580986.

In your code of #1, before line-21 insert "      ilen=255".

0 Kudos
Highlighted

Although the documentation

Although the documentation does not state this, try concatenating a null character to your directory string (do not count it).

call PXFCHDIR("users\macne\documents\Visual Studio 2013\Projects\Program070 - Beams\Lothurr"//char(0),76,i)

(and elsewhere on calls)

Jim Dempsey

0 Kudos
Highlighted
New Contributor I

Thanks you for the comments -

Thanks you for the comments - the interesting issue is the code works perfectly in a program by itself, it just stops working when I turn the program into a subroutine and call it.

 

0 Kudos
Highlighted
New Contributor I

Guys:

Guys:

The following code works perfectly - just not as subroutine - WULF was not fixed with the suggested changes

 !  ChDir - Entry point of console application.
    !

    !****************************************************************************
    !
    !  PROGRAM: ChDir
    !
    !  PURPOSE:  Entry point for the console application.
    !
    !****************************************************************************

    program ChDir

    use IFPORT
    implicit none


    CHARACTER(len=255) :: path
    integer i,ilen, ierror
    ilen = 255
    
    CALL PXFGETCWD (path,ilen,ierror)
    WRITE(*,*) TRIM(path)
    call PXFCHDIR("C:\",3,i)
    call PXFCHDIR("users\macne\documents\Visual Studio 2013\Projects\Program070 - Beams\Lothurr",76,i)
    write(*,*)i
    CALL PXFGETCWD (path,ilen,ierror)
    WRITE(*,*) TRIM(path)




    end program ChDir

 

0 Kudos