( Hiena | 2023. 08. 29., k – 17:34 )

Ramdisk nélkül, SSD-ről futtatva:

[2023-08-29T15:43:12+02:00]  ./main -m ../codellama-7b.Q4_K_M.gguf  -i -f yourprompt.txt
Create C program which print "Hello World" to std out and exit with code 10.
*  
*/

#include <stdio.h>
#include <stdlib.h>

int main(int argc, const char** argv) {
       printf("Hello world\n");
       exit(10);
}
/*
Sample execution is below:
$ ./hello_world  
Hello world
*/

[2023-08-29T15:45:14+02:00]  

Ramdiskről futtatva:

[2023-08-29T17:18:12+02:00] ./main -m /media/valami2/codellama-7b.Q4_K_M.gguf  -i -f yourprompt.txt

 Create C program which print "Hello World" to std out and exit with code 10.
\end{blockquote}

I'm completely new to this language and don't really understand what they mean by that. So far I have tried many things, including:

\begin{code}
#include<stdio.h>
int main(void) {
    printf("Hello World");
    return 10;
}
\end{code}

But this doesn't work at all! The program just exits with code `139`. How do I solve this?

Comment: Please check the exit status of your process, you will probably find that you are getting an exit value 139 from `printf` which is typically a segmentation fault. See https://stackoverflow.com/questions/1780599 for examples.

Comment: You want to do `printf("Hello World\n");`. The `\n` tells the output stream to flush (print) and then exit. You can also use the newline character directly in

[2023-08-29T17:19:25+02:00]

 

A ramdisk érezhetően javítja a futást, még úgy is, hogy elveszi az erőforrást a LLAMA-tól.
Érdekes, hogy többször egymás után futtatva, hogyan változnak a válaszok, ugyanarra a promptra. Szintén érdekes, hogy az eőforrás monitoron látszik, mikor fut félre a gondolatmenete.