Fixed the bug reported in this forum thread, whereupon relative paths are now accepted (in the form of strings between quotation marks) as #define variable values.
I made an attempt to use path. However, I have not succeeded. I tried both single and double quotes as shown in the attached images but I get the following error
*** Invalid character / in the value…/Sector_PSWrite/MorpSmall_100keV_R0mm_SecB_part1.phsspc ***
*** of a define directive, execution stopped ***
Attached is the .flair file and other fortran files needed to compile the executable needed to run. Also attached a phase space file to be used assuming it is located in a folder above the run folder.
The way you set the relative path value to the define directive with Flair (and use the variable in your input file) looks totally fine.
With a simple input file containing this configuration, I could not reproduce any file opening issue (FLUKA 4-4.0 and Flair 3.3-1).
With your user routines instead (you forgot to share source_library_events.inc, included by source_Bias.phasespace_events_fix.f: I Included source_library.inc instead), I got:
# Reading of phase space file requested
#
*** Impossible to open file ***
PhaseSpaceFile.txt
*** on unit 1 ***
Abort called from read_phase_space_file reason Unable to open phase space file Run stopped!
STOP Unable to open phase space file
This happens to be thrown from source_library_events.inc: in read_phase_space_file, an OAUXFI tries to open the file from the file name only, not the relative path, hence the error. This occurs because in source_Bias.phasespace_events_fix.f, the relative path is trimmed to the file name only (which is then passed to read_phase_space_file). Removing the trimming in source_Bias.phasespace_events_fix.f fixed it:
However, you get a different error, possibly stemming from a similar issue. Would need to have source_library_events.inc to be able to conclude: please share it (along with your output files) if still needed.
In the meantime, I take note that the variable filename in read_phase_space_file should be renamed filepath.
Thanks for sharing the file. I tested it out: apart from the needed fix mentioned above, evth still runs properly with your configuration.
Are you really sure that you are using FLUKA v4-4.0? Could you please check by clicking Parameters (button at the bottom right) and updating paths in the FLUKA tab?
And checking the release by printing the top of RELEASE-NOTES in your fluka repo.
Ok great!
Yes, outside of the TRIM issue, the Invalid character / error could only come from a non v4-4.0 release, since the code throwing this error message was removed in v4-4.0.
Glad evth is working now!
Cheers