Spooles uses only one core

Quite interesting, I am attaching the patch file for easier comparison with the base version:

diff -u1rN src/CalculiX.h src_CFturbo/CalculiX.h
--- src/CalculiX.h	2021-12-17 13:13:23.003552500 +0100
+++ src_CFturbo/CalculiX.h	2023-10-25 12:13:14.000000000 +0200
@@ -65,3 +65,3 @@
 
-#ifdef LONGLONG
+#ifdef INTSIZE64
 #define ITG long long
@@ -817,3 +817,3 @@
                ITG *nload,
-               ITG **nactdofp,ITG *neq,ITG *nzl,ITG *icol,ITG *irow,
+               ITG **nactdofp,ITG *neq,ITG *nzl,ITG *icol,ITG **irowp,
                ITG *nmethod,ITG **ikmpcp,ITG **ilmpcp,ITG **ikbounp,
@@ -1229,3 +1229,3 @@
                ITG *nload,
-               ITG **nactdofp,ITG *neq,ITG *nzl,ITG *icol,ITG *irow,
+               ITG **nactdofp,ITG *neq,ITG *nzl,ITG *icol,ITG **irowp,
                ITG *nmethod,ITG **ikmpcp,ITG **ilmpcp,ITG **ikbounp,
@@ -4463,3 +4463,3 @@
           ITG *nload,
-          ITG **nactdof,ITG *neq,ITG *nzl,ITG *icol,ITG *irow,
+          ITG **nactdof,ITG *neq,ITG *nzl,ITG *icol,ITG **irowp,
           ITG *nmethod,ITG **ikmpcp,ITG **ilmpcp,ITG **ikboun,
diff -u1rN src/CalculiXstep.c src_CFturbo/CalculiXstep.c
--- src/CalculiXstep.c	2021-12-17 13:13:22.983552400 +0100
+++ src_CFturbo/CalculiXstep.c	2023-10-26 14:06:54.000000000 +0200
@@ -17,5 +17,5 @@
 
-#ifdef __WIN32
+/*#ifdef __WIN32
 _set_output_format(_TWO_DIGIT_EXPONENT);
-#endif
+#endif*/
 
@@ -167,2 +167,4 @@
      CalculiXstep, therefore they are declared as static */
+
+  setvbuf(stdout, NULL, _IONBF, 0);
   
@@ -1545,3 +1547,3 @@
 	     nelemload,sideload,xload,nload,
-	     &nactdof,neq,&nzl,icol,irow,nmethod,&ikmpc,&ilmpc,&ikboun,&ilboun,
+	     &nactdof,neq,&nzl,icol,&irow,nmethod,&ikmpc,&ilmpc,&ikboun,&ilboun,
 	     elcon,nelcon,rhcon,nrhcon,cocon,ncocon,
@@ -1578,3 +1580,3 @@
 		    nelemload,sideload,xload,nload,
-		    &nactdof,neq,&nzl,icol,irow,nmethod,&ikmpc,&ilmpc,&ikboun,
+		    &nactdof,neq,&nzl,icol,&irow,nmethod,&ikmpc,&ilmpc,&ikboun,
 		    &ilboun,
@@ -1608,3 +1610,3 @@
 		    nelemload,sideload,xload,nload,
-		    &nactdof,neq,&nzl,icol,irow,nmethod,&ikmpc,&ilmpc,&ikboun,
+		    &nactdof,neq,&nzl,icol,&irow,nmethod,&ikmpc,&ilmpc,&ikboun,
 		    &ilboun,
diff -u1rN src/arpack.c src_CFturbo/arpack.c
--- src/arpack.c	2021-12-17 13:13:22.979552400 +0100
+++ src_CFturbo/arpack.c	2023-06-19 11:05:06.000000000 +0200
@@ -811,3 +811,3 @@
       for(k=0;k<neq[1];k++){sum+=z[kref+k]*temp_array[k];}
-      printf("U^T*M*U=%f for eigenmode %d\n",j+1,sum);
+      printf("U^T*M*U=%f for eigenmode %d\n",sum,j+1);
 
@@ -919,2 +919,22 @@
 
+	/* nzs,irow,jq and icol have to be stored too, since the analysis
+	   can involve contacts
+	*/
+
+	if(fwrite(nzs,sizeof(ITG),3,f1)!=3){
+	  printf("*ERROR saving the number of subdiagonal nonzeros to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(irow,sizeof(ITG),nzs[2],f1)!=nzs[2]){
+	  printf("*ERROR saving irow to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+	  printf("*ERROR saving jq to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+	  printf("*ERROR saving icol to the eigenvalue file...");
+	  exit(0);
+	}
     if(fwrite(ad,sizeof(double),neq[1],f1)!=neq[1]){
diff -u1rN src/arpackcs.c src_CFturbo/arpackcs.c
--- src/arpackcs.c	2021-12-17 13:13:22.979552400 +0100
+++ src_CFturbo/arpackcs.c	2023-06-19 11:04:50.000000000 +0200
@@ -1028,3 +1028,24 @@
 	/* stiffness matrix */
-	      
+
+	/* nzs,irow,jq and icol have to be stored too, since the analysis
+	   can involve contacts
+	*/
+
+	if(fwrite(nzs,sizeof(ITG),3,f1)!=3){
+	  printf("*ERROR saving the number of subdiagonal nonzeros to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(irow,sizeof(ITG),nzs[1],f1)!=nzs[1]){
+	  printf("*ERROR saving irow to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+	  printf("*ERROR saving jq to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+	  printf("*ERROR saving icol to the eigenvalue file...");
+	  exit(0);
+	}
+      
 	if(fwrite(ad,sizeof(double),neq[1],f1)!=neq[1]){
@@ -1033,2 +1054,3 @@
 	}
+
 	if(fwrite(au,sizeof(double),nzs[1],f1)!=nzs[1]){
@@ -1043,3 +1065,3 @@
 	  exit(0);
-	}
+	}	
 	if(fwrite(aub,sizeof(double),nzs[1],f1)!=nzs[1]){
diff -u1rN src/ccx_2.19.c src_CFturbo/ccx_2.19.c
--- src/ccx_2.19.c	2021-12-17 13:15:26.240150900 +0100
+++ src_CFturbo/ccx_2.19.c	2023-10-27 13:49:00.000000000 +0200
@@ -17,5 +17,5 @@
 
-#ifdef __WIN32
+/*#ifdef __WIN32
 _set_output_format(_TWO_DIGIT_EXPONENT);
-#endif
+#endif*/
 
@@ -38,4 +38,3 @@
 int main(int argc,char *argv[])
-{
-  
+{	
   FILE *f1;
@@ -115,3 +114,5 @@
   clock_gettime(CLOCK_MONOTONIC, &totalCalculixTimeStart);
-
+  
+  setvbuf(stdout, NULL, _IONBF, 0);
+  
   if(argc==1){printf("Usage: CalculiX.exe -i jobname\n");FORTRAN(stop,());}
@@ -1389,3 +1390,3 @@
 	     nelemload,sideload,xload,&nload,
-	     &nactdof,neq,&nzl,icol,irow,&nmethod,&ikmpc,&ilmpc,&ikboun,&ilboun,
+	     &nactdof,neq,&nzl,icol,&irow,&nmethod,&ikmpc,&ilmpc,&ikboun,&ilboun,
 	     elcon,nelcon,rhcon,nrhcon,cocon,ncocon,
@@ -1422,3 +1423,3 @@
 		    nelemload,sideload,xload,&nload,
-		    &nactdof,neq,&nzl,icol,irow,&nmethod,&ikmpc,&ilmpc,&ikboun,
+		    &nactdof,neq,&nzl,icol,&irow,&nmethod,&ikmpc,&ilmpc,&ikboun,
 		    &ilboun,
@@ -1452,3 +1453,3 @@
 		    nelemload,sideload,xload,&nload,
-		    &nactdof,neq,&nzl,icol,irow,&nmethod,&ikmpc,&ilmpc,&ikboun,
+		    &nactdof,neq,&nzl,icol,&irow,&nmethod,&ikmpc,&ilmpc,&ikboun,
 		    &ilboun,
diff -u1rN src/complexfreq.c src_CFturbo/complexfreq.c
--- src/complexfreq.c	2021-12-17 13:13:22.983552400 +0100
+++ src_CFturbo/complexfreq.c	2022-09-20 09:42:54.000000000 +0200
@@ -28,3 +28,3 @@
 		 ITG *nload,
-		 ITG **nactdofp,ITG *neq,ITG *nzl,ITG *icol,ITG *irow,
+		 ITG **nactdofp,ITG *neq,ITG *nzl,ITG *icol,ITG **irowp,
 		 ITG *nmethod,ITG **ikmpcp,ITG **ilmpcp,ITG **ikbounp,
@@ -82,3 +82,3 @@
     *ikboun2=NULL,*ilboun2=NULL,*ikmpc2=NULL,*ilmpc2=NULL,mortartrafoflag=0,
-    intscheme=0;
+    intscheme=0,*irow=NULL;
 
@@ -124,3 +124,4 @@
   fmpc=*fmpcp;veold=*veoldp;iamt1=*iamt1p;t0=*t0p;t1=*t1p;t1old=*t1oldp;
-
+  irow=*irowp;  
+	
   tinc=&timepar[0];
@@ -242,2 +243,28 @@
       
+//    NNEW(ad,double,neq[1]);
+//    NNEW(adb,double,neq[1]);
+//    NNEW(au,double,nzs[2]);
+//    NNEW(aub,double,nzs[1]);
+      
+    /* reading the stiffness matrix */
+
+	if(fread(nzs,sizeof(ITG),3,f1)!=3){
+	  printf("*ERROR in complexfreq reading the number of subdiagonal nonzeros in the eigenvalue file...");
+	  exit(0);
+	}
+
+	RENEW(irow,ITG,nzs[2]);
+	if(fread(irow,sizeof(ITG),nzs[2],f1)!=nzs[2]){
+	  printf("ERROR in complexfreq reading irow in the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+	  printf("ERROR in complexfreq reading jq in the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+	  printf("ERROR in complexfreq reading icol in the eigenvalue file...");
+	  exit(0);
+	}
+
     NNEW(ad,double,neq[1]);
@@ -246,4 +273,2 @@
     NNEW(aub,double,nzs[1]);
-      
-    /* reading the stiffness matrix */
 
@@ -253,3 +278,3 @@
     }
-      
+
     if(fread(au,sizeof(double),nzs[2],f1)!=nzs[2]){
@@ -265,3 +290,3 @@
     }
-      
+
     if(fread(aub,sizeof(double),nzs[1],f1)!=nzs[1]){
@@ -337,3 +362,21 @@
       if(nev==0){
-	    
+
+	if(fread(nzs,sizeof(ITG),3,f1)!=3){
+	  printf("*ERROR in complexfreq reading the number of subdiagonal nonzeros in the eigenvalue file...");
+	  exit(0);
+	}
+	RENEW(irow,ITG,nzs[1]);
+	if(fread(irow,sizeof(ITG),nzs[1],f1)!=nzs[1]){
+	  printf("ERROR in complexfreq reading irow to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+	  printf("ERROR in complexfreq reading jq to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+	  printf("ERROR in complexfreq reading icol to the eigenvalue file...");
+	  exit(0);
+	}
+
 	NNEW(ad,double,neq[1]);
@@ -360,3 +403,3 @@
 	}
-	      
+      
 	if(fread(aub,sizeof(double),nzs[1],f1)!=nzs[1]){
@@ -1026,23 +1069,44 @@
 	  
-      /* storing the stiffness matrix */
-	  
-      if(fwrite(ad,sizeof(double),neq[1],f1)!=neq[1]){
-	printf("*ERROR in complexfreq saving the diagonal of the stiffness matrix to the eigenvalue file...");
-	exit(0);
-      }
-      if(fwrite(au,sizeof(double),nzs[2],f1)!=nzs[2]){
-	printf("*ERROR in complexfreq saving the off-diagonal entries of the stiffness matrix to the eigenvalue file...");
-	exit(0);
-      }
+    /* storing the stiffness matrix */
+
+	/* nzs,irow,jq and icol have to be stored too, since the analysis
+	   can involve contacts
+	*/
+
+	if(fwrite(nzs,sizeof(ITG),3,f1)!=3){
+	  printf("*ERROR saving the number of subdiagonal nonzeros to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(irow,sizeof(ITG),nzs[2],f1)!=nzs[2]){
+	  printf("*ERROR saving irow to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+	  printf("*ERROR saving jq to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+	  printf("*ERROR saving icol to the eigenvalue file...");
+	  exit(0);
+	}  
+    if(fwrite(ad,sizeof(double),neq[1],f1)!=neq[1]){
+		printf("*ERROR in complexfreq saving the diagonal of the stiffness matrix to the eigenvalue file...");
+		exit(0);
+    }
+    if(fwrite(au,sizeof(double),nzs[2],f1)!=nzs[2]){
+		printf("*ERROR in complexfreq saving the off-diagonal entries of the stiffness matrix to the eigenvalue file...");
+		exit(0);
+    }
 	  
-      /* storing the mass matrix */
+    /* storing the mass matrix */
 	  
-      if(fwrite(adb,sizeof(double),neq[1],f1)!=neq[1]){
-	printf("*ERROR in complexfreq saving the diagonal of the mass matrix to the eigenvalue file...");
-	exit(0);
-      }
-      if(fwrite(aub,sizeof(double),nzs[1],f1)!=nzs[1]){
-	printf("*ERROR in complexfreq saving the off-diagonal entries of the mass matrix to the eigenvalue file...");
-	exit(0);
-      }
+    if(fwrite(adb,sizeof(double),neq[1],f1)!=neq[1]){
+		printf("*ERROR in complexfreq saving the diagonal of the mass matrix to the eigenvalue file...");
+		exit(0);
+    }
+	
+    if(fwrite(aub,sizeof(double),nzs[1],f1)!=nzs[1]){
+		printf("*ERROR in complexfreq saving the off-diagonal entries of the mass matrix to the eigenvalue file...");
+		exit(0);
+    }
 	  
@@ -1129,2 +1193,23 @@
       /* storing the stiffness matrix */
+
+	/* nzs,irow,jq and icol have to be stored too, since the analysis
+	   can involve contacts
+	*/
+
+	if(fwrite(nzs,sizeof(ITG),3,f1)!=3){
+	  printf("*ERROR saving the number of subdiagonal nonzeros to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(irow,sizeof(ITG),nzs[1],f1)!=nzs[1]){
+	  printf("*ERROR saving irow to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+	  printf("*ERROR saving jq to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+	  printf("*ERROR saving icol to the eigenvalue file...");
+	  exit(0);
+	}  
 	  
@@ -1134,2 +1219,3 @@
       }
+  
       if(fwrite(au,sizeof(double),*nzs,f1)!=*nzs){
@@ -1145,2 +1231,3 @@
       }
+  
       if(fwrite(aub,sizeof(double),*nzs,f1)!=*nzs){
@@ -1976,3 +2063,4 @@
   *stip=sti;
-
+  *irowp=irow;
+  
   return;
diff -u1rN src/crackpropagations.f src_CFturbo/crackpropagations.f
--- src/crackpropagations.f	2021-12-17 13:13:22.835551700 +0100
+++ src_CFturbo/crackpropagations.f	2022-07-06 13:41:06.000000000 +0200
@@ -122,3 +122,3 @@
         call inputerror(inpc,ipoinpc,iline,
-     &       "*CRACK PROPAGATION%")
+     &       "*CRACK PROPAGATION%",ier)
       endif
diff -u1rN src/dyna.c src_CFturbo/dyna.c
--- src/dyna.c	2021-12-17 13:13:22.987552400 +0100
+++ src_CFturbo/dyna.c	2022-09-20 10:21:42.000000000 +0200
@@ -44,3 +44,3 @@
 	  ITG *nload,
-	  ITG **nactdofp,ITG *neq,ITG *nzl,ITG *icol,ITG *irow,
+	  ITG **nactdofp,ITG *neq,ITG *nzl,ITG *icol,ITG **irowp,
 	  ITG *nmethod,ITG **ikmpcp,ITG **ilmpcp,ITG **ikbounp,
@@ -106,3 +106,4 @@
     *ndirboun2=NULL,*nodeboun2=NULL,nmpc2,*ipompc2=NULL,*nodempc2=NULL,
-    *ikboun2=NULL,*ilboun2=NULL,*ikmpc2=NULL,*ilmpc2=NULL,mortartrafoflag=0;
+    *ikboun2=NULL,*ilboun2=NULL,*ikmpc2=NULL,*ilmpc2=NULL,mortartrafoflag=0,
+	*irow=NULL;
 
@@ -169,2 +170,3 @@
   fmpc=*fmpcp;veold=*veoldp;iamt1=*iamt1p;t0=*t0p;t1=*t1p;t1old=*t1oldp;
+  irow=*irowp; 
   
@@ -405,3 +407,21 @@
     }
-      
+
+	if(fread(nzs,sizeof(ITG),3,f1)!=3){
+	  printf("*ERROR in dyna reading the number of subdiagonal nonzeros in the eigenvalue file...");
+	  exit(0);
+	}
+	RENEW(irow,ITG,nzs[2]);
+	if(fread(irow,sizeof(ITG),nzs[2],f1)!=nzs[2]){
+	  printf("ERROR in dyna reading irow to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+	  printf("ERROR in dyna reading jq to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+	  printf("ERROR in dyna reading icol to the eigenvalue file...");
+	  exit(0);
+	}
+     
     NNEW(ad,double,neq[1]);
@@ -410,3 +430,3 @@
     NNEW(aub,double,nzs[1]);
-      
+   
     if(fread(ad,sizeof(double),neq[1],f1)!=neq[1]){
@@ -419,3 +439,3 @@
     }
-      
+     
     if(fread(au,sizeof(double),nzs[2],f1)!=nzs[2]){
@@ -428,3 +448,3 @@
     }
-      
+	
     if(fread(adb,sizeof(double),neq[1],f1)!=neq[1]){
@@ -437,3 +457,3 @@
     }
-      
+    
     if(fread(aub,sizeof(double),nzs[1],f1)!=nzs[1]){
@@ -496,2 +516,21 @@
       if(nev==0){
+		  
+	if(fread(nzs,sizeof(ITG),3,f1)!=3){
+	  printf("*ERROR in dyna reading the number of subdiagonal nonzeros in the eigenvalue file...");
+	  exit(0);
+	}
+	RENEW(irow,ITG,nzs[1]);
+	if(fread(irow,sizeof(ITG),nzs[1],f1)!=nzs[1]){
+	  printf("ERROR in dyna reading irow to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+	  printf("ERROR in dyna reading jq to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+	  printf("ERROR in dyna reading icol to the eigenvalue file...");
+	  exit(0);
+	}		  
+		  		  
 	NNEW(ad,double,neq[1]);
@@ -2094,3 +2133,4 @@
   *stip=sti;*xstatep=xstate;
-
+  *irowp=irow;
+  
   (*ttime)+=(*tper);
diff -u1rN src/includefilename.f src_CFturbo/includefilename.f
--- src/includefilename.f	2021-12-17 13:13:22.863551800 +0100
+++ src_CFturbo/includefilename.f	2022-07-05 11:08:36.000000000 +0200
@@ -24,3 +24,3 @@
 !
-      character*132 includefn
+      character*255 includefn
       character*1320 text
@@ -46,3 +46,3 @@
               write(*,*) '*ERROR in the input deck. Card image:'
-              write(*,'(132a1)') 
+              write(*,'(255a1)') 
      &             (text(kk:kk),kk=1,lincludefn)
@@ -59,3 +59,3 @@
          write(*,*) '*ERROR in the input deck. Card image:'
-         write(*,'(132a1)')
+         write(*,'(255a1)')
      &             (text(kk:kk),kk=1,lincludefn)
@@ -65,3 +65,3 @@
       if(nend.ge.nstart) then
-         if(nend-nstart+1.le.132) then
+         if(nend-nstart+1.le.255) then
             includefn(1:nend-nstart+1)=text(nstart:nend)
@@ -71,3 +71,3 @@
             write(*,*) '*ERROR in the input deck. Card image:'
-            write(*,'(132a1)')
+            write(*,'(255a1)')
      &             (text(kk:kk),kk=1,lincludefn)
@@ -78,3 +78,3 @@
          write(*,*) '*ERROR in the input deck. Card image:'
-         write(*,'(132a1)')
+         write(*,'(255a1)')
      &             (text(kk:kk),kk=1,lincludefn)
diff -u1rN src/linstatic.c src_CFturbo/linstatic.c
--- src/linstatic.c	2021-12-17 13:13:22.991552400 +0100
+++ src_CFturbo/linstatic.c	2022-07-20 14:11:36.000000000 +0200
@@ -765,3 +765,23 @@
       /* storing the stiffness matrix */
-	  
+
+	/* nzs,irow,jq and icol have to be stored too, since the analysis
+	   can involve contacts
+	*/
+
+	if(fwrite(nzs,sizeof(ITG),3,f1)!=3){
+	  printf("*ERROR saving the number of subdiagonal nonzeros to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(irow,sizeof(ITG),nzs[2],f1)!=nzs[2]){
+	  printf("*ERROR saving irow to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+	  printf("*ERROR saving jq to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fwrite(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+	  printf("*ERROR saving icol to the eigenvalue file...");
+	  exit(0);
+	}	  
       if(fwrite(ad,sizeof(double),neq[1],f2)!=neq[1]){
@@ -769,3 +789,3 @@
 	exit(0);
-      }
+      }  
       if(fwrite(au,sizeof(double),nzs[2],f2)!=nzs[2]){
@@ -781,2 +801,3 @@
       }
+	  
       if(fwrite(aub,sizeof(double),nzs[1],f2)!=nzs[1]){
diff -u1rN src/pardiso.c src_CFturbo/pardiso.c
--- src/pardiso.c	2021-12-17 13:13:22.995552400 +0100
+++ src_CFturbo/pardiso.c	2023-05-08 14:11:22.000000000 +0200
@@ -40,3 +40,3 @@
   ITG i,j,k,l,maxfct=1,mnum=1,phase=12,nrhs=1,*perm=NULL,mtype,
-    msglvl=0,error=0,*irowpardiso=NULL,kflag,kstart,n,ifortran,
+    msglvl=1,error=0,*irowpardiso=NULL,kflag,kstart,n,ifortran,
     lfortran,index,id,k2;
@@ -51,4 +51,2 @@
 
-  iparm[0]=0;
-  iparm[1]=3;
   /* set MKL_NUM_THREADS to min(CCX_NPROC_EQUATION_SOLVER,OMP_NUM_THREADS)
@@ -77,3 +75,3 @@
 
-  for(i=0;i<64;i++){pt[i]=0;}
+  //for(i=0;i<64;i++){pt[i]=0;}
 
@@ -294,2 +292,7 @@
   }
+  
+  // Fill iparm with default values
+  FORTRAN(pardisoinit,(pt, &mtype, iparm));
+  iparm[1]=3;
+  iparm[59]=1;
 
@@ -306,3 +309,3 @@
   ITG maxfct=1,mnum=1,phase=33,*perm=NULL,mtype,
-    msglvl=0,i,error=0;
+    msglvl=1,i,error=0;
   double *x=NULL;
@@ -324,3 +327,3 @@
   }
-  iparm[1]=3;
+  //iparm[1]=3;
   
@@ -345,3 +348,3 @@
   ITG maxfct=1,mnum=1,phase=-1,*perm=NULL,nrhs=1,mtype,
-    msglvl=0,error=0;
+    msglvl=1,error=0;
   double *b=NULL,*x=NULL;
diff -u1rN src/pardiso.h src_CFturbo/pardiso.h
--- src/pardiso.h	2021-12-17 13:13:23.003552500 +0100
+++ src_CFturbo/pardiso.h	2023-11-01 09:54:04.000000000 +0100
@@ -36,2 +36,2 @@
 
-char envMKL[32];
+static char envMKL[32];
diff -u1rN src/pastix.c src_CFturbo/pastix.c
--- src/pastix.c	2021-12-17 13:13:22.995552400 +0100
+++ src_CFturbo/pastix.c	2023-02-23 16:06:36.000000000 +0100
@@ -206,3 +206,35 @@
 	// Set best PaStiX parameters for CalculiX usage
-    iparm[IPARM_ORDERING]  				= PastixOrderScotch;
+	const char* pastix_ordering = getenv("PASTIX_ORDERING");
+	if(pastix_ordering == NULL){
+		iparm[IPARM_ORDERING]  			= PastixOrderScotch;			//Default
+	}
+    else if(atoi(pastix_ordering) == 1) {
+		iparm[IPARM_ORDERING]  			= PastixOrderMetis;
+    }		
+    else {	
+		iparm[IPARM_ORDERING]  			= PastixOrderScotch;
+    }
+    if( mode == AS ){
+	    iparm[IPARM_SCHEDULER] 				= PastixSchedStatic;
+    }
+    else{
+		const char* pastix_scheduler = getenv("PASTIX_SCHEDULER");
+		if(pastix_scheduler == NULL){
+			iparm[IPARM_SCHEDULER] 			= PastixSchedStatic;		//Default
+		}
+		else if(atoi(pastix_scheduler) == 1) {	
+			iparm[IPARM_SCHEDULER] 			= PastixSchedStarPU;
+		}
+		else if(atoi(pastix_scheduler) == 2) {	
+			iparm[IPARM_SCHEDULER] 			= PastixSchedParsec;
+		}
+		else if(atoi(pastix_scheduler) == 3) {	
+			iparm[IPARM_SCHEDULER] 			= PastixSchedSequential;
+		}
+		else {
+			iparm[IPARM_SCHEDULER] 			= PastixSchedStatic;
+		}
+    }
+	
+    /*iparm[IPARM_ORDERING]  				= PastixOrderScotch;
     if( mode == AS ){
@@ -212,3 +244,3 @@
         iparm[IPARM_SCHEDULER] 			= PastixSchedParsec;
-    }
+    }*/
 	iparm[IPARM_THREAD_NBR]				= nthread_mkl;
diff -u1rN src/readinput.c src_CFturbo/readinput.c
--- src/readinput.c	2021-12-17 13:13:22.995552400 +0100
+++ src_CFturbo/readinput.c	2023-08-31 14:57:50.000000000 +0200
@@ -22,2 +22,3 @@
 #include <ctype.h>
+#include <stdbool.h>
 #include "CalculiX.h"
@@ -33,3 +34,3 @@
 
-  char buff[1320]="", fninp[132]="", includefn[132]="", *inpc=NULL,
+  char buff[1320]="", fninp[132]="", includefn[255]="", *inpc=NULL,
        textpart[2112]="",*set=NULL;
@@ -46,2 +47,4 @@
 
+  bool isFileName = false;
+
   /* initialization */
@@ -93,8 +96,13 @@
       i=-1;
-      if(iheading==0){
+      if(iheading==0){	  
 	  do{
 	      i++;
-	      if((buff[i]=='\0')||(buff[i]=='\n')||(buff[i]=='\r')||(k==1320)) break;
-	      if((buff[i]==' ')||(buff[i]=='\t')) continue;
-	      buff[k]=buff[i];
+	      if((buff[i]=='\0')||(buff[i]=='\n')||(buff[i]=='\r')||(k==1320)) {
+			  isFileName = false;
+			  break;
+	      }
+	      if(buff[i]=='\t') continue;
+		  if(buff[i] == '"') isFileName = !isFileName;
+		  if((buff[i]==' ') && !isFileName) continue;
+	      buff[k]=buff[i];  
 	      k++;
diff -u1rN src/restartwrite.f src_CFturbo/restartwrite.f
--- src/restartwrite.f	2021-12-17 13:13:23.207553500 +0100
+++ src_CFturbo/restartwrite.f	2023-10-26 10:31:58.000000000 +0200
@@ -48,2 +48,3 @@
       logical op
+	  logical fileExists 
 !     
@@ -115,3 +116,5 @@
 !     
-         call system("rm -f temporaryrestartfile")
+!         call system("rm -f temporaryrestartfile")
+		 INQUIRE( FILE='.temporaryrestartfile', EXIST=fileExists ) 
+		 IF ( fileExists ) call system("del temporaryrestartfile")
 !     
@@ -487,7 +490,12 @@
 !     
-      if(irstrt(2).eq.1) then
-         close(15)
-         call system("rm -f "//fnrstrt(1:ipos+4))
-         call system("mv temporaryrestartfile "//fnrstrt(1:ipos+4))
-      endif
+!      if(irstrt(2).eq.1) then
+!         close(15)
+!         call system("rm -f "//fnrstrt(1:ipos+4))
+!         call system("mv temporaryrestartfile "//fnrstrt(1:ipos+4))
+!      endif
+!      if(irstrt(2).eq.1) then
+!         close(15)
+!         call system("del "//fnrstrt(1:ipos+4))
+!         call system("ren temporaryrestartfile "//fnrstrt(1:ipos+4))
+!      endif
 !     
diff -u1rN src/sensi_coor.c src_CFturbo/sensi_coor.c
--- src/sensi_coor.c	2021-12-17 13:13:22.999552500 +0100
+++ src_CFturbo/sensi_coor.c	2022-07-20 15:29:02.000000000 +0200
@@ -518,2 +518,20 @@
 		  }*/
+
+	if(fread(nzs,sizeof(ITG),3,f1)!=3){
+	  printf("*ERROR in sensitivity reading the number of subdiagonal nonzeros in the eigenvalue file...");
+	  exit(0);
+	}
+	RENEW(irow,ITG,nzs[2]);
+	if(fread(irow,sizeof(ITG),nzs[2],f1)!=nzs[2]){
+	  printf("ERROR in sensitivity reading irow to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+	  printf("ERROR in sensitivity reading jq to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+	  printf("ERROR in sensitivity reading icol to the eigenvalue file...");
+	  exit(0);
+	}
 	  
@@ -521,3 +539,4 @@
       NNEW(adb,double,neq[1]);
-      NNEW(au,double,nzsprevstep[2]);
+      //NNEW(au,double,nzsprevstep[2]);
+	  NNEW(au,double,nzs[2]);
       NNEW(aub,double,nzs[1]);
@@ -533,3 +552,3 @@
 	  
-      if(fread(au,sizeof(double),nzsprevstep[2],f1)!=nzsprevstep[2]){
+      if(fread(au,sizeof(double),nzs[2],f1)!=nzs[2]){
 	printf(" *ERROR in sensitivity reading the off-diagonals of the stiffness matrix in the eigenvalue file");
@@ -608,2 +627,20 @@
 
+	  if(fread(nzs,sizeof(ITG),3,f1)!=3){
+		printf("*ERROR in sensitivity reading the number of subdiagonal nonzeros in the eigenvalue file...");
+		exit(0);
+	  }
+	  RENEW(irow,ITG,nzs[1]);
+	  if(fread(irow,sizeof(ITG),nzs[1],f1)!=nzs[1]){
+		printf("ERROR in sensitivity reading irow to the eigenvalue file...");
+		exit(0);
+	  }
+	  if(fread(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+		printf("ERROR in sensitivity reading jq to the eigenvalue file...");
+		exit(0);
+	  }
+	  if(fread(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+		printf("ERROR in sensitivity reading icol to the eigenvalue file...");
+		exit(0);
+	  }
+
 	  NNEW(ad,double,neq[1]);
diff -u1rN src/sensi_orien.c src_CFturbo/sensi_orien.c
--- src/sensi_orien.c	2021-12-17 13:13:22.999552500 +0100
+++ src_CFturbo/sensi_orien.c	2022-07-20 15:29:00.000000000 +0200
@@ -421,2 +421,21 @@
 		  }*/
+
+	if(fread(nzs,sizeof(ITG),3,f1)!=3){
+	  printf("*ERROR in sensitivity reading the number of subdiagonal nonzeros in the eigenvalue file...");
+	  exit(0);
+	}
+	RENEW(irow,ITG,nzs[2]);
+	if(fread(irow,sizeof(ITG),nzs[2],f1)!=nzs[2]){
+	  printf("ERROR in sensitivity reading irow to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+	  printf("ERROR in sensitivity reading jq to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+	  printf("ERROR in sensitivity reading icol to the eigenvalue file...");
+	  exit(0);
+	}
+
 	  
@@ -424,3 +443,4 @@
       NNEW(adb,double,neq[1]);
-      NNEW(au,double,nzsprevstep[2]);
+	  //NNEW(au,double,nzsprevstep[2]);
+	  NNEW(au,double,nzs[2]);
       NNEW(aub,double,nzs[1]);
@@ -436,3 +456,3 @@
 	  
-      if(fread(au,sizeof(double),nzsprevstep[2],f1)!=nzsprevstep[2]){
+      if(fread(au,sizeof(double),nzs[2],f1)!=nzs[2]){
 	printf(" *ERROR in sensitivity reading the off-diagonals of the stiffness matrix in the eigenvalue file");
@@ -511,2 +531,20 @@
 
+	  if(fread(nzs,sizeof(ITG),3,f1)!=3){
+		printf("*ERROR in sensitivity reading the number of subdiagonal nonzeros in the eigenvalue file...");
+		exit(0);
+	  }
+      RENEW(irow,ITG,nzs[1]);
+	  if(fread(irow,sizeof(ITG),nzs[1],f1)!=nzs[1]){
+		printf("ERROR in sensitivity reading irow to the eigenvalue file...");
+		exit(0);
+	  }
+	  if(fread(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+		printf("ERROR in sensitivity reading jq to the eigenvalue file...");
+		exit(0);
+	  }
+	  if(fread(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+		printf("ERROR in sensitivity reading icol to the eigenvalue file...");
+		exit(0);
+	  }
+
 	  NNEW(ad,double,neq[1]);
diff -u1rN src/spooles.c src_CFturbo/spooles.c
--- src/spooles.c	2021-12-17 13:13:22.999552500 +0100
+++ src_CFturbo/spooles.c	2022-07-22 13:57:36.000000000 +0200
@@ -86,12 +86,12 @@
 
-	/*maxdomainsize=neqns/100; */
-	/*if (maxdomainsize==0) maxdomainsize=1; */
+	int maxdomainsize=size/100;
+	if (maxdomainsize==0) maxdomainsize=1;
 	/* *frontETree = orderViaMMD(*graph, RNDSEED, DEBUG_LVL, msgFile) ; */
-	/* *frontETree = orderViaND(*graph,maxdomainsize,RNDSEED,DEBUG_LVL,msgFile); */
+	*frontETree = orderViaND(*graph,maxdomainsize,RNDSEED,DEBUG_LVL,msgFile);
 	/* *frontETree = orderViaMS(*graph,maxdomainsize,RNDSEED,DEBUG_LVL,msgFile); */
 
-	*frontETree =
+	/* *frontETree =
 	    orderViaBestOfNDandMS(*graph, TUNE_MAXDOMAINSIZE,
 				  TUNE_MAXZEROS, TUNE_MAXSIZE, RNDSEED,
-				  DEBUG_LVL, msgFile);
+				  DEBUG_LVL, msgFile);*/
 	if (DEBUG_LVL > 1) {
diff -u1rN src/steadystate.c src_CFturbo/steadystate.c
--- src/steadystate.c	2021-12-17 13:13:22.999552500 +0100
+++ src_CFturbo/steadystate.c	2022-09-20 10:15:14.000000000 +0200
@@ -45,3 +45,3 @@
 		 ITG *nload,
-		 ITG **nactdofp,ITG *neq,ITG *nzl,ITG *icol,ITG *irow,
+		 ITG **nactdofp,ITG *neq,ITG *nzl,ITG *icol,ITG **irowp,
 		 ITG *nmethod,ITG **ikmpcp,ITG **ilmpcp,ITG **ikbounp,
@@ -99,3 +99,4 @@
     *ndirboun2=NULL,*nodeboun2=NULL,nmpc2,*ipompc2=NULL,*nodempc2=NULL,
-    *ikboun2=NULL,*ilboun2=NULL,*ikmpc2=NULL,*ilmpc2=NULL,mortartrafoflag=0;
+    *ikboun2=NULL,*ilboun2=NULL,*ikmpc2=NULL,*ilmpc2=NULL,mortartrafoflag=0,
+	*irow=NULL;
 
@@ -150,2 +151,3 @@
   fmpc=*fmpcp;iamt1=*iamt1p;t0=*t0p;t1=*t1p;t1old=*t1oldp;
+  irow=*irowp;
 
@@ -369,2 +371,27 @@
       
+    //NNEW(ad,double,neq[1]);
+    //NNEW(adb,double,neq[1]);
+    //NNEW(au,double,nzs[2]);
+    //NNEW(aub,double,nzs[1]);
+      
+    /* reading the stiffness matrix */
+
+	if(fread(nzs,sizeof(ITG),3,f1)!=3){
+	  printf("*ERROR in steadystate reading the number of subdiagonal nonzeros in the eigenvalue file...");
+	  exit(0);
+	}
+	RENEW(irow,ITG,nzs[2]);
+	if(fread(irow,sizeof(ITG),nzs[2],f1)!=nzs[2]){
+	  printf("ERROR in steadystate reading irow to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+	  printf("ERROR in steadystate reading jq to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+	  printf("ERROR in steadystate reading icol to the eigenvalue file...");
+	  exit(0);
+	}
+
     NNEW(ad,double,neq[1]);
@@ -374,4 +401,2 @@
       
-    /* reading the stiffness matrix */
-      
     if(fread(ad,sizeof(double),neq[1],f1)!=neq[1]){
@@ -419,3 +444,3 @@
       if(fread(z,sizeof(double),neq[1]*nev,f1)!=neq[1]*nev){
-	printf(" *ERROR in complexfreq reading the eigenvectors in the eigenvalue file...");
+	printf(" *ERROR in steadystate reading the eigenvectors in the eigenvalue file...");
 	printf(" *INFO  in steadystate: if there are problems reading the .eig file this may be due to:\n");
@@ -429,3 +454,3 @@
       if(fread(z,sizeof(double),2*neq[1]*nev,f1)!=2*neq[1]*nev){
-	printf(" *ERROR in complexfreq reading the eigenvectors in the eigenvalue file...");
+	printf(" *ERROR in steadystate reading the eigenvectors in the eigenvalue file...");
 	printf(" *INFO  in steadystate: if there are problems reading the .eig file this may be due to:\n");
@@ -521,2 +546,21 @@
       if(nev==0){
+	
+	if(fread(nzs,sizeof(ITG),3,f1)!=3){
+	  printf("*ERROR in steadystate reading the number of subdiagonal nonzeros in the eigenvalue file...");
+	  exit(0);
+	}
+	RENEW(irow,ITG,nzs[1]);
+	if(fread(irow,sizeof(ITG),nzs[1],f1)!=nzs[2]){
+	  printf("ERROR in steadystate reading irow to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(jq,sizeof(ITG),neq[1]+1,f1)!=neq[1]+1){
+	  printf("ERROR in steadystate reading jq to the eigenvalue file...");
+	  exit(0);
+	}
+	if(fread(icol,sizeof(ITG),neq[1],f1)!=neq[1]){
+	  printf("ERROR in steadystate reading icol to the eigenvalue file...");
+	  exit(0);
+	}		  
+		  
 	NNEW(ad,double,neq[1]);
@@ -3575,3 +3619,3 @@
   *fmpcp=fmpc;*iamt1p=iamt1;*t0p=t0;*t1oldp=t1old;*t1p=t1;
-
+  *irowp=irow;
   //  (*ttime)+=(*tper);
diff -u1rN src/u_calloc.c src_CFturbo/u_calloc.c
--- src/u_calloc.c	2021-12-17 13:13:23.003552500 +0100
+++ src_CFturbo/u_calloc.c	2023-02-24 10:36:00.000000000 +0100
@@ -43,3 +43,3 @@
     printf("*ERROR in u_calloc: error allocating memory\n");
-    printf("variable=%s, file=%s, line=%d, num=%ld, size=%ld\n",ptr_name,file,line,num,size);
+    printf("variable=%s, file=%s, line=%d, num=%ld, size=%ld, size_max of size_t=%zu\n",ptr_name,file,line,num,size, SIZE_MAX);
     if(num<0){

hi, this is an old thread but thought it may be useful for anyone searching for a clue, or having an issue compiling the multithread version of ccx with spooles on linux machines.

just figured out myself that if you had compiled the single-thread version of ccx beforehand, you will need to make clean first, i.e. explicitly rm *.o files in /src, before you can recompile with the Makefile_MT to create a spooles solver which uses multiple cores. Otherwise, the ccx_version_MT executable only uses a single core.

after recompiling all files, the multicore spooles solver can be activated by setting “export OMP_NUM_THREADS=n” and then “ccx_version_MT inputfile”. the file spooles.out will indicate the cores activated.