Page 1 of 1

Trying to test while configuring. But failed every time.

Posted: Tue Nov 01, 2016 6:46 am
by Rommel
I tried to run test using ./runtests.py

But the following message came up. Do not know how to resolve this issue. Someone gave a solution to a similar problem in a different thread. But either I did not understand or may be his solution does not work. Please help me.

:':
''''
'''':
'''';
''''''
'''''' ,`
'`,'''' ::
:' '''' ::.
' '''' :::,
'' '''', ::::
' ''''' ::::,
`, '` :'''' .:::::
;;, ;' '''' :'` `:::::.
';;; ' ''''` ;'''` ,::::::
;;;;;: '' ''''' ' ''''':::::.
;;;;;;;, .' '''' ,' `:;:'''';, ''
';;;;;;;;':` ``:';;;;;;;;:, ''; ''
,';;;;;;;;;;;;;;;;;;;;;;;;;;;;;':,` ''
`.,:::;;;:::,,.` ,' .;;` : , ,, : ''
.+ `'''' ,'`'''''' ' '.'''''' ' ''''''
'' ;'''' ,''' '' ' '''` '' ' ''
'' ''''' ,'' '' ' '' '' ' ''
', ,: ,' `' ' '' :' ' ''
'' ,' ' ' '. ' ' ''
:' ' ' ' '. ' ' ''
'' '. ;' ' '. ' ' ''
'' '' '; ' '. ' ' ''
'. ''' ''' ' '. ' ' ,',
'' ;'''': ' '. ' ' ''';
''
': : . `````````
'' `,' `:::::::::::::::::::::::,`
; `:;;;;;;;:' .,::::::::
.;;;;;;:. , ' `:::::.
.;;;;;:` .+; :::,
:;;;;:` ,:`
:;;;;. ..
;;;;,
;;;;`
.;;;
:;;
;.
;

Running on nissar-HP-ProBook-4540s -- system Linux -- ncpus 4 -- Python 2.7.12+ -- runtests.py-0.5.2
Traceback (most recent call last):
File "./runtests.py", line 606, in <module>
sys.exit(main())
File "./runtests.py", line 375, in main
build_env = BuildEnvironment(build_dir_path)
File "/home/nissar/Documents/Program/abinit-8.0.8/tests/pymods/testsuite.py", line 957, in __init__
build_dir = find_top_build_tree(build_dir)
File "/home/nissar/Documents/Program/abinit-8.0.8/tests/pymods/testsuite.py", line 783, in find_top_build_tree
raise RuntimeError("Cannot find the ABINIT build tree after %s trials" % ntrials)
RuntimeError: Cannot find the ABINIT build tree after 10 trials

Re: Trying to test while configuring. But failed every time.

Posted: Tue Nov 01, 2016 9:04 am
by gmatteo
runtests.py cannot find the abinit executable in /home/nissar/Documents/Program/abinit-8.0.8/src/98_main/abinit

If you have build the code in a different directory e.g. in /home/nissar/Documents/Program/abinit-8.0.8/tmp
cd to tmp/tests with

cd /home/nissar/Documents/Program/abinit-8.0.8/tmp/tests

and run the script with

../../tests/runtests,py --help

Re: Trying to test while configuring. But failed every time.

Posted: Wed Nov 02, 2016 5:50 am
by Rommel
I have the runtest.py file in /home/nissar/Documents/Program/abinit-8.0.8/tests directory. Though I opened a build directory under abinit-8.0.8 directory and inside the build directory somehow another test directory has been created which do not have runtest.py file. But still do not know how to link it with the executable file. I am new in Ubuntu and seek your help in this regard.

Re: Trying to test while configuring. But failed every time.

Posted: Wed Nov 02, 2016 9:58 am
by gmatteo
Though I opened a build directory under abinit-8.0.8 directory and inside the build directory somehow another test directory has been created which do not have runtest.py file


Right, the build directory does not contain runtests.py but the script is available in /home/nissar/Documents/Program/abinit-8.0.8/tests/runtests.py
and you can execute it provided that you specify its relative path (relative wrt to the directory in which you are working).
Your directory tree looks like:

abinit_home/
├── build
│   └── tests
└── tests
└── runtests.py


where build is the directory in which you have compiled abinit.
Open the terminal and go to abinit_home/build/tests i.e. the tests directory that does not contain runtests.py
Now you can invoke the python script in abinit_home/tests/ by typing:

../../tests/runtests.py

that corresponds to the absolute path abinit_home/tests/runtests.py
(/home/nissar/Documents/Program/abinit-8.0.8/tests/runtests.py in your particular case)

Re: Trying to test while configuring. But failed every time.

Posted: Fri Nov 04, 2016 11:05 am
by Rommel
Thank you sir.

I ran tests by ./runtests.py -j 4 fast and ./runtests.py paral -n 2 -j 2.

Looks successful since it shows 11 succeeded.

I went to the abinit_home/build/src/98_main and wrote `make install`

I found the following errors: Makefile:3393: recipe for target 'install-binPROGRAMS' failed
make[1]: *** [install-binPROGRAMS] Error 1
make[1]: Leaving directory '/home/nissar/Documents/Program/abinit-8.0.8/build/src/98_main'
Makefile:3726: recipe for target 'install-am' failed
make: *** [install-am] Error 2

Is it a problem?
How to solve it?

Re: Trying to test while configuring. But failed every time.

Posted: Sat Nov 05, 2016 10:33 am
by gmatteo
make install should be executed in /home/nissar/Documents/Program/abinit-8.0.8/build/src.
You may need to use `sudo make install` if the executables and other files are installed in directories
for which you need root privileges (this is the usual case if you haven't specified the installation directory with configure --prefix=DIRPATH)

Re: Trying to test while configuring. But failed every time.

Posted: Mon Nov 07, 2016 3:14 am
by Rommel
Thank you sir. At the same time I apologize for taking lot of your time.

After I went to abinit8.0.8/build/src I typed sudo make install.

But it is showing the following error.

use netcdf
1
Fatal Error: Can't open module file ‘netcdf.mod’ for reading at (1): No such file or directory
compilation terminated.
Makefile:922: recipe for target 'm_errors.o' failed
make[1]: *** [m_errors.o] Error 1
make[1]: Leaving directory '/home/nissar/Documents/Program/abinit-8.0.8/build/src/16_hideleave'
Makefile:930: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

How to solve it?

Re: Trying to test while configuring. But failed every time.

Posted: Thu Nov 24, 2016 12:05 pm
by pouillon
Just install NetCDF on your computer and make sure you have the Fortran module. It should be in /usr/include after installation.