Segemtation fault on DGX Spark

Hello, when running the nvfortran compiler on the DGX Spark i get this

Segmentation fault (core dumped)

Can someone help me?
user@spark-9452:~/fortran/f/phaser$ nvfortran --version

nvfortran 25.11-0 linuxarm64 target on aarch64 Linux -tp gb10
NVIDIA Compilers and Tools
Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
user@spark-9452:~/fortran/f/phaser$

Hi Stefan_bohl,

A seg fault is a very generic error. Can you provide more details and a reproducing example?

-Mat

Hello Mat,

what information, debug logs you need? It is an really old f77 program, that i try to re-run

example:
user@spark-9452:~/fortran/f/phaser$ ./WMAT_WO_CONTROL
1

 PERMEABILITY MUR (*) AS A FUNCTION OF FREQUENCY ====>

1
0.000 0.200 0.400 0.600 0.800 1.000
0.12000E+11 ±------------------±------------------±------------------±------------------±------ * ---------+
0.12025E+11 | | | | | * |
0.12050E+11 | | | | | * |
0.12075E+11 | | | | | * |
0.12100E+11 | | | | | * |
0.12125E+11 | | | | | * |
0.12150E+11 | | | | | * |
0.12175E+11 | | | | | * |
0.12200E+11 | | | | | * |
0.12225E+11 | | | | | * |
0.12250E+11 ±------------------±------------------±------------------±------------------±------ * ---------+
0.12275E+11 | | | | | * |
0.12300E+11 | | | | | * |
0.12325E+11 | | | | | * |
0.12350E+11 | | | | | * |
0.12375E+11 | | | | | * |
0.12400E+11 | | | | | * |
0.12425E+11 | | | | | * |
0.12450E+11 | | | | | * |
0.12475E+11 | | | | | * |
0.12500E+11 ±------------------±------------------±------------------±------------------±------- * --------+
0.12525E+11 | | | | | * |
0.12550E+11 | | | | | * |
0.12575E+11 | | | | | * |
0.12600E+11 | | | | | * |
0.12625E+11 | | | | | * |
0.12650E+11 | | | | | * |
0.12675E+11 | | | | | * |
0.12700E+11 | | | | | * |
0.12725E+11 | | | | | * |
0.000 0.200 0.400 0.600 0.800 1.000
1

 PERMEABILITY MUI (*) AS A FUNCTION OF FREQUENCY ====>

1
0.000 0.001 0.002 0.003 0.004 0.005
0.12000E+11 ±----- * ----------±------------------±------------------±------------------±------------------+
0.12025E+11 | * | | | | |
0.12050E+11 | * | | | | |
0.12075E+11 | * | | | | |
0.12100E+11 | * | | | | |
0.12125E+11 | * | | | | |
0.12150E+11 | * | | | | |
0.12175E+11 | * | | | | |
0.12200E+11 | * | | | | |
0.12225E+11 | * | | | | |
0.12250E+11 ±----- * ----------±------------------±------------------±------------------±------------------+
0.12275E+11 | * | | | | |
0.12300E+11 | * | | | | |
0.12325E+11 | * | | | | |
0.12350E+11 | * | | | | |
0.12375E+11 | * | | | | |
0.12400E+11 | * | | | | |
0.12425E+11 | * | | | | |
0.12450E+11 | * | | | | |
0.12475E+11 | * | | | | |
0.12500E+11 ±----- * ----------±------------------±------------------±------------------±------------------+
0.12525E+11 | * | | | | |
0.12550E+11 | * | | | | |
0.12575E+11 | * | | | | |
0.12600E+11 | * | | | | |
0.12625E+11 | * | | | | |
0.12650E+11 | * | | | | |
0.12675E+11 | * | | | | |
0.12700E+11 | * | | | | |
0.12725E+11 | * | | | | |
0.000 0.001 0.002 0.003 0.004 0.005
Segmentation fault (core dumped)

Stefan

segm.zip (74.2 KB)

Thanks, I needed something to reproduce your error. In this case, the segv is coming from your program and appears to be an out-of-bound access.

Note the error is not specific to Spark, but occurs on other ARM systems as well as x86.

Compiling with the flags “-O0 -g -Mbounds”, the binary will fail with messages pointing you to the arrays that cause the OOB.

I was able to get it to run after applying the following changes. I’m not sure if I’m correct with the array sizes I used (like setting NMAX=20 instead of 2, given that’s the value of NMAX at the start of the program), so please verify these changes. I’m also not sure if the results are correct or not. I’m guessing there are other issues with this code that you might want to investigate.

Here’s the diff with my changes:

% diff -u  WMAT_WO_CONTROL.f  WMAT_WO_CONTROL.mod.f
--- WMAT_WO_CONTROL.f   2026-01-11 11:34:29.000000000 -0800
+++ WMAT_WO_CONTROL.mod.f       2026-01-12 08:39:21.859574000 -0800
@@ -990,7 +990,7 @@
       RETURN
       END
       SUBROUTINE CALFUN (N,X,F)
-      DIMENSION X(1),F(1)
+      DIMENSION X(2),F(2)
       COMPLEX X1,PAR1,AMIEF,EPS,EQUA
       COMMON/CARM/PAR1,PAR2,AMIEF,EPS
       COMMON/ASTR/D,DELTA,A
@@ -1003,7 +1003,7 @@
       SUBROUTINE HYBRI(N,X,F,AJINV,DSTEP,DMAX,ACC,MAXFUN,IPRINT,W,IPCP)
 C     DIESE SUBROUTINE BENUTZT DAS POWELL-HYBRID-VERFAHREN FUER
 C     DIE BERECHNUNG DER TRANZENDENTEN GLEICHUNG F(GAMMA).
-      DIMENSION X(1),F(1),AJINV(N,N),W(1)
+      DIMENSION X(2),F(2),AJINV(N,N),W(*)
       LOGICAL FEHLER
       PARAMETER (NMAX=2)
 C     SETZE VERSCHIEDENE PARAMETER
@@ -1383,7 +1383,7 @@
       GO TO 38
  1300 END
       SUBROUTINE INVE(MAT,N,FEHLER)
-                       PARAMETER ( NMAX = 2 )
+                       PARAMETER ( NMAX = 20 )
                        REAL MAT(1:NMAX,1:NMAX)
                        LOGICAL FEHLER
 C                      ..INVERTIERT DIE MATRIX MAT NACH DEM GAUSS-
@@ -1418,7 +1418,7 @@
                  GOTO 999
                ENDIF
             ENDIF
-         IF ( GEFUND .EQ. .TRUE. ) EXIT
+         IF ( GEFUND .EQV. .TRUE. ) EXIT
          ENDDO
 C                 ..MAT(Z,S) IST DAS PIVOTELEMENT
          MAT(Z,S) = 1.D0 / MAT(Z,S)

-Mat

Hello Mat,

thanks, i will check.