...
Code Block |
---|
gem install rake -v 12.3.3-user-install |
You will also need to add rake gem to your PATH in order to run gem packages.
Code Block |
---|
cd ~ nano .bashrc #add below line toat the end of the .bashrcfile export PATH="~/.gem/ruby/gems/rake-12.3.33.1.0/bin:$PATH" #to#ctrl save+ clickO #ctrl ctrl+O and ctrl+X to exitX source ~/.bashrc |
Bundler
Code Block |
---|
gem install bundler --user-install
gem install json --user-install |
Fruit_processor_gem
Download fruit_processor_gem
You will need to download and install ruby gem. It is used to auto-detect test files and generate test drivers.
You will install it only once and it will apply to any project where you use it.
Code Block |
---|
cd <somewhere outside project>
git clone --recursive https://github.com/mortele/FRUIT |
Install fruit_processor_
...
gemcd fruit_pr
Code Block |
---|
cd .FRUIT/fruit_processor_gem rake install |
...
Code Block |
---|
#file <project_dir>/test/Makefile
compiler=gfortran
option=-Wall -Wtabs -Wextra -Wno-tabs -pedantic -fbounds-check -Wuninitialized -O -g \
-Wno-unused-parameter -cpp
fruit_code = ./fruit.f90
code = ../src/*.f90 ./*_test.f90
code_gen = fruit_basket_gen.f90 fruit_driver_gen.f90
all_code = $(fruit_code) $(code) $(code_gen)
driver = fruit_driver
all : build run
build : $(driver)
fruit_basket_gen.f90 : $(code)
ruby fruit_generator.rb
fruit_driver_gen.f90 : $(code)
ruby fruit_generator.rb
fruit_driver : $(all_code)
$(compiler) $(option) $(all_code) -J ../mod -o fruit_driver
clean :
rm -f *.o *.mod *.obj fruit_driver
rm -f fruit_driver_gen.f90
rm -f fruit_basket_gen.f90
rm -f result.xml result_tmp.xml
run : $(driver)
./$(driver)
.PHONY : all clean run |
...
Code Block |
---|
cd <project_dir>/test make |
NOTE: While compiling fruit.f90 an error "Logicals must be compared with .eqv. instead of .eq." may occure. In this case you will need to modify fruit.f90 lines 912 and 913 editing ".eq." to ".eqv.". This step is needed to be done only once, during first run.