Absoft User Forum

Support => Macintosh => Topic started by: Stu on March 31, 2021, 01:25:58 PM

Title: Unable to reference parameters named same in 1st 31 chars
Post by: Stu on March 31, 2021, 01:25:58 PM
We purchased Absoft Pro Fortran 2021 for macOS to compile a F2003 code with a module that defines parameters with names > 31 characters.  But < 64 per F2003.  How do I compile with Absoft?

These parameters are in a large MAIN_API module:
  INTEGER, PARAMETER :: param_number_threshold_option_subset_linear = 3
  INTEGER, PARAMETER :: param_number_threshold_option_subset_log = 4

I get compile errors when I reference these params in a driver with USE MAIN_API
print *, param_number_threshold_option_subset_linear
print *, param_number_threshold_option_subset_log

This compiles fine with gfortran and others.  How do I compile with Absoft?

And yes, modifying either name within the 1st 31 characters fixes it - but will break every other user of the API that we deliver.  This is a 15 year old gov code API with many users - no changes will be considered - they will say "then don't use Absoft".

The compile errors:

print *, param_number_threshold_option_subset_linear
           ^                                           
cf90-486 af90fe64: ERROR MAIN, File = test_timing.f90, Line = 123, Column = 10
  "param_number_threshold_option_subset_linear" has been use associated from module "MAIN_API" and at least one more module.  It must not be referenced.

print *, param_number_threshold_option_subset_log
           ^                                       
cf90-113 af90fe64: ERROR MAIN, File = test_timing.f90, Line = 124, Column = 10
  IMPLICIT NONE is specified in the local scope, therefore an explicit type must be specified for data object "param_number_threshold_option_subset_log".
Title: Re: Unable to reference parameters named same in 1st 31 chars
Post by: forumadmin on March 31, 2021, 03:56:47 PM
Unfortunately, you have a hit a hard limit in the compiler. As you have already considered and rejected the only workaround  and purchased the compiler specifically for this project, the only suggestion I can offer is to contact the Absoft sales group to request a refund.