[Kratos] Application naming

Farshid Mossaiby mossaiby en yahoo.com
Mie Abr 25 10:11:49 CEST 2012


Dear Pooyan,

What I need is a simple timer with highest precision available on the system. To be honest, I do not understand the OpenMP or GPGPU compatibility; I just want to measure the "wall time" between two points in my program. No file storage or other changes required. I also do not need to record all the time slices. I can give you a suitable timing function.


About Windows compatibility, Juan told me that some changes are needed in order to compile Kratos on Windows. I have CC'd his email to you. One major thing was int64_t vs __int64 types. He was trying to add these to all files one by one. I asked him to wait until we add it globally.


Best regards,
Farshid Mossaiby



________________________________
 From: Pooyan <pooyan en cimne.upc.edu>
To: 'Riccardo Rossi' <rrossi en cimne.upc.edu>; 'Farshid Mossaiby' <mossaiby en yahoo.com>; kratos en listas.cimne.upc.edu 
Sent: Tuesday, April 24, 2012 7:05 PM
Subject: RE: [Kratos] Application naming
 

Hi Farshid,
 
Respect to the Timer, there is one in the utility of the Kratos (kratos/kratos/utilities/timer.h) which is simple to use and is compatible with OpenMP. It also has python interface and I have used it in linux and windows. However it doesn’t have GPGPU compatibility. You can extend it if you want. In my opinion the tricky part is not the timer itself but the way it reports the results. First you cannot store all information and write it at the end while its memory usage may grow unacceptably. For logging the timing in a file you must past the file to the timer in the Kratos and all its application which breaks some of the interfaces. Any suggestion or improvement is welcome!
 
Having  kratos.h, is a good idea and gives easier way to include Kratos in an application. 
 
About the windows compatibility can you please explain more the issue? 
 
Bests,
 
Pooyan.
 
From:kratos-bounces en listas.cimne.upc.edu [mailto:kratos-bounces en listas.cimne.upc.edu] On Behalf Of Riccardo Rossi
Sent: 23 April 2012 18:50
To: Farshid Mossaiby; kratos en listas.cimne.upc.edu
Subject: Re: [Kratos] Application naming
 
Hi Farshid,
      i put your answer in copy in the mailing list as you replied to me privately.

concerning the timing function, it is a little bit delicate since it should work together with OpenMP too, which makes it a little more difficult. 

if you look in openmp_utils.h there is a portable timing function which is designed to work with OpenMP compliant compilers ... i don't know if this would suit to your needs

concerning your second comment, i leave the word to Pooyan ...

ciao
Riccardo



On 04/23/2012 06:39 PM, Farshid Mossaiby wrote: 
Hi all,
 
Thank you for your comments.
 
Maybe I was not clear enough about application naming; I also support Riccardo's suggestion: MySuperbApplication while naming it internally (C++/Python stuff) and my_superb_application for the directory name. For now directory names would be enough. Would this be too hard to fix? 
 
I am OK with Space over Tab, if everyone say that's better, AND if it is consistent in the repository.
 
My other suggestions:
 
1. A high resolution, cross-platform timer function (I can give you the code) somewhere in the Kratos tree.
2. Windows compatibility (and other common things) header like "kratos.h" included in all applications, etc. as per comments from Juan.
 
What do you think?
 

________________________________

From:Riccardo Rossi <rrossi en cimne.upc.edu>
To: kratos en listas.cimne.upc.edu 
Sent: Monday, April 23, 2012 5:46 PM
Subject: Re: [Kratos] Application naming

Hi all,
          sorry for the delay in the answering.

first of all concerning the tabs or spaces, i propose the
standard style to be the result of

astyle --style=allman

if we all agree on this i will apply recursively to all .cpp and .h 
files in the repository and do a commit.
this will automatically change tabs for spaces and it will do it 
consistently through the repository.

concerning the application naming i would prefer it to be of the type

MyNewBelovedApplication

instead of

my_new_beloved_application

this second one could be ok for the name of the directory, but not for 
the python import.

in any case i believe that at this stage we can not change the name of 
existing applications since it
would break EVERYTHING.
We can think to use this rule for newly added applications as well as 
for the "quality ones" but not to what is already done.

about the comments in english i strongly agree...and i would say it is 
already supposed to be a rule!!

finally, Farshid if you sent other suggestions i missed them, could you 
please post it again?

Riccardo



On 04/23/2012 01:07 PM, Janosch Stascheit wrote:
> Hi,
>
> I strongly support Pooyan's opinion. A common IDE would not help. And I
> hate tabs ;-)
>
> Am Montag, den 23.04.2012, 13:05 +0200 schrieb Pooyan:
>> Hi,
>>
>>
>>
>> I’m completely against a common IDE because it’s a choice of taste and
>> usually the single platform ones are much better. (for example in
>> windows Visual Studio is much better than the others)
>>
>>/////
>>
>> About tab or space I prefer space because you write it once and it
>> will be the same in all editors.
>>
>>
>>
>> Bests,
>>
>>
>>
>> Pooyan.
>>
>>
>>
>> From: kratos-bounces en listas.cimne.upc.edu
>> [mailto:kratos-bounces en listas.cimne.upc.edu] On Behalf Of Farshid
>> Mossaiby
>> Sent: 23 April 2012 11:17
>> To: janosch.stascheit en rub.de; Kratos mailing list
>> Subject: Re: [Kratos] Application naming
>>
>>
>>
>>
>> Dear Janosch,
>>
>>
>>
>>
>>
>> Thank you for your email.
>>
>>
>>
>>
>>
>> I think we need to do the clean up, so Kratos seems a lot more
>> professional and homogeneous.
>>
>>
>>
>>
>>
>> About point 3, AStyle can help, as we talked with Riccardo.
>>
>>
>>
>>
>>
>> You're right, Tab size cannot be stored in the file (I mean as a
>> readable one for every editor), but I think Tab is cleaner, takes less
>> time to edit it, and quicker to navigate through.
>>
>>
>>
>>
>>
>> May I also recommend a common choice of IDE? I definitely like
>> CodeBlocks, works great on Windows as well as Linux and Mac, very
>> feature rich and actively developed. Available through Ubuntu archives
>> (sudo apt-get install codeblocks). Riccardo will not like this ;)
>>
>>
>>
>>
>>
>> Best regards,
>>
>>
>> Farshid Mossaiby
>>
>>
>>
>>
>>
>>
>> ______________________________________________________________________
>> From: Janosch Stascheit<janosch.stascheit en rub.de>
>> To: Farshid Mossaiby<mossaiby en yahoo.com>
>> Cc: Kratos mailing list<kratos en listas.cimne.upc.edu>
>> Sent: Monday, April 23, 2012 12:32 PM
>> Subject: Re: [Kratos] Application naming
>>
>>
>>
>> Dear all,
>>
>> I would definitely support the idea of cleaning this up a bit.
>>
>> 1. everything lower case with underscore and a trailing _application
>> (e.g. structural_application)
>>
>> 2. I strongly recommend "space" at a tab width of 4. This is because
>> the
>> width of tab characters cannot be stored in the file and always
>> depends
>> on the editor settings
>>
>> 3. use of the following indentation:
>> void Function( double&  param, int* param2 )
>> {
>>      //instructions;
>> }
>>
>> 4. definitely yes!
>>
>> Best regards
>> Janosch
>>
>>
>> Am Samstag, den 21.04.2012, 13:35 -0700 schrieb Farshid Mossaiby:
>>> Dear everyone,
>>>
>>>
>>> Now that everything in Kratos is being updated and cleaned up, may I
>>> suggest the following?
>>>
>>>
>>> 1. Renaming all of the applications to make them consistent, for
>>> example all lower case name, adding or removing "application"
>> suffix,
>>> etc. This will make things look much better.
>>>
>>>
>>> 2. Agreeing on using "Tab" or "Space", and a "Tab size". I suggest
>>> "Tab" and a "Tab size" of 4.
>>>
>>>
>>> 3. Agreeing on a writing style. This is very helpful.
>>>
>>>
>>> 4. Comments only in english, so everyone can use them.
>>>
>>>
>>> A few much more specific comments that sent to Pooyan and Riccardo,
>>> but no response ;)
>>>
>>>
>>>
>>> Any comments?
>>> _______________________________________________
>>> Kratos mailing list
>>> Kratos en listas.cimne.upc.edu
>>> http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/kratos
>>
>>
>>
>>
>>
>
> _______________________________________________
> Kratos mailing list
> Kratos en listas.cimne.upc.edu
> http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/kratos

_______________________________________________
Kratos mailing list
Kratos en listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/kratos
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://listas.cimne.upc.edu/pipermail/kratos/attachments/20120425/d595b85c/attachment-0001.htm 


Más información sobre la lista de distribución Kratos