Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Old Fortran version on new PC

GWats1
New Contributor I
751 Views

I got a new PC and am trying to install the Latest Visual Studio and latest Fortran compiler. I got VS 2022 installed but was not sure what options I needed. I D/L intel-oneapi-hpc-toolkit-2025.0.1.48_offline.exe and installed it. I opened the VS2022 and tried to load an old .SLN project and it came up. I went to build and it tells me I am missing Win32. 

My old PC has Parallel Studio XE 2020 Composer Edition for Fortran Windows and VS2017.

I'm trying to figure out how to get the Win32 for the newer VS2022 so I can compile my ancient Fortran code.

I think I can find the install EXE's on my old PC and install what I had, but wanted to try to get the newer versions working. 

TIA 

Labels (1)
0 Kudos
8 Replies
JohnNichols
Valued Contributor III
680 Views

intel-oneapi-hpc-toolkit-2025.0.1.48

 

Has IFX only that is 64 bit and not IFORT that has 32 bit.  

 

Your old code will compile with IFX as long as it is pretty straightforward Fortran, if you have a lot of exotic stuff you may run into one or two problems.  Report them here. 

 

I would start with a new .sln in a different directory and add your code to that slowly.  

IFX is not too bad and one presumes that it will get a lot better.  

The question is not should we move from 32 to 64 when we moved from 16 to 32 a long time ago (ie before 35% of all current citizens were born) why are we not able to use 128 bit. 

 

 

 

0 Kudos
GWats1
New Contributor I
645 Views

Which other oneapi toolkit would have IFORT and Win32? I think I had it on my old PC but usually used VS2017 to work on my Fortran programs.

 

I learned Fortran IV in 1968 in my sophomore year of college engineering and still use a lot of very old coding techniques. I had some computed GOTO statements in some old code.

 

I'm tempted to install my old VS2017 and old Parallel Studio to get back what I am familiar with.

 

I struggle with compiling the old code and need to figure out how to ask the user to select an input file from a drop down.  I'm a structural engineer and write code for myself and a few collogues to use. My "user manuals" are generally to look at the READ statements and see what Format I used.        

0 Kudos
Steve_Lionel
Honored Contributor III
612 Views

Why do you think you need 32-bit? The only thing I can think of is that you've mistakenly used INTEGER(4) for things that are addresses or handles in Windows API interfaces.

Take a look at the attached sample program for file selection.

0 Kudos
GWats1
New Contributor I
571 Views

Hello Dr Fortran,

When I tried to compile my old .SLN I got the error message that I needed the Win32. I think it is attached below.  I'll try to post a little bit of my old code below where I declare Real and Integers.  Getting a new PC is nice but having to reinstall all the old programs I use is terrible.

C		THIS SUBROUTINE WILL DESIGN SEVERAL BASE PLATES THAT WILL WORK FOR A POLE FOR ASCE 113 METHODS
C         ON 6-10-2020 I CHANGED THE BASE PLATE MATERIAL TO A572 Fy = 50 KSI and >4 to 42ksi
C         ON 5-27-2022 I ADDED THE ASCE 113 BOLT BENDING UNITY CHECKS
C         ON 2-25-2024 I ADDED VERBOSE MODE TO PRINT INTERMEDIATE RESULTS
C         ON 10-10-24 I ADDED THE FOUNDATION REACTIONS
C         ON 10-13-24 I ADDED THE BOLTS ON THE 0 DEGREE AXIS SO THERE ARE 2 SETS OF PLATES DESIGNED NOW      
C         
      SUBROUTINE PLATE (MY,MX,VLOAD,VX,VY,AF,THK,NSIDES,orient)
C
C     THIS SUBROUTINE DESIGNS THE BASE PLATE AND ANCHOR BOLTS FOR ASCE 113 BOLT UNITY EQUATIONS
C   
C
      REAL IBLT,IXX,IYY,MX,MY,IBLTS,gapmax,TPI,FUTA,M0,MN,PHIA,PHIV,VNM,
     + VUA,NN,VN,MOMARM,HOLE,TW,LRGD,H113,VX,VY,A45,MOMRES
      real :: listdia(19) = [0.75,0.875 , 1.000, 1.125, 1.250, 1.375, 
     +  1.500, 1.625, 
     + 1.750, 1.875, 2.000, 2.250, 2.500, 2.750, 3.000, 3.250, 3.500,
     +   3.750, 4.000 ]
      real :: holedia(19) = [0.9375 ,1.0625, 1.25,1.4375,1.5625,1.6875,  ! Hole sizes
     + .8125,1.9375,  
     + 2.0625,2.1875,2.3125,2.5625,2.8125,3.0625,3.3125,3.5625,3.8125,   ! THE HOLE SIZE IS DIA + 5/16 FOR GREATER THAN 1" BOLT
     + 4.0625,4.3125 ]
      real :: TWASH(19)=[.122, .122, 0.136,.136,.136,.136,.136,0.178,   ! FROM 113 THIS IS THE THICKNESS OF THE WASHER, THESE ARE MINIMUM FOR F436
     +   .178,.178,.178,        
     + 0.24,.24,.24,.24,.24,.24,.24,.24 ] 
      real :: NUTHT(19) = [.71,.833,.956,1.079,1.187,1.31,1.433,1.556,     ! THE MINIMUM NUT HEIGHTS        
     +1.679,1.802,1.925,2.155,2.401,2.647,2.893,3.124,3.37,3.616,4.014]

      INTEGER NUMBLT, NUMWASH, NW, verbose
      character (len=1) :: orient
      CHARACTER DUMMY
      DIMENSION POS(2,400),SIGX(400),SIGY(400),BSTRS(400),BLOAD(400),
     +DIS(400),PLM(400),DIAM(75),APBLT(75),IBLTS(75),ALLOWBL(75),FU(75)
     +,TPI(75),REDIA(75),BSPACE(75),ANGLE(400),SPACE(19),NW(75),TNUT(75)    !  PHIA(75), 
     + ,RESB(75,11), RESNB(75,11),plmom(75),thik48(75),HOLE(75),TWSH(75)  ! ,PHIV(75)   ! ADDED THESE 2 RESB AND RESNB ARRAYS TO HOLD RESULTS
     + ,BSP(75)
       DATA SPACE /3., 3.5, 3.75, 3.75, 4.00, 4.25, 4.50, 4.75, 5.00 ,
     +  5.25, 5.50, 6.00, 6.50, 6.75, 7.25, 7.75, 8.25, 8.75, 9.00 /

C      RDIS(A,B)=SQRT(A*A + B*B)  ! this is an ancient FORTRAN function definition that can be replaced by hypot(x,y)
      write(10,706)
      PI=4.*ATAN(1.0)  ! THE VALUE OF PI IS USED SEVERAL PLACES
      verbose = 0
      
       open( 88,file='C:\PLS\TEMP\ABOLTS113.TXT',status='OLD',ERR=998) ! This is the new input file
       READ(88,*,ERR=998) NUMBLT, gapmax ! ADDED GAPMAX TO THE READ statement
C      !  GAPMAX IS THE NUMBER OF BOLT DIAMETERS BETWEEN T.O.C. AND BOTTOM OF BASE PLATE
       if (gapmax.le.0.0) then
           gapmax = -gapmax
           verbose = 1    ! set the verbose mode to print intermediate results
       endif 
       
       READ(88,*,ERR =998) DUMMY  
       WRITE (10,444) NUMBLT,gapmax
444    FORMAT(/2X,'THIS IS THE ABOLTS113.TXT INPUT FILE THAT WAS READ'/     
     + ' NUMBLT IS',I3,3X,'GAPMAX IS ',F8.2/ 
     + 4X,'DIAM',6X,'TPI',6X,'Fy',7X,'Fu',8X,'NW',4X,'BOLT SPACING')
       DO I=1,NUMBLT
        READ(88,*,ERR=998)DIAM(I),TPI(I),ALLOWBL(I),FU(I),NW(I), 
     +  BSP(I)  ! ADDED NUMBER OF WASHERS AND BOLT SPACING
           WRITE(10,445)DIAM(I),TPI(I),ALLOWBL(I),FU(I),NW(I),BSP(I)   ! ERROR CHECKING
445   FORMAT(4F10.4,I4,F10.2)
           APBLT(I) = (PI/4.0)*(DIAM(I)-0.9743/TPI(I))**2   ! THE BOLT AREA IN THE THREADS
           REDIA(I) = SQRT((4.0*APBLT(I))/PI)  ! THIS IS THE REDUCED DIAMETER
           IBLTS(I) = PI*((REDIA(I)**4)/64.0)   ! MOMENT OF INERTIA IN THE THREADS
           BSPACE(I) = BSP(I) * DIAM(I)  ! LET USER INPUT THE NUMBER OF BOLT DIAMETERS.  ASCE 48-19 RECCOMENDS 4 DIAMETERS
           IF(NW(I) .GT. 1) THEN
               WRITE(10,1012) NW(I) 
               
 1012 FORMAT ('  THE NUMBER OF WASHERS ',I2,' SHOULD BE 0 OR 1'//)
           ENDIF

 

0 Kudos
Steve_Lionel
Honored Contributor III
529 Views

I've seen other reports of this message, but it isn't your program. It happens when you load a VS solution that has only 32-bit configurations. You should be able to fix it by selecting Build > Configuration Manager. In the dialog that comes up, select Active solution platform > New...  In the New solution platform dialog, select x64 for the new platform and tell it to copy settings from Win32. That should do it.

If not, create a new VS solution and project and add your sources to it.

0 Kudos
GWats1
New Contributor I
374 Views

Hi Dr Fortran,

Sorry to be late on testing. I picked up a cold and am still suffering a little. I tried the Config Mgr and get another error message about x64 support. The copy from dialog 

 

I want to be careful and not corrupt my .FOR and f90 code files.  I may try to start a new solution. My other plan is to install VS2017 and configure it like my old PC.

0 Kudos
JohnNichols
Valued Contributor III
365 Views

Right click in the solution folder at the program name(IFORT) and select IFX from the compiler options at the BOTTOM of the popup box. 

Make sure DEBUG says 64 and not any cpu and if you have installed it properly it will work on code from 1968.  I have a lot of code from that era.  

If it does not work, delete the oneapi and the VS and start again and make sure you select the correct options for VS, if you do not know select them all.  

0 Kudos
GWats1
New Contributor I
330 Views

Hi John,

Thanks for the tips. I got it to compile (finally). I found the Project Properties for the solution and selected the IFX and it seems to work.  I'll have to test out the EXE once I get my Folders populated on the C: drive on this new PC. It reads a mountain of data from an XML file that I need to copy from my old PC.

 

It is a post processor that designs base plates for steel transmission poles based on bolt sizes it reads in.

0 Kudos
Reply