Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: FJacq
  • Order by date
  1. FJacq

    Instructions

    ????? François Jacq
  2. FJacq

    One paricular program won't add into library archive

    The name of the file does not matter : only the names of the subroutines, functions, modules... inside are important François Jacq
  3. FJacq

    Help with fortran programming

    Just a general answer : Fortran is "Turing complete", like many other programming languages. It means it can be used to program any programmable subject, including combustion. Now, programming a combustion code is too vague. For instance, I programmed myself, in two different ways, H2...
  4. FJacq

    Fortran problem matrix

    I tried to compile your program The compilation fails because of the two wrong statements : open(unit=8, file=C:\Users\ema\Desktop\ema.txt) open(unit=9, file=C:\Users\ema\Desktop\risultato.txt) The right syntax is : open(unit=8, file="C:\Users\ema\Desktop\ema.txt") open(unit=9...
  5. FJacq

    Fortran problem matrix

    What means "doesn't work" ? Is it a trouble at compile, link or run time ? What is the exact message which shows the mistake ? François Jacq
  6. FJacq

    My error: REAL cannot be declared inside labelled DO block (perhaps missing CONTAINS or END statemen

    I suspect that your "smallnumber" is far too small so your program writes nothing. François Jacq
  7. FJacq

    read and calculate an array

    Please, try to start your home work alone. If you have difficulties, then show us what you have done and what troubles you meet. Maybe, somebody will provide advices... For the moment, you have done nothing so do not expect any help at such insufficient stage ! François Jacq
  8. FJacq

    Memory leaks

    Advice : do not allocate pointer variables. Allocate only allocatable variables. If you apply that carefully, then your memory leaks will disappear automatically. Caution : I do not say that you cannot use pointer. You can of course but just to point to a memory zone already allocated...
  9. FJacq

    Auto-parallelized code runs, but why no speedup?

    Impossible to say without examing the code. But in general, it is better to implement yourself parallel instructions using OpenMP for instance. This is much more efficient than automatic parallelization. But this is not easy to do. François Jacq
  10. FJacq

    Strange linking error in gfortran

    @zmth END SUBROUTINE and END FUNCTION are REQUIRED in modules. Only the names of the subroutines or functions are optional ! For END MODULE, the keyword MODULE as well as the module name are optional. Example with INTEL compiler : module test contains subroutine titi end end...
  11. FJacq

    Complex power with float exponent resulting in NaN

    @salgerman : the syntax rk=(2,0) is correct program t complex r r=(2,0) write(*,*) r end program root@pctoutou:/media/sda6/test # gfortran t.f90 root@pctoutou:/media/sda6/test # ./a.out ( 2.00000000 , 0.00000000 ) François Jacq
  12. FJacq

    Complex power with float exponent resulting in NaN

    I think that the problem is just related 0**val . If val is an integer value greater that 0, then the result is 0 of course. But if val is a real value, then the compiler may interpret this expression as exp(val*log(0)) which is NaN. In addition I find really strange the instruction "rk=2*0"...
  13. FJacq

    TYPE variables in parallel constructs

    @Bosse7 : making gx%bmperr private is no sense in OpenMP : what about the other data within gx ? gx is a whole. It must be either private or public. François Jacq
  14. FJacq

    Strange linking error in gfortran

    @zmth : your examples are always wrong. Instead of : module contains subroutine sub1(i) i=1 end end you should write : module my_module contains subroutine sub1(i) i=1 end subroutine end module => a module must have a name. And within a module, a subroutine must...
  15. FJacq

    pointer to pointer in fortran

    Fortran deallocates automatically only allocatable objects, not pointers. So, if C has been allocated, then nullify(C) is not enough. You must first deallocate each sub-pointer (if allocated) and then deallocate C at the end of the process to free the memory. @harphool it is usually better to...
  16. FJacq

    Compiling

    Could you please show us an exact piece of your source file including spaces : you have an icon enabling to display the source code correctly. François Jacq
  17. FJacq

    Compiling

    The two message are quite explicit : - PAUSE is an old statement which does not belong to the language anymore. But this is just a warning... - you cannot have simultaneously a subroutine and a common block having the same name. This is really an error. Fix it please... François Jacq
  18. FJacq

    help me please

    SkipVought is right : we don't intend to to your home work. Anyway, I am less rigourous : If you show us what you have done up to now and if you are able to explain clearly the trouble you meet and all the attempts you have done to solve them, then perhaps, I could provide few advices...
  19. FJacq

    Initialize character string

    Taking into account your declaration, the right loop to initialize the string is : do cntr = 1, n stars(cntr:cntr) = '*' end do They are other ways too. The simplest one : stars=REPEAT('*',n) Frantois Jacq
  20. FJacq

    Initialize character string

    please, start you program with "implicit none" I suspect that the variable cntr is not declared integer. In addition, I would like to see the declaration of "n" Frantois Jacq

Part and Inventory Search

Back
Top