CalculiX i8 and mingw

Hi all,

I am trying to compile the latest version on i8, unfortunately this error occurs (version 2.16 also has this error):

gcc -Wall -O2 -m64 -march=native -fopenmp -posix -fpic -I/usr/local/PaStiX/pastix_i8/include -I/usr/local/PaStiX/hwloc_i8/include -DARCH="Linux" -DMATRIXSTORAGE -DUSE_MT=1 -DNETWORKOUT -DCALCULIX_EXTERNAL_BEHAVIOURS_SUPPORT -DPASTIX -DPASTIX_FP32 -DLONGLONG -fcommon -I /usr/local/ARPACK_i8 -DARPACK -I /usr/local/SPOOLES.2.2 -DSPOOLES -c external.c -o PASTIX_i8/external.o
<command-line>: error: expected identifier or '(' before numeric constant
<command-line>: error: expected identifier or '(' before numeric constant
<command-line>: error: expected identifier or '(' before numeric constant
<command-line>: error: expected specifier-qualifier-list before numeric constant
<command-line>: error: expected specifier-qualifier-list before numeric constant
expand.c: In function 'expand':
expand.c:749:6: warning: 'idirnew' may be used uninitialized in this function [-Wmaybe-uninitialized]
  749 |    if(nodempcold[3*index+1]==idir){
      |      ^
expand.c:851:20: warning: 'locdir' may be used uninitialized in this function [-Wmaybe-uninitialized]
  851 |         if(fabs(a[3*locdir+idir-1])>1.e-10){
      |                   ~^~~~~~~
<command-line>: error: expected identifier or '(' before numeric constant
<command-line>: error: expected declaration specifiers or '...' before numeric constant
<command-line>: error: expected specifier-qualifier-list before numeric constant
<command-line>: error: expected specifier-qualifier-list before numeric constant
<command-line>: error: expected specifier-qualifier-list before numeric constant
gcc -Wall -O2 -m64 -march=native -fopenmp -posix -fpic -I/usr/local/PaStiX/pastix_i8/include -I/usr/local/PaStiX/hwloc_i8/include -DARCH="Linux" -DMATRIXSTORAGE -DUSE_MT=1 -DNETWORKOUT -DCALCULIX_EXTERNAL_BEHAVIOURS_SUPPORT -DPASTIX -DPASTIX_FP32 -DLONGLONG -fcommon -I /usr/local/ARPACK_i8 -DARPACK -I /usr/local/SPOOLES.2.2 -DSPOOLES -c extrapol_dpelmain.c -o PASTIX_i8/extrapol_dpelmain.o
gcc -Wall -O2 -m64 -march=native -fopenmp -posix -fpic -I/usr/local/PaStiX/pastix_i8/include -I/usr/local/PaStiX/hwloc_i8/include -DARCH="Linux" -DMATRIXSTORAGE -DUSE_MT=1 -DNETWORKOUT -DCALCULIX_EXTERNAL_BEHAVIOURS_SUPPORT -DPASTIX -DPASTIX_FP32 -DLONGLONG -fcommon -I /usr/local/ARPACK_i8 -DARPACK -I /usr/local/SPOOLES.2.2 -DSPOOLES -c extrapol_kelmain.c -o PASTIX_i8/extrapol_kelmain.o
extrapol_dpelmain.c: In function 'extrapol_dpelmain':
extrapol_dpelmain.c:42:9: warning: unused variable 'im' [-Wunused-variable]
   42 |   ITG i,im;
      |         ^~
At top level:
extrapol_dpelmain.c:29:52: warning: 'rf1' defined but not used [-Wunused-variable]
   29 |   *gradpcel1,*gradpcfa1,*xxi1,*xlet1,*xxj1,*xxna1,*rf1;
      |                                                    ^~~
extrapol_dpelmain.c:28:41: warning: 'xxn1' defined but not used [-Wunused-variable]
   28 | static double *xrlfa1,*vfap1,*vel1,*c1,*xxn1,*area1,*volume1,
      |                                         ^~~~
extrapol_dpelmain.c:26:27: warning: 'ip1' defined but not used [-Wunused-variable]
   26 |   *neifa1,*nface1,*ncfd1,*ip1;
      |                           ^~~
<command-line>: error: expected specifier-qualifier-list before numeric constant
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/winscard.h:11,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:97,
                 from external.c:26:
C:/msys64/mingw64/x86_64-w64-mingw32/include/winioctl.h:1430:3: error: unknown type name 'USN'
 1430 |   USN LowUsn;
      |   ^~~
C:/msys64/mingw64/x86_64-w64-mingw32/include/winioctl.h:1431:3: error: unknown type name 'USN'
 1431 |   USN HighUsn;
      |   ^~~
C:/msys64/mingw64/x86_64-w64-mingw32/include/winioctl.h:1440:3: error: unknown type name 'USN'
 1440 |   USN StartUsn;
      |   ^~~
C:/msys64/mingw64/x86_64-w64-mingw32/include/winioctl.h:1454:3: error: unknown type name 'USN'
 1454 |   USN Usn;
      |   ^~~
C:/msys64/mingw64/x86_64-w64-mingw32/include/winioctl.h:1492:3: error: unknown type name 'USN'
 1492 |   USN FirstUsn;
      |   ^~~
C:/msys64/mingw64/x86_64-w64-mingw32/include/winioctl.h:1493:3: error: unknown type name 'USN'
 1493 |   USN NextUsn;
      |   ^~~
C:/msys64/mingw64/x86_64-w64-mingw32/include/winioctl.h:1494:3: error: unknown type name 'USN'
 1494 |   USN LowestValidUsn;
      |   ^~~
C:/msys64/mingw64/x86_64-w64-mingw32/include/winioctl.h:1495:3: error: unknown type name 'USN'
 1495 |   USN MaxUsn;
      |   ^~~
<command-line>: error: expected specifier-qualifier-list before numeric constant
<command-line>: error: expected specifier-qualifier-list before numeric constant
<command-line>: error: expected specifier-qualifier-list before numeric constant
<command-line>: error: expected specifier-qualifier-list before numeric constant
<command-line>: error: expected specifier-qualifier-list before numeric constant
extrapol_kelmain.c:28:52: warning: 'xxn1' defined but not used [-Wunused-variable]
   28 | static double *xrlfa1,*vfap1,*vel1,*c1,*xbounact1,*xxn1,*area1,*volume1,
      |                                                    ^~~~
extrapol_kelmain.c:28:41: warning: 'xbounact1' defined but not used [-Wunused-variable]

have you been able to solve this issue? I’m stuck here as well.
regards

hi guys,

is it possible to compile calculix using the intel oneapi compilers? i compile my own fortran code and it runs 3x faster than with gfortran. i would imagine calculix would run faster as well. i also have less issues with intel fortran.

i don’t plan on compiling calculix myself. i’m just throwing the question out there. the reason being, intel oneapi is now free to use. so no reason not to at least try it out.

you do have to install microsoft visual studio (also free)
the intel oneapi basic
then intel oneapi hpc

so kind of a pain but it’s not a horrible thing.

anthony

Try to replace in CalculiX.h and Makefiles LONGLONG by INTSIZE64 (makefile -DINTSIZE64)

Thanksy guys, will try this. I just hope to compile ccx with pastix relying on the provided msys2/mingw libs.
For spooles this went rather straight forward, pastix is more demanding. Kind of a riddle for Xmas :slight_smile:

CU

1 Like

Finally arpack i8 is available in msys2/mingw64 repo:

https://packages.msys2.org/package/mingw-w64-x86_64-arpack64?repo=mingw64

Makefile: -larpack_64

1 Like

Thank you @rafal.brzegowy !!