forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Anyone uses SDF format?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Wed Jun 01, 2022 10:46 pm    Post subject: Anyone uses SDF format? Reply with quote

One of codes i want to try uses for its IO the SDF format - comes from Self-Describing Files. Tried to install couple SDF readers but by some reason they fail to read the files. Is there any tool which is as handy as the h5dump.exe for HDF5 where you can see the structure of the SDF file and then convert content of file into ASCII or binary output with just one Command Prompt command either by hand or from Fortran source?

If not then i will just make workaround and do the read/write myself since this code is in Fortran. Of course this will be just the binary output, f# these dumb "advancements" which give you absolutely nothing if you do not work for the major big data corporation and need compatibility for many uses. The only what i need is smallest possible size and fastest possible IO speed which with Fortran is usually unparalleled being of the order of 10GB/second. And also the freedom to edit according to the needs. Darn Fortran source code of this program though is very large in size, 16MB of text, initially very confusing and most of all filled with the recent F2003 language incarnations. Bad with my own workaround approach is that i will be forced to insert this my own code into each further new version of the code unless i will convince others to incorporate it there.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Sun Jun 05, 2022 3:18 am    Post subject: Reply with quote

Also may be anyone here used EPOCH PIC code of Warwick University?

I really broke my head trying to decipher its way too modernistic source syntax full of interfaces, module procedures, pointers, include files including other include files and derived type variables... And this is only Fortran2003. Funny, but for several days i can not even find where are its major variables and what are their dimensions Smile.

You can look at its open source here https://github.com/Warwick-Plasma/epoch and see how modern Fortran lost its inherent simplicity and readability. It's like different language.

May be the problem is that i could not find any manuals with the equations and simple one page description of major variables and code flow. Before i never used any manuals (besides Clearwin)
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1884

PostPosted: Sun Jun 05, 2022 8:27 am    Post subject: Reply with quote

Dan, code that uses submodules is at least Fortran 2008.

For me, it is more the Github system that is baffling than the Fortran source. In the directory display, there are three columns. The second column is next to useless, since it often tells me about some minor change, such as "changed ENDIF to END IF". What is missing, in my view, is the purpose of the file and the size of the file. The missing information leads to my opening and viewing many source files in a usually futile attempt to discover what the purpose of each file is.

By the way, when I was trying to understand what SDF stood for, the comical "Self Destructive Format" occurred to me :) .

Do many of the people that you work with use the language Julia?
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Mon Jun 06, 2022 2:01 am    Post subject: Re: Reply with quote

mecej4 wrote:
Dan, code that uses submodules is at least Fortran 2008.

Mecej4,
Where specifically ?
As to Github usually there always exist latest functional archive.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Mon Jun 06, 2022 2:01 am    Post subject: Re: Reply with quote

mecej4 wrote:
Dan, code that uses submodules is at least Fortran 2008.

Mecej4,
Where specifically ?
As to Github, yea, but usually there always exist latest functional archive.

Would be great if this code compiled with FTN95. Interesting how many errors it will catch missed by other compilers Smile . It includes some F2003 features already. Definitely needs to add MPI multiprocessing. Single core processors are completely extinct now and single core performance of multicore processors almost not improved over the decade. Do anyone knows why 50GHz GaAs processors were not made like it was hoped decades ago? This leaves single cores no chance.
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1884

PostPosted: Mon Jun 06, 2022 4:50 am    Post subject: Reply with quote

Regarding submodules, I merely saw the word "submodule" in the middle column of https://github.com/Warwick-Plasma/epoch . I did not search the source files to locate a Fortran source that actually contains a submodule.

It is possible that "submodule" has quite another meaning in terms of Github files and how they are organized, separate from the meaning of "submodule" in Fortran 2008+.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Mon Jun 06, 2022 8:04 am    Post subject: Reply with quote

I have looked briefly at the Fortran code for "epoch". It does appear to contain sub-modules and FTN95 does not process them.

My first impression is that adding sub-modules to FTN95 would not be quick and easy. However, if there were to be a significant demand for this feature then we could at least investigate the feasibility of adding it.

Viewed from the compiler, Fortran 90 modules are not simple constructs. They can be layered (modules within modules) and within each layer you can have components that are private to that module. Implementing sub-modules by adding some kind of wrapper to Fortran 90 modules could be a major task.

As is often the case, the first task would be to understand their purpose and why Fortran programmers might want to use them.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Mon Jun 06, 2022 3:45 pm    Post subject: Reply with quote

Paul,
I do not find submodules anywhere. Which specific files have them? Are you looking at some fork or work in progress? Is this 1D, 2D or 3D version of the code? They seems were written by different people. I'm looking specifically at epoch3d version unpacked from TAR files. The Makefile generates bin folder with executable out of src directory inside epoch3d. By the way code authors claim that the code was written using Fortran2003.

UPDATE
---------
The only place "submodule" word indeed was found is completely different folder called SDF which has numerous visualization and etc tools written using variety of languages. It does not look submodules are Fortran related there. Google search claims that all Fortran compilers included submodules recently, though indeed it is not clear that there was any use of them here.

By the way adding MPI to FTN95 would probably eliminate the necessity of speeding up single core performance of FTN95 (like on Polyhedron tests etc) because all the time consuming operations and all the gain could be obtained from multi-core MPI. Same was with linear algebra with my own codes. For 20 last years I did not care that FTN95 was slower on single core performance because all the gain for me was coming from multicore parallel linear algebra which was successfully linked to FTN95 programs. And that worked like a charm despite the linear algebra obj (made with Microsoft Fortran and CVF) or dll's (gfortran, mecej4 helped here a lot) were third parties created not natively in FTN95

This program definitely was written by the crazy Fortran language Nazi. Smile Is this an advancement of Fortran or its death given that much more often used by engineers and researchers MATLAB goes exactly in opposite direction (simplicity)? They have 16MB of source text like this:

Code:
  ...................
FUNCTION pid_inner_list_holds(this, test_id, index_out) RESULT(holds)

    CLASS(particle_id_inner_list), INTENT(IN) :: this
    INTEGER(hkind), INTENT(IN) :: test_id
    INTEGER, INTENT(OUT), OPTIONAL :: index_out

 TYPE :: particle_id_hash
    PRIVATE
    CHARACTER(LEN=c_max_string_length) :: name
    TYPE(particle_id_inner_list), DIMENSION(:), ALLOCATABLE :: buckets
    INTEGER(i8) :: count, hash_gr
    INTEGER(i4) :: id_chunk_size
    CONTAINS
    PRIVATE
    PROCEDURE :: hash => pid_hash_hash
    PROCEDURE, PUBLIC :: holds => pid_hash_holds
    PROCEDURE, PUBLIC :: add => pid_hash_add
    PROCEDURE, PUBLIC :: delete => pid_hash_delete
    PROCEDURE :: init_i8 => pid_hash_init_i8
    PROCEDURE :: init_i4 => pid_hash_init_i4
    GENERIC, PUBLIC :: init => init_i8, init_i4
    PROCEDURE, PUBLIC :: optimise => pid_optimise
#ifdef USE_F03
    FINAL :: pid_hash_destructor
#endif
  END TYPE particle_id_hash
.............
.............


Not surprisingly the entire project activity dropped to one comment per year recently. No one feels comfortable touching such code and as a consequence the help is also not existent as its this main part author essentially left the project


Last edited by DanRRight on Tue Jun 07, 2022 2:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1884

PostPosted: Tue Jun 07, 2022 1:49 pm    Post subject: Reply with quote

If the authors say that the code is at level F2003, it cannot have Fortran submodules.

Furthermore, if the source code was written before around 2015, it probably did not have submodules because few Fortran compilers supported submodules at that time.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Wed Jun 08, 2022 10:36 am    Post subject: Reply with quote

I have had a brief look at SUBMODULEs and can now confirm what mecej4 has indicated.

This code does not use Fortran SUBMODULEs.

It does appear to contain some non-standard Fortran elements that would need to be accommodated in order to get it to build using FTN95. For example, it uses parameters such as _COMMIT.

The module dependencies appear to be too complex for a Plato to handle in a Plato project.

In fact, I think the dependency is cyclic. This is a list of .f90 file names against their missing modules...

shared_data needs mpi
mpi_routines needs helper
helper needs balance
balance needs boundary
boundary needs partlist
partlist needs shared_data

P.S. I only looked at the 1D code.


Last edited by PaulLaidler on Thu Jun 09, 2022 7:08 am; edited 1 time in total
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Thu Jun 09, 2022 1:35 am    Post subject: Reply with quote

Mecej4,
Publication describing this code was dated 2015.

Paul,
Based on my experience with several large codes built in other than FTN95 compilers there will be hundreds of bugs, thousands of warnings and tens thousands of comments Smile . Most of users do not look inside the codes, they just work with initial setup files to assemble their specific variants.

This code was essentially re-write from other code of different authors to modern Fortran. And it was extended in usability with many post-processing add-ons.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Sat Jun 11, 2022 8:06 am    Post subject: Reply with quote

Paul,
What specifically is _COMMIT for?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Sat Jun 11, 2022 9:27 am    Post subject: Reply with quote

Dan

I have not tried to find out.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Sun Jun 12, 2022 9:04 am    Post subject: Reply with quote

I am surprised how did you find the cyclic dependency? Just by eye it is almost impossible, the Makefile looks like a dark forest. Or MAKE utility works with FTN95 ? I never succeeded to use it before, when i tried any Makefile made for other compilers modifying them appropriately they never worked. And looks like nobody here used MAKE when i asked for help
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Sun Jun 12, 2022 10:58 am    Post subject: Reply with quote

I created a Plato project and did a build.

Sometimes Plato gets the file dependencies wrong but when it does you can just keep clicking on Build and all will come out in the wash.

If it doesn't then I suspect a fault of this kind and can trace the dependencies.

The more sensible way is to get Plato to rebuild the file dependency table. If this process fails then again a fault is probable.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group