ivezic / dusty

Radiative transfer code Dusty
BSD 3-Clause "New" or "Revised" License
12 stars 3 forks source link

Error running on Mac OSX Catalina (v10.15.7) with GCC (v10.2.0) #7

Closed s-goldman closed 3 years ago

s-goldman commented 3 years ago

Not a fortran expert but frequent user of the code. On my new machine I get the following error when trying to compile V2. Any suggestions?

gfortran dustyV2.f -o dusty
dustyV2.f:9831:72:

 9831 | 555   amu(j)=cos(theta(j))
      |                                                                        
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 555 at (1)
dustyV2.f:9904:72:

 9904 |       if (n-1-nstop) 200, 300, 300
      |                                                                        
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
dustyV2.f:10996:72:

10996 |           if(den.eq.0.)pause 'failure in polint'
      |                                                                        
Warning: Deleted feature: PAUSE statement at (1)
dustyV2.f:11389:72:

11389 |       if (h.eq.0.) pause 'bad xa input in splint'
      |                                                                        
Warning: Deleted feature: PAUSE statement at (1)
dustyV2.f:11602:72:

11602 |       IF(x1.eq.x2) PAUSE 'you have to guess an initial range in zbrac'
      |                                                                        
Warning: Deleted feature: PAUSE statement at (1)
dustyV2.f:11676:72:

11676 |             pause 'never get here in zriddr'
      |                                                                        
Warning: Deleted feature: PAUSE statement at (1)
dustyV2.f:11680:72:

11680 |         pause 'zriddr exceed maximum iterations'
      |                                                                        
Warning: Deleted feature: PAUSE statement at (1)
dustyV2.f:11686:72:

11686 |         pause 'root must be bracketed in zriddr'
      |                                                                        
Warning: Deleted feature: PAUSE statement at (1)
dustyV2.f:9687:31:

 9687 |       CALL LINSYS(Nanal,A,yaux,coeff,error)
      |                               1
Error: Actual argument contains too few elements for dummy argument ‘x’ (4/40) at (1)
warrickball commented 3 years ago

I'm not a Dusty user but have somehow wandered in here... I successfully compiled V2 with gfortran 10.2.1 on my Fedora 33 machine by adding the -std=legacy flag. The line that caused the error still emits a warning but it appears to compile successfully. ./dusty ran to completion but I can't vouch for the output.

$ gfortran dustyV2.f -std=legacy -o dusty
dustyV2.f:9687:31:

 9687 |       CALL LINSYS(Nanal,A,yaux,coeff,error)
      |                               1
Warning: Actual argument contains too few elements for dummy argument ‘x’ (4/40) at (1)
$ ./dusty 
 Working on Input File: slab1.inp                                                                       
 model =    1
 Working on Input File: sphere1.inp                                                                     
 model =    1
Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL
s-goldman commented 3 years ago

@warrickball That seemed to do the trick! Thanks for the suggestion Warrick!

ivezic commented 3 years ago

@warrickball thanks a lot!

warrickball commented 3 years ago

No problem! Glad I could be of help as I passed by.