LLVM Error when compiling a model for IPU [closed] - ipu

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I’ve been playing about with some of the Graphcore examples, specifically the TensorFlow CNN examples. I’ve been training ResNet with various command line options quite a few times successfully and now whatever command line I use I get the following error:
LLVM ERROR: IO failure on output stream: No space left on device
Why has the IPU run out of memory? Did a previous program exit unsuccessfully and leave the IPUs in a polluted state? A reboot helps for a while and then I run into the error again.

“Device” in this context actually refers to the host storage device rather than to the IPU device. This error is telling you that the disk being used for compilation is full. You can have a look at disk usage on an Ubuntu based host with the du or df commands. If any of the disks/filesystems are at or close to 100% full then you should delete some files to make space for compilation. The reason you are seeing reboots helping for a while is likely because the /tmp directory is being cleared; it will then fill up over time as you use the system. To mitigate against this it is advisable to have a large scratch file system on the machine you’re using to compile programs for the IPU.

Related

Google Colab: Your session crashed for an unknown reason

I am using some modelling software on Google Drive, importing the necessary python libraries for the work I'm doing and running the 3rd party software (model builder). There hasn't ever been an issue in the first two parts of this, only when running the software.
Sometimes, it crashes when I start the model builder and sometimes it crashes after some iterations (the modeling software is running anywhere from 30-1000 times depending on what type of model I'm building). So, sometimes it completes the job (as it lasts enough iterations) and other times it doesn't.
I've had the same model as this run without issue before, and I've only changed one parameter in the model, which I can't see being the cause of this error.
I understand that the error and some of the information here is quite vague, however any input on how to solve this issue would be greatly appreciated.
Update
The less populated my Google Drive is the more the code progresses, however I am only using 20% of my storage and still having these problems.

Would a Vulkan program run on a device without gpu (discrete or integrated)?

Perhaps this question could be rephrased as 'what would happen if I were to try and run a Vulkan program on a cpu-only build'.
I'm wondering whether the program would run but not produce output, crash or not build in the first place (although I expect the building process to be for a cpu architecture instead of a gpu architecture).
Would it use the on-motherboard graphics to produce output? In that case, what would happen if the program was run on a cpu-only server?
Depends on how the program initialized vulkan.
Any build can have the vulkan loader installed this is the dynamically loaded library that finds the actual driver, if that is missing the program would be unable to load the loader and may either fail to start or show an error message, depending on how they try and load that.
If no device is available then the number of devices is 0. This is again up to the application to manage. Either by going for an alternative graphics API (opengl) or a error message and failing to start.

How to recover a corrupted sd card [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Is there a free, fast way to recover the contents of an sd card? I have an sd card that originally belonged to a camera, with videos and photos on it. Recently, the camera no longer can take pictures, and the sd card looks like this on a computer.
The files and folders are replaced with random symbols, and are impossible to open.
I've tried multiple computers, and a software that didn't let me recover the images without paying. Is there a way to do it?
I recommend using a data ripper - it looks up file magic bytes, and copies the whole files into separate location. If your camera has corrupted the SD card when plugged out and in, I suppose you'll be able to recover min. 70% of data, but don't assume this, as it is computing black magic. There are many free data rippers.
Anyways, this question belongs to your camera or SD card vendor's support tracker.
Piriform Recuva is a free option:
https://www.piriform.com/recuva
The following was copied from the Piriform website Recuva documentation at the time of this writing (source):
What it can and cant do
Recuva can:
Scan through your hard drives, memory cards, and USB sticks to find files and folders you've deleted.
Tell you in advance how likely it is that your file(s) can be recovered.
Recover files that Windows can't (see Problems with Windows and file deletion)
Securely delete a file you may have previously deleted.
Recover emails you deleted 'permanently' from Microsoft Outlook Express, Mozilla Thunderbird, or Windows Live Mail.
Recover files from your iPod, iPod Nano, or iPod Shuffle (iPod Touch and iPhone not supported at this time). Recuva will even recover songs with Apple's FairPlay DRM.
Recover Canon RAW (.CRW) format image files.
Recover files from NTFS, FAT, and exFAT-formatted drives.
Bring your files back!
Recuva cannot:
Recover all files. Yes, as great as Recuva is it won't work all the time. Sometimes Windows has overwritten the area where the file used to be, or sometimes the file is too corrupted to recover.
Recover files you've deleted securely. For example, if you've used our CCleaner software to delete files using the Secure option, they're gone for good.
Securely delete certain very small files that are held in the Master File Table (MFT) and files of zero-byte length.
Recuva is capable of recovering from NAS devices, however the drive needs to be connected directly to the machine via USB/IDE/SATA. Recuva is not capable of recovering data over a network.

what is the exact role of an interpreter?

having trouble understanding the exact role of an interpreter. to quote wikipedia - "Programs in interpreted languages[1] are not translated into machine code however, although their interpreter (which may be seen as an executor or processor) typically consists of directly executable machine code (generated from assembly and/or high level language source code)."
my doubt is about this statement - "interpreter (which may be seen as an executor or processor) typically consists of directly executable machine code" ? what does that mean? interpreter is supposed to be a program .How can it 'execute' code by itself ? they have re-stated this fact by saying " interpreter is different from language translators like compilers". Can anyone clarify please ? Also what is the difference (if any) between interpreted language and machine code ?
Compiler:
Transforms your code into binary machine code which can be directly executed by the CPU. Example: C, Fortran
Interpreter:
Is a program that executes the code written by the programmer without an additional step of transformation. Example: Bash scripts, Formulas in Excel
Actually it is not that easy any more. There are many concepts between these two pols. Java is compiled into an intermediate language that is then interpreted, just-in-time compilers compile small parts of interpreted code to speed them up.
"How can it 'execute' code by itself?" Take the Excel example. If you type a calculation into a cell, Excel somehow executes the code, right? But Excel does not compile the code and run it, but it parses it and executes in a general way. Excel has a sum function that in the end is executed on the processor as an add machine command, but there is a lot to do for Excel in between.
I will briefly describe an emulator to explain the main concept mentioned in the question.
Suppose I am using Mame, a video game emulator, and select the old classic arcade "Miss PacMan". Looking at the schematic or looking directly at a PCB inside an arcade video game, it is easy to find the processor : the zilog Z80, the only large chip with 40 pins. Now, if we get the technical data for that processor, we can find the binary encoding for each instruction it can execute. Basically, it get a 8-bit data (value ranging from 0 to 255) which tells the processor what to do. In the case of the emulator, it read the byte (the exact same bytes as would do the Z80 processor inside the original miss pac-man electronic board), determine what a Z80 would do and simulate the instruction.
Some classic video game may have use a x86 processor, similar to the one currently used in most PC. Even when selecting such a game in Mame, the emulator would still read the bytes as found in that game and interpret each one the way the x86 processor would do. In other words, the emulator would not take advantage of the fact that the PC and the emulated game are using a similar processor. It would perform the same steps to emulate any game no matter if the PC on which Mame is running share any similitude with the original game.
You are asking how an interpreter could execute code? The interpreter is a program (the interpreter is just a software, not a physical processor). The wording is effectively confusing. For this sentence to make sense, we would need all the following conditions:
1 - the program to interpret is already in binary, in a machine language that can be executed directly by the processor used in your PC
2 - the program location, the exact address used, is the same as the location that you can reserve in your PC
3 - any library and any I/O occupy the exact same address
When all these condition can be meet, the interpreter could just tell the processor on your PC to stop executing the code from the interpreter but instead, "jump" in the code of the program to be interpreted. Anyone could then say : it is not an interpreter, it is just a launcher.
Maybe such an interpreter which actually does not interpret but let your processor do the real job is still useful in the following way: it could let your processor perform some of the work, but request the generation of an exception when the code to be interpreted is executing some type of instruction. For example, let the code running, but generate a "general protection error" or "trap" or "exception" when trying to execute any of the variant of "IN" or "OUT". The interpreter would take note of the I/O port being written or it would choose a value to give instead of allowing to read a real I/O port. The interpreter would then manage to get the processor "jump" in the program to interpret at the location just after the instruction "IN" or "OUT".
Normally, an interpreter read an ASCII text file, the original source code (which could be Unicode instead of ASCII), determine line by line, word by word, what a compiler would do, then simulate the task on the fly. When the original compiler would need to read many lines to fully understand the current task, the interpreter would also need to read all these lines before being able to simulate the same task.
A big advantage of an interpreter is that it can not crash. Because every instruction is simulated, it is not sensitive to any bug or malicious code. That was a big advantage at the time when computers needed to reboot after encountering any bug, at a time where reboot was taking 10 minutes or more.
Today, with fast SSD to reboot in 5 second and with reliable operating systems which can trap any error in one process and close that process without affecting the stability of the machine, there is less incentive to prefer a slow interpreter over a much faster JIT or much much faster binary executable

What is meant by dividing a process into pages in the concrete sense? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
The way I understand the notion of a 'process' is that it is a running instance of an executable program.The exe is in the secondary memory and the running instance of it is in the RAM. If this understanding is right, I would like to know what is really meant by this abstract description: 'Dividing a process into 'pages' and running some of the pages in RAM and keeping the rest in secondary memory for swapping when needed'? The question here is in the context of virtual memory.
Adding a 'programming' context to the question, following suggestions from moderators:
Say I write a small program to list the numbers from 1 to 100 (or) to print 'Hello world' (or) some desktop utility to scan a text file and print the words in the file one by one within the desktop window. Considering the final executable I have, once these programs are compiled and linked, how can the executable be 'divided' and run in parts in RAM when I run the executable? How shall I grasp and visualise the idea of what 'should be' in RAM at a point in time and what 'should not'?
You have it (the division) right there, in the virtual to physical address translation. The virtual address space is split into blocks of one or several kilobytes (typically, all of the same size), each of which can be associated with a chunk (page) of physical memory of the same size.
Those parts of the executable (or process) that haven't been used yet or haven't been used recently need not to be copied into the physical memory from the disk and so the respective portions of the virtual address space may not be associated with physical memory either. When the system becomes low on free physical memory, it may repurpose some pages, saving their contents to the disk if necessary (or not saving, if they contain read-only data/code).