HI EVERYONE

I would be grateful if someone could help me solving the problem with my CSH file.

I am running a simulation which runs with the qsub line in the CSH file and is followed by number of parameter which is required to run the program.

But before this i use while loop to create 150 files. In the example i use calculate the parameter $field with the help of the loop and use it in my simulation and this works. However when i try to calculate parameter ${rh} it does not work and the program goes into an infinite loop. basically i wish to calculate (1/field) and use it as an input parameter in the running the simulation

Thanks a lot.

Any help is greatly appreciated. maybe its a very stupid question for regulars of C++ but i dont get it as i am only 1 days old in the world of C++.

#!/bin/csh

@ number = 1
while ( $number < 151)
if( $number < 10 ) then
set filename = b00$number
else
if( $number < 100 ) then
set filename = b0$number
else
set filename = b$number
endif
endif

@ field = $number * 2000
@ rh = 1 / $field

qsub -l arch=sol-amd64 -cwd -N ${filename} -o ${filename}.log -j y << EOF
./rose bose \
0 1200 0 0 0 \
0 30000 0 109.5 0 \
0 20000 0 -35.0 0 \
0 0 0 0 0 0 \
0 0 0 0 0 0 \
0 0 0 0 0 0 \
3 120 0 ${field} 50000 25e-6 ${rh} 5 120 512 0 $filename
EOF

@ number += 1
end

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.