Search Results

Search found 1 results on 1 pages for 'user279137'.

Page 1/1 | 1 

  • fortran 90 user defined type, passing by value ?

    - by user279137
    I have an issue in fortran 90. I have a user defined type and when I call one of the MPI subroutines the data looks to be passed by values (not address, as I thought it should). The output arguments aren't modified. It seems to be specific to the MPI calls I tried the same thing in a simple test, and I can change the passed in values in the calling scope. I'm not sure why this is because I thought fortran always pass by address. Any idea what could be going on? Just to be clear the commented snippet shows how the calls are made. The in the first call, c%NSubDomains, is an output argument and should be modified in the calling scope, but its not. WHen I call with an array rather than a member of user defined type it works, in the uncommented snippet. ! ! This doesn't work output values aren't modified ?? ! call MPI_Dims_create(c%NProcs,c%NDims,c%NSubDomains,iErr) nsubs(:)=0 call MPI_Dims_create(c%NProcs,c%NDims,nsubs,iErr) c%NSubDomains=nsubs Thanks

    Read the article

1