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 strongm 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: *

  1. Travis214

    setvbuf3f problems.

    Hello, I am attempting to change the buffering of my output to line buffering instead of full buffering. I need this because I keep having problems with machines restarting which makes me lose data because it is all sitting in a buffer. I am trying to use setvbuf3f to accomplish this. I can...
  2. Travis214

    Atomic Function Calls

    Yes if there is a context switch int will not be set but that is the problem. If another thread then sets int to 1 and gets ready to write to the file the original thread can then come back and also set int to 1. Both threads will then have a lock on the file which is what the variable int is...
  3. Travis214

    Atomic Function Calls

    I am using the GNU compiler to compile my program. To make it multithreaded I have a multithreaded C++ program that calls fortran functions. Each C++ thread passes its fortran application an integer so that only one of the fortran functions will open a file at a time(they write several lines...
  4. Travis214

    Atomic Function Calls

    Is there a way to make a function/subroutine atomic? I am attempting to create mutex like structures within Fortran but for them to be proper I need to use atomic function calls.
  5. Travis214

    Passing Type To Function Causes Data Corruption

    I have found my problem. After hours of playing around with the code someone suggested that my problem may be from an array out of bounds problem. After compliling with -fbounds-check (wish I had heard of this before now) it turned out that that was the case. So the negation was probably...
  6. Travis214

    Passing Type To Function Causes Data Corruption

    I have played around with my code a lot and found a spot where I had changed how a calculation was done to increase efficiency which included a negative sign that was not in the original. The new equation still gives valid results, but they are different. I reverted the calculation to its...
  7. Travis214

    Passing Type To Function Causes Data Corruption

    Thanks for your help. That is very similar to what I am trying to do. I have been over the code several times and I can't see anything else wrong, but I guess I will keep looking.
  8. Travis214

    Passing Type To Function Causes Data Corruption

    UPDATE: I went back and removed all of the uses of IVECTOR (and not SPINVECTOR) and I have the same problem. Maybe the first run where the results did not change was a fluke.
  9. Travis214

    Passing Type To Function Causes Data Corruption

    I have defined two simple types in a module in Fortran 95. The types are defined as: TYPE :: SPINVECTOR DOUBLE PRECISION, dimension(0:3,1:3,1:3,1:3) :: x, y, z END TYPE SPINVECTOR TYPE :: IVECTOR integer :: x, y, z END TYPE IVECTOR I am then using these types to pass information from the...

Part and Inventory Search

Back
Top