Filename in a nested DO loop - Fortran - parallel-processing

I'm trying to write a variable filename that uses two integers. Initially, I had following which worked perfectly.
write(my_uni,"(a,i4.4,a)") "test_data",nrevs,".csv"
open(unit=11,file=my_uni,action='write',position='append')
But now I'm trying to do this which is giving me an error:
write(my_uni,"(a,i4.4,a)") "test",nrevs,"data",myrank,".csv"
open(unit=11,file=my_uni,action='write',position='append')
Can someone please help? Thanks in advance!

Related

Error encountered when running batch file - was unexpected at this time

I have encountered an error when running a batch file. It goes like this, I run test-setup.cmd which calls another batch file test-env.cmd
test-setup.cmd calls by using this line:
call %SCRIPT_HOME%\test-env.cmd
where SCRIPT_HOME is set up as SCRIPT_HOME=%~dp0
test-env.cmd has this line:
if [%TEST_HOME%] == [] set TEST_HOME=D:\Program Files\Test\test-02.2.3.Final
After running the test-setup.cmd a message appears like this:
Files\Test\test-02.2.3.Final was unexpected at this time
Note that I have setup the TEST_HOME in the system environment variables.
Please help, thank you.
The syntax of your if command is incorrect. It would work if %TEST_HOME% didn't contain any spaces, but since it does you must use double quotes:
if "%TEST_HOME%" == "" set TEST_HOME=D:\Program Files\Test\test-02.2.3.Final
Mind you, since you're just testing to see whether the variable exists, it would be a lot more efficient to do that directly:
if not defined TEST_HOME set TEST_HOME=D:\Program Files\Test\test-02.2.3.Final

IDL READFITS() syntax error

I'm trying to use the READFITS() function on IDL 8.3 on Mac 10.9.3
My input on the IDL promt:
readfits('image.fits',h, /EXTEN, /SILENT)
Result:
readfits('image.fits',h, /EXTEN, /SILENT)
^
% Syntax error.
*note: the '^' is below '/EXTEN'
Maybe it will help, so here is a link to the IDL help page on using READFITS() --> http://www.exelisvis.com/docs/readfits.html
I tried using the brackets like they show on that help page, but it still didn't work, so I'm stuck now. Didn't know if anyone here has experience reading .fits files in IDL.
ok, so it turns out the readfits procedure isn't included in IDL's original library, so I just had to download AstroLib (contains lots of useful astronomy procedures - including Readfits). The original syntax then worked.
I'm using IDL 8.2.2 on OS X 10.9.4.
Try keeping it simple first. Do these work?
readfits('image.fits')
readfits('image.fits', header)
Next try this:
readfits('image.fits', header, EXTEN_NO=0)
I suspect you really want extension number 0, not 1. See (e.g.) http://www.stsci.edu/documents/dhb/web/c02_datafiles.fm2.html.

how to get the test case name in selenium web driver in ruby?

I am newbie to Selenium and I have this doubt. Say I have a code like this
it "test_name" do
#test code enter code here
end
Is there any way I can get the "test_name" or is it possible to store that in a string and use it over there before it. Thanks ind advance
While running your tests, pass a command line argument -v.
The V stands for verbose.
So for example
ruby test.rb -v

file path error (WINDOWS) with autotest growl ( REvised)

im going through the setup on
http://www.railstutorial.org/chapters/static-pages#fig:autotest_green
and im stuck on this particular error:
ERROR READOUT: http://pastie.org/1015405
What i can see being the tell-tale issue here is the
No such file or directory - Files/rubygems-1.3.7/rails_projects/sample_app/spec/controllers/pages_controller_spec.rb
"Program Files" has been truncated to just "Files" and hence the programs cant find what its supposed to be looking for
READOUT of pages_controller_spec.rb: http://pastie.org/1015412
Looks to me like it's an issue with a space in the filepath:
c:/Program Files/rubygems-1.3.7/rails_projects/sample_app/spec/controller s/pages_controller_spec.rb
Seems that is getting translated to
Files/rubygems-1.3.7/rails_projects/sample_app/spec/controller s/pages_controller_spec.rb
be sure to always place quotes around paths that contain a space ;)
SO i finally get what you're suggesting .. and it makes sense..
'mtime' => lambda {|file_a, file_b| File.mtime(file_b) <=> File.mtime(file_a)}
the above code is what is contained on line 7 of the "options.rb"
i tried supstituting in single as well as double quotes in the following manners:
'mtime' => lambda {|"file_a", "file_b"| File.mtime("file_b") <=> File.mtime("file_a")}
and
'mtime' => lambda {|'file_a', file_b'| File.mtime('file_b') <=> File.mtime('file_a')}
both led to new/different errors soo thats now how to do it
SADLY i think this is what i didnt want to see:
https://rspec.lighthouseapp.com/projects/5645/tickets/711-autospec-fails-when-filepaths-include-spaces

VBScript Expected End 800A03F6

I am getting this error while trying to run a VBScript (note this is not in a web environment - just running a VBScript on Windows):
Line: [Last line]
Error: Expected 'End'
Code: 800A03F4
Source: Microsoft VBScript compilation error
I think it is an If statement that is not closed correctly with an "End If," but I've gone through every instance of "If" in the code and cannot find the error. Any tips or tools that could help me figure out where/why this error is occurring?
There was an "Else If" - there should be no space there: "Elseif"
http://www.w3schools.com/asp/asp_conditionals.asp
Hopefully this will help someone out in the future.
In VBScript If is not the only token that requires an End. Also look for Function's and Sub's without their appropriate end statements.

Resources