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...
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...
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...
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.
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...
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...
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.
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.
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.