Skip to content

Commit

Permalink
clean up line ending
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Oct 3, 2024
1 parent 5519568 commit e21c005
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fortran/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ test_%:

.PHONY: clean
clean:
@rm -rf $(BUILD_DIR) test_runner
@rm -rf $(BUILD_DIR) test_runner problems.f90
3 changes: 2 additions & 1 deletion fortran/problem_linker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ for file in "$SRC_DIR"/p[0-9][0-9][0-9][0-9].f90; do
done
problem_ids_str=$(printf '%s_i4t, &\n' "${problem_ids[@]}")
# Remove the last ', &\n' for proper formatting
problem_ids_str=${problem_ids_str%, &$'\n'}
length=${#problem_ids_str}
problem_ids_str=${problem_ids_str:0:length - 3}

# Start writing to the output file
cat <<EOF1 > $OUTPUT_FILE
Expand Down
4 changes: 2 additions & 2 deletions fortran/test.f90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ subroutine process_problems()
! Loop through each problem
do i = 1, size(problem_ids)
print *, "Processing Problem ID: ", problem_ids(i)
if (is_slow(i)) then
if (is_slow(problem_ids(i))) then
print *, " This problem will take more than 60 seconds."
end if
expected = get_answer(problem_ids(i))
Expand Down Expand Up @@ -68,7 +68,7 @@ subroutine process_problems()
tmp = tmp + count_max
end if
time_elapsed = real(tmp) / real(count_rate)
if (.NOT. is_slow(i) .AND. time_elapsed > 60.0) then
if (.NOT. is_slow(problem_ids(i)) .AND. time_elapsed > 60.0) then
print *, " Error: problem ", problem_ids(i), " timed out!"
print *, " Solution took : ", time_elapsed, "s"
stop 2
Expand Down

0 comments on commit e21c005

Please sign in to comment.