- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hello,
I think that I have recently link netCDF to my Fortran program (here is the link of the discussion https://community.intel.com/t5/Intel-Fortran-Compiler/Include-netCDF-in-my-Fortran-projet/m-p/1531893#M168548). But here another challenge I have encountered "error #6784: The number of actual arguments cannot be greater than the number of dummy arguments. [NF90_OPEN]" after loading a file in my program, which is something bizarre since netCDF works fine. In [NF90_OPEN], I have passed 5 arguments which is less than the number of arguments that can be passed in [NF90_OPEN], read section 2.6 of this document
Can someone help me figure it out.
here is a screenshot.
Link kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Regardless of the documentation, if you look at the library souce code the interface of nf90_open is
function nf90_open(path, mode, ncid, chunksize)
character (len = *), intent(in ) :: path
integer, intent(in ) :: mode
integer, intent( out) :: ncid
integer, optional, intent(inout) :: chunksize
integer :: nf90_open
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
So, where can I find this function (probably in NC4F.sln) and change it is possible?
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Search for nf90_open in the solution but, no, it is not possible to change it - not in any meaningful way. I imagine the version you have is dictated by the version of netCDF binaries you have installed when configuring and generating the VS solution in CMake. I would try installing a dfferent version of https://downloads.unidata.ucar.edu/netcdf/ and reconfiguring and building netcdff but it's not something I have done.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I'm afraid you have missunderstood me. I was suggesting that you might try installing different netCDF libraries before rebuilding netcdff. Though, if it is not essential for you to read or write netCDF-4/HDF5 format files or to use parallel i/o I'd be inclined to stick with what you have.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hi Diallo, we are routing your query to the respective team for the further help. They will get back to you as soon as possible.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
@Lamine06F, it appears you are linking to the wrong version of Netcdf. nf90_open has 4 arguments in netcdf-3, and 9 arguments in netcdf-4. Your error message suggests you are linking to netcdf-3. Please change to a recent version of netcdf-4.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
@Dave_Allured , your last post brought a smile to my mind, and my face probably, the ability to count is best taught in preschool and if done properly has a 50% reduction in overall incarceration rates. I listened to a lecture on this last week. I had counted the arguments in the posted pictures and your answer seems to provide the reason.
I love programmers who make changes to standard functions like open between releases. A classic example is the binary and other data now routinely stored in DXF files, which used to be easy to replicate in Fortran, but is now tedious.
As Alan Perlis once said
I think that it's extraordinarily important that we in computer science keep fun in computing. When it started out, it was an awful lot of fun. Of course, the paying customers got shafted every now and then, and after a while we began to take their complaints seriously. We began to feel as if we really were responsible for the successful, error-free perfect use of these machines. I don't think we are. I think we're responsible for stretching them, setting them off in new directions, and keeping fun in the house. I hope the field of computer science never loses its sense of fun.
and also
Every program has (at least) two purposes: the one for which it was written and another for which it wasn't.
The one who finds the second usually makes the money.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
@JohnNichols, thank you. The OP's problem is excusable. Their counting analysis was correct and insightful. The real problem was more subtle; API change and multiple versions lurking under the bridge. A nice troll trap for novices.
Mfinnis's mistake was also understandable, with insufficiently labeled function prototypes plastered all over the internets.
I might not be a very good programmer. I am still waiting for that second purpose and the accompanying money.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
@Dave_Allured , enjoyed the comments.
The real problem is the money that is made from standard programs that stop growing and just charge a lot.
The beauty of Fortran is we can avoid this pit in the road, because one can develop one's own code.
Of course if you work at a large place, the IT will limit your options.
It is not that IT are bad, merely challenging.
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite