Storage Fault Analysis: EG4
EG4 18KPV Fault F90: Phase Sequence Detection Failed
🔍 Full Report: https://www.storagefaults.com/eg4/18kpv/eg4-18kpv-fault-f90-phase-sequence-error
Storage Fault Analysis: EG4
EG4 18KPV Fault F90: Phase Sequence Detection Failed
🔍 Full Report: https://www.storagefaults.com/eg4/18kpv/eg4-18kpv-fault-f90-phase-sequence-error
If an allocated allocatable array goes out of scope, it's automatically deallocated, right?
And that should apply to block?
Here's my test program. I think this is legal (compiler doesn't complain):
program test_block
implicit none
integer :: i
do i=1,4
block
real, allocatable, dimension(:) :: my_arr
allocate(my_arr(10))
end block
end do
end program test_block
Dear fellow Fortran nerds!
Is there an equivalent way to do something like this numpy code without using a loop? Performance is not critical.
term1 = np.sum(
n_pic[:,mask] * charge[None, mask], axis=1
)
I see 2 problems here.
a) broadcasting a 2D array (n,m) with a 1D array (m)
b) the mask= option of Fortran's sum must(??) take an array the same shape as the summed array. Is there any way to say "this 1D mask should apply in the 2nd dimension?"
1/2
Attention Fortran lawyers!
A colleague posed an interesting one to me (assuming b is a 2D real array containing values):
OK:
real, dimension(:), allocatable :: a
a = b(1, :)
Error:
real, dimension(:), allocatable :: a
a = sum(b(2:,:), dim=1)
! (can fixed by allocating a)
Is there a rule about automatic allocation requiring no temporaries? Or compiler bug (in either case?)
Switching (conditionally) some MPI code from f90 to f08 bindings, and came across the following problem:
`if(comm_assembly /= MPI_COMM_NULL) then`
Does this really have to become:
`if(comm_assembly%MPI_VAL /= MPI_COMM_NULL%MPI_VAL) then`?
the original code throws a linktime error (.ne. not being overloaded) -- gcc/14 + impi/2021.11.
Feels like the original code should have been correct. Implementation error?
Calling Fortran lawyers:
```
integer :: isp
character(len=15), dimension(10) :: species_name
....
associate(spec_name => trim(species_name(isp)))
print *, spec_name
end associate
```
Even without the print statement, gfortran (11.3.0) gives me a SIGABRT at runtime here (though seemingly only if I have read from a namelist file before).
ifort seems happy (different machine).
Is the code legal? gfortran's associate limitations? Am I missing something? Text encoding?
#F90 #Fortran
heute sitz ich schon zum 2. mal am falschen tag im wartezimmer der psychotherapeutin.
hab ich ein glück schon die passende diagnose dafür zu haben. %)
#F90.2