- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everybody. I posted an issue a few days back, and unfortunately another one made its appearance.
My project built smoothly (with warnings on the FluidProp module, my supervisor used the module before and told me that I should expect them) under the Win32 platform but as I ran it, it wouldn't go past one a basic instruction of opening and reading a file as you can see on this extract of my program.
Program gas1sv3 use FluidProp character(18) :: namefile1="Input.DAT" INTEGER :: iop open(unit=20,iostat=iop,file=namefile1,action="read") if (iop/=0) then write(*,'(a)') "ERROR: unable to open file ",namefile1 pause stop end if READ(20,*) GT !PLANT LAYOUT (GT/CC) READ(20,*) CONFIGURATION ! CYCLE (BASELINE/ADVANCED) READ(20,*) WFFIDP !WORKING FLUID SELECTOR READ(20,*) FFDP !FUEL SELECTOR (DP) READ(20,*) NDP !SHAFT SPEED IN RPM READ(20,*) W1DP !COMPRESSOR INLET MASS FLOW READ(20,*) P1DP !AMBIENT PRESSURE READ(20,*) T1DP !AMBIENT TEMPERATURE READ(20,*) INTPLOSSDP !TOTAL PRESSURE LOSS IN INTAKE READ(20,*) M2DP !MACH NUMBER AT COMPRESSOR 1 ENTRY READ(20,*) CPOLYDP !COMPRESSOR EFFICIENCY READ(20,*) CPRDP !COMPRESSOR PRESSURE RATIO READ(20,*) CMapNb !COMPRESSOR MAP NUMBER close(20) end program gas1sv3
My initial reaction was that the issue was that I ran the build under the Win32 platform on a 64bits proc, so naturally, I tried to build the project on the x64 platform. The build showed errors on the files of the FluidProp module.
FluidProp is a thermodynamic library that's free to use (http://www.asimptote.nl/software/fluidprop/fluidprop-details) and they provide files (see attached) for you to call fluid properties in your program. When you install FluidProp they install both x64 and x86 versions. At that point I was even more conforted in the fact that the issue was the build under Win32 and not x64.
But as I ran the sample client for FluidProp (see attached) under the x64 platform, I get 10 errors (see buildLog) all of them being "the type of the actual argument differs from the type of the dummy argument" and the client cannot be ran. BUT when the sample client is ran under the Win32 platform it runs just fine.
So, I am kind of confused right now... Why won't my program open and read my file ? Is it because I should run all of the program in x64 -which I can't do for now as FluidProp shows errors- ? Or is it because I messed up in my initial program because FluidProp runs fine when compiled under Win32 ?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you look at the build log there are many errors e.g.
FluidProp_IF.f90(110): warning #6075: The data type of the actual argument does not match the definition. [SA_COMP] res = SafeArrayPutElement(sa_Comp, i, BSTR_Comp)
sa_comp is defined as integer(4) but in this case it is actually a variable the holds a memory address so for x32 Integer(4) and for x64 Integer(8). The declaration of sa_comp should be integer(int_ptr_kind()) as this will chose 4 or 8 at compile time dependant on the build used.
At a glance most of the errors look the same. However making and running a x32 program on a x64 machine is not a problem so your initial problem on x32 with the file read is something else.
You need to run it under debug or you could put iostat
=iop on all the read statements and check if there is a read error on any of them. You do not say how the program fails. Does is crash, if so what is the message?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I launch the executable, it returns my error message : "Error: unable to open file Input.DAT". I don't have the debug information for the fluidprop binaries so i'll do the iostat test and get back to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I built your example using the 32-bit compiler, and created a text file called INPUT.DAT containing some junk in the same folder as the executable. The program ran fine and, as expected, reported errors while reading the file. Therefore, you need to make sure that the file exists in the expected place (usually, the default directory) or open the file using its full path-name.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page