Storage Fault Analysis: EG4

EG4 18KPV Fault F90: Phase Sequence Detection Failed

#EG4 #18KPV #F90

🔍 Full Report: https://www.storagefaults.com/eg4/18kpv/eg4-18kpv-fault-f90-phase-sequence-error

EG4 18KPV Fault F90: Phase Sequence Detection Failed -... | storagefaults.com

EG4 18KPV inverter error F90 indicates a phase sequence problem. Troubleshoot grid connection, wiring, and frequency. Requires a qualified electrician.

storagefaults.com

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

#Fortran #f90

Calling Modern Fortran & MPI fans/lawyers.
What happens if I call MPI_Send / MPI_Recv on a non-contiguous chunk of an array?

I have (where sbuf is a 2D send-buffer array):

MPI_Send(sbuf(ix:ix+nelems-1, :), nelems*ncolumns, ...)

And very similar for receiving. Is this:
legal? bad?

#Fortran #F90 #MPI #HPC

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?"

#Fortran #F90

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?)

#f90 #fortran #HPC

*surely* there's some kind of shortcut to avoid counting letters in a Fortran constant string?

```
character(len=*), param :: mystring = "this is my string"
```
Why it this not legal?? Is the language so mean that I have to count and input the `len=`?

#Fortran #F90

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?

#HPC, #MPI, #F90, #Fortran

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