hodgesse1 / rfortran

Automatically exported from code.google.com/p/rfortran
0 stars 0 forks source link

Tutorial example code for IVF linking to existing RFortran #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
*** What steps will reproduce the problem?

1. When testing new version of RFortran, checkout the new code into a
separate directory (eg, RFortran_test)

2. Attempt to test the new version on your machine by running the kindly
supplied test programs (note that the previous version of RFortran will
exist on the machine, in the directory specified by the Windows environment
variable $RFortran_path$.

*** What is the expected output?

The compiled new code (RFortran+tutorials) to be tested

*** What do you see instead?

Due to the use of the Windows environment variable $RFortran_path$, the
*new* code being tested will be linking against the *old* RFortran library.

This obviously is not the intended effect and will lead to erroneous
comparison. However it is quite hard to detect, and diagnose.

*** What version of RFortran are you using?

2.0

*** Please provide any additional information below.

1. Need to check the tutorial and test project specifications for such usage.

2. I'd generally recommend not using Windows environment variables if
instead a relative path specification suffices.

Original issue reported on code.google.com by dmitri.k...@gmail.com on 10 Apr 2010 at 3:17

GoogleCodeExporter commented 8 years ago

Original comment by dmitri.k...@gmail.com on 10 Apr 2010 at 3:18

GoogleCodeExporter commented 8 years ago
sample patch attached that uses relative paths to ensure the tutes are 
associated
with their own version of RFortran (rather than an arbitrary existing version)

Original comment by dmitri.k...@gmail.com on 10 Apr 2010 at 3:50

Attachments:

GoogleCodeExporter commented 8 years ago
RE: use of $RFORTRAN_PATH variable in tutorial examples.
I understand your concerns re potentially difficult to diagnose problems. 
However, I 
prefer to continue their use because...
(1) The tutorial examples are designed for users to act like a template that 
they can 
copy and learn from. When using RFortran in their own code the relative paths 
will 
not work, whereas $RFORTRAN_PATH will
(2) Majority of users will have a single version of RFORTRAN- only the 
developers are 
likely to have multiple versions
(3) On my computer, (as I would recommend for developers) I have set-up two 
additional environment variables: RFORTRAN_REL_PATH AND RFORTRAN_DEVEL_PATH and 
in 
the set-up folder I have batch files which sets RFORTRAN_PATH to 
RFORTRAN_REL_PATH or 
RFORTRAN_DEVEL_PATH depending on which version I am working on.

I understand this a bit of overhead for developers...but the simplicity and 
convenience of using $RFORTRAN_PATH for users, outweighs this minor 
inconvenience.

Furthermore I think the suggestion of reporting the RFORTRAN_PATH to the log 
file is 
an excellent one and has been implemented. As well as several other settings to 
improve transparency. 

Original comment by mark.th...@gmail.com on 10 Apr 2010 at 4:22