Jump to content

Wikipedia:Reference desk/Archives/Computing/2016 August 14

From Wikipedia, the free encyclopedia
Computing desk
< August 13 << Jul | August | Sep >> August 15 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


August 14

[edit]

"Outsourcing" Calculations to Graphics Card's Processor

[edit]

I've read about people using high-end graphics cards for mathematical calculations, such as mining bitcoins; however, the examples I've seen all use single-purpose applications that interact with the GPU directly. Is there a way I can run an application such as R on my computer's CPU and have it "outsource" the calculation to the graphics card's GPU? This is for a new computer I'm building, and I'll be running everything on Linux. Thanks! OldTimeNESter (talk) 16:08, 14 August 2016 (UTC)[reply]

For most applications, the majority (by size) of the code remains in ordinary code and runs on your ordinary CPU, with only a specialised core of functions (those that are well-suited to very parallel calculation) written in special code for the GPU and runnig there. Programming for general(ish) purpose calculation on GPUs is done with specialised programming systems like CUDA and OpenCL. For a system like R, you'd typically write specific functions in CUDA or OpenCL and call them from R. This talks about the general idea of things, and here are a couple of pre-made R packages which speed up some functions by using GPUs. -- Finlay McWalter··–·Talk 17:40, 14 August 2016 (UTC)[reply]
MATLAB recently added GPGPU support to its parallel acceleration toolbox. If you already have algorithms written in the high-level MATLAB language, you can get certain very commonly-used functions to run faster with very little code-change: the Parallel Computing toolbox and its tutorial are worth watching. MATLAB - including its high-performance parallel computing toolbox - is not free software.
If you are using R in either a free- or commercially-available environment, it is more difficult to get GPGPU acceleration out-of-the-box unless you are ready to make major code-change. A few research groups have published their code and their support-software. Here is one non-free commercial software implementation of R with CUDA acceleration: rpud with RPUDPLUS.
Nimur (talk) 19:57, 14 August 2016 (UTC)[reply]
[1] [2] is a package for GPU computing on R with OpenCL. It also mentions a few designed for CUDA. There are I think one or more options for OpenCL [3] [4] [5] [6] if you're willing to program directly in the relatively low level OpenCL. You could of course do the same for CUDA [7] and probably find better documentation, examples and libraries albeit being limited to Nvidia GPUs. P.S. The last link it the same as given by Finlay McWalter Nil Einne (talk) 08:06, 15 August 2016 (UTC)[reply]
I have heard good things about PyCUDA. ( https://developer.nvidia.com/pycuda ). --Guy Macon (talk) 18:21, 15 August 2016 (UTC)[reply]
Thanks for the answers, everyone: I found an affordable graphics card with OpenCL support, so that's what I'll go with.OldTimeNESter (talk) 12:14, 18 August 2016 (UTC)[reply]

Search for file by date in Windows 10

[edit]

How can you search for a file by date in Windows 10? If I select a folder and click on the search field, it gives a "search" tab, which has "date modified", but it can only be today, yesterday, ... last year. I know the exact date, but it was years ago. Also, I don't know which folder it is in, and even the above doesn't come up for the drive. Bubba73 You talkin' to me? 20:19, 14 August 2016 (UTC)[reply]

Open the Start Menu and type 'cmd' to get a command shell. Then type 'cd \ to get to the root directory of your hard drive (or whatever drive the file is on. Then, type 'dir /s | find "<DATE>"', where <DATE> is in the format 01/01/2016. Note that <DATE> must be in double quotes.OldTimeNESter (talk) 21:18, 14 August 2016 (UTC)[reply]
Thanks, that worked in a round-about way. It listed the matching files, but didn't say what folders they were in. Then by entering a file name into the Windows 10 search, it listed it, but again, it does not say what folder it is in!!! (Earlier versions of Windows did.) But then by right-clicking and opening the file in Photoshop, I could select "save as" and finally see the folder it is in!
Is there a better way to search for files, by name or by date, etc, and have it show you where the file is? (The way Windows used to). Even if it is some third-party software? Bubba73 You talkin' to me? 21:30, 14 August 2016 (UTC)[reply]
In my experience, Windows search feature is worse than useless. You might try downloading Powershell, which is a free Microsoft product that gives you more advanced control over the Windows GUI. You can find it here: https://msdn.microsoft.com/en-us/powershell/mt173057.aspx. OldTimeNESter (talk) 00:54, 15 August 2016 (UTC)[reply]
It seems that Windows 10 is taking away features. I remember in Windows 7 (and earlier) that you could search for a file by date. Bubba73 You talkin' to me? 01:08, 15 August 2016 (UTC)[reply]

(EC) I've always found Windows Search a little slow and annoying when searching non indexed locations (and for various reasons I've often dislike indexing) and sometimes through up some annoying behaviour when the index has somehow ended up with problems. Especially annoying is need to at least partially re-search if you want to sort by something even if that field is already shown which greatly slows things down when things aren't indexed. (Probably the need for search filters to be able to search the content of files also confuses people.) But as far as I know, there's been minimal changes to what was possible and how the core works since Vista. Perhaps some improvements, but I don't think it's gotten worse.

Since I don't use the GUI much, I can't comment on changes to the GUI, but you can still search by date as you always could. E.g. datemodified:‎1/‎08/‎2016 .. ‎8/‎08/‎2016 still works the same as it always did as does datemodified:1/08/2016 and datemodified:>1/08/2016. I personally find it easier to type in a date most of the time (unless I need to look at a calender e.g. because of the days), but if you do want to select the date, either typing in datemodified: or simply choosing one of the options for date then clicking on the search string will show a calendar.

You can also use datecreated:, dateaccessed:, date:, datetaken: or even just created: and modified: along with other boolean operators etc.

Windows Search can actually to a lot of things, but a lot of people don't use it maybe partially due to GUI flaws but probably also because it's a bit complicated and the GUI seems to directed at the simple case so quite a bit isn't exposed via the GUI but requires a bit of reading and figuring out what to do. E.g. [8] [9] [10] covers some basics but you'll probably need to read and think more for some more complicated stuff.

Incidentally, there are multiple different views when searching, since there has been since I think Vista (definitely Windows 7), just as there also is in a general Explorer on Windows. If you're not happy with whatever view you're currently on, you can always change it. I guess the method has changed a bit since Windows 8, but this particular aspect isn't that hard. Just click on "View" in the ribbon and then click on whatever you want. Probably "Content" if you want to see the directory although you could also use "Details" and add directory (folder) to the list of tabs shown if it isn't already shown. The later does have the advantage it's easy to sort (with the earlier caveats), and personally I find it clearer. But I guess Content is useful particularly if you are searching the file contents. Again there's no harm in exploring (including thinking about what you want and reading where necessary) and figuring out what works for you.

BTW, PowerShell has been a default part of a standard Windows install since Windows 7 so I'm not sure the need to download it although it's true that new major versions of PowerShell weren't automatically updated on Windows up to and including 8.1. Although it looks like Microsoft intend to make them part of the new Windows 10 release cycles (e.g. 5.1 is part of the Anniversary Update) so I'm not sure if even that is going to be an issue unless you really need the latest right now or you're not following the release cycles (e.g. LTS).

Nil Einne (talk) 13:11, 15 August 2016 (UTC)[reply]

This would seem to work as well, Bubba73. Apparently in the search box in the top right you can type "datecreated: <date>" and search that way, since I assume you'd be looking for that instead of when you last modified it. RegistryKey(RegEdit) 12:36, 15 August 2016 (UTC)[reply]
"I assume you'd be looking for that" Is it? If so AFAIK dir /s will generally show modified date by default since Windows XP, probably DOS 6.0 or earlier. You should add /T:C if you want creation date/time. Nil Einne (talk) 13:19, 15 August 2016 (UTC)[reply]

Thanks, I haven't had a chance to read all of this yet, but the link says "Windows 10, you have to jump through a hoop or two first." It gives the example of typing in something like "modified:01/20/2003" in the search bar, and it works - quickly (the drive is indexed). I found that I could just type in the date and it worked (quickly).

In 1991 I wrote a DOS command-line program that would search a drive for a file by file name and return the path to it. I used it for many years, even after I went to Windows. I can modify that to have a GUI and also work on other criteria such as dates, but it would be slow because I don't know how to take advantage of indexing. Bubba73 You talkin' to me? 00:25, 16 August 2016 (UTC)[reply]