added readme instructions

This commit is contained in:
Ziad Arafat committed 2023-03-22 07:43:36 -06:00
1 parent a69cdafe3b
commit 6144fdbabc
1 file changed
+63 -19
+63 -19
View File
@@ -1,32 +1,76 @@
## Usage
### Testing the fortran code
1. Clean, build, and run
2. (needs a file matrix.txt containing 12 reals separated by spaces)
### Testing each language
1. setup the perl dependency
```bash
make
```
or
```bash
make setup_perl
```
2. run all the tests. This will print the result of each language then print the original file.
```bash
make test
```
3. build
3. Run individual tests
```bash
make
make test_python
make test_perl
make test_java
```
4. Clean binaries
```
4. Delete output files
```bash
make clean
```
### Executing The python notebook
1. Install requirements
2. It's recommended to use a virtualenv
3. `pip install -r requirements.txt`
4. Now you can open the notebook in software that supports it.
5. You can run jupyter like this
1. `jupyter notebook`
2. alternatively you can use the full lab
1. `jupyter-lab`
6. now select `compiled_vs_interpreted.ipynb` in the browser
7. Just click "run all" its usually a double play sign.
8. The notebook also builds and executes the fortran code
### Executing The python program
1. Usage
```bash
# Only the input file path is a required positional argument.
# If the output is left out it will print it to stdout
usage: clean_file.py [-h] [-o OUTPUT_FILE_PATH] input_file_path
```
2. Examples
```bash
python3 clean_file.py test.txt
python3 clean_file.py test.txt -o out.txt
```
### Executing The perl program
1. Usage
```bash
# Only the input file path is a required argument.
# If the output is left out it will print it to stdout
Usage: clean_file.pl --input_file_path INPUT_FILE_PATH [--output_file_path OUTPUT_FILE_PATH]
```
2. Examples
```
perl clean_file.pl --input_file_path test.txt
perl clean_file.pl --input_file_path test.txt --output_file_path out.txt
```
### Executing The java program
1. Usage
```bash
# Only the input file path is a required positional argument.
# If the output is left out it will print it to stdout
Usage: CleanFile <input_file_path> [<output_file_path>]
```
2. Examples
```
java CleanFile.java test.txt
java CleanFile.java test.txt out.txt
```