Transition from API v1 to v2

Still aborts:

vagrant@vagrant-ubuntu-trusty-64:~$ cd toy_model_driver/

vagrant@vagrant-ubuntu-trusty-64:~/toy_model_driver$ ls

Makefile toy_model_driver.F90

vagrant@vagrant-ubuntu-trusty-64:~/toy_model_driver$ make clean

Cleaning… Model Driver… toy_model_driver.

vagrant@vagrant-ubuntu-trusty-64:~/toy_model_driver$ cd

vagrant@vagrant-ubuntu-trusty-64:~$ kim-api-v2-collections-management install system --sudo ./toy_model_driver

Enter Password :

Cleaning… Model Driver… toy_model_driver.

Creating… toy_model_driver.o.

toy_model_driver.F90:220.40:

model_compute_arguments_destroy_handle, ierr) bind©

1

Warning: Unused dummy argument ‘model_compute_arguments_destroy_handle’ at (1)

toy_model_driver.F90:219.63:

subroutine model_compute_arguments_destroy(model_compute_handle, &

1

Warning: Unused dummy argument ‘model_compute_handle’ at (1)

toy_model_driver.F90:190.62:

subroutine model_compute_arguments_create(model_compute_handle, &

1

Warning: Unused dummy argument ‘model_compute_handle’ at (1)

Creating… intermediate file… driver_init_wrapper.cpp.

Creating… driver_init_wrapper.o.

Creating… libkim-api-model-driver-v2.0.0-beta.1+GCC.linux.64bit.dynamic-load.a.

Creating… intermediate file… export-list.txt.

Creating… libkim-api-model-driver-v2.0.0-beta.1+GCC.linux.64bit.dynamic-load.so.

Creating… libkim-api-model-driver-v2.so.

rm driver_init_wrapper.cpp export-list.txt

Aborting!

Bahhh... This is getting frustrating. Very sorry for the difficulties.

Let's try it all manually:

* First let's check that all is clean and nothing is installed:

cd cd toy_model_driver
make clean cd

$ kim-api-v2-collections-management list

Look to see that everything is listed as "--empty--"

* Next, we'll build the driver

cd \~/toy\_model\_driver make
$ sudo make install-system

If this doesn't give an error, then

cd \~ kim-api-v2-collections-management list

should now show the 'toy_model_driver' entry under the System Collection listing.

Let me know if this identifies the issue.

Ryan

$sudo make install-system gave error:

vagrant@vagrant-ubuntu-trusty-64:~$ cd ~/toy_model_driver/

vagrant@vagrant-ubuntu-trusty-64:~/toy_model_driver$ make

Creating… toy_model_driver.o.

toy_model_driver.F90:220.40:

model_compute_arguments_destroy_handle, ierr) bind©

1

Warning: Unused dummy argument ‘model_compute_arguments_destroy_handle’ at (1)

toy_model_driver.F90:219.63:

subroutine model_compute_arguments_destroy(model_compute_handle, &

1

Warning: Unused dummy argument ‘model_compute_handle’ at (1)

toy_model_driver.F90:190.62:

subroutine model_compute_arguments_create(model_compute_handle, &

1

Warning: Unused dummy argument ‘model_compute_handle’ at (1)

Creating… intermediate file… driver_init_wrapper.cpp.

Creating… driver_init_wrapper.o.

Creating… libkim-api-model-driver-v2.0.0-beta.1+GCC.linux.64bit.dynamic-load.a.

Creating… intermediate file… export-list.txt.

Creating… libkim-api-model-driver-v2.0.0-beta.1+GCC.linux.64bit.dynamic-load.so.

Creating… libkim-api-model-driver-v2.so.

rm driver_init_wrapper.cpp export-list.txt

vagrant@vagrant-ubuntu-trusty-64:~/toy_model_driver$ sudo make install-system

/usr/local/libexec/kim-api-v2/kim-api-v2-collections-info: error while loading shared libraries: libkim-api-v2.so: cannot open shared object file: No such file or directory

/usr/local/libexec/kim-api-v2/kim-api-v2-collections-info: error while loading shared libraries: libkim-api-v2.so: cannot open shared object file: No such file or directory

/usr/local/lib/kim-api-v2/build_system/Makefile.ModelDriver:149: *** Invalid config file. Stop.

OK, interesting...

It seems that much of your problems are coming from the fact that the root user is not able to find the kim-api shared library...

I think this should work, but it is not for you for some reason...

Did you run this command at some point?

$ sudo ldconfig

I think that might fix everything in this case. I think the INSTALL instructions say something bout needing to do this for RedHat type machines, but I'm beginning to think that it is needed for ubuntu too...

Give it a try and let me know if that seems to fix things up.

Ryan

Yes! That two-words miracle fixed everything! :slight_smile: I confess I don’t have much idea though what it did.

Anyhow, thanks to your patient guidelines, now this is installed and I will go to next step!

Regards,
Alireza

Great! I'm glad you are on your way again....

For posterity: $ sudo ldconfig

Most linux systems create a cache of the installed system libraries so that the dynamic loader doesn't have to do a slow search though the disk for these libraries every time a command is executed. 'ldconfig' is the command that will regenerate cache to make sure it is up-to-date. When the kim-api is installed to the system directories, the cache needs to be updated in order for the kim-api library to be found.

In your case, I'm not really sure why thing were working for the user account but not for the root account... I would have expected both accounts to have trouble finding the library. Anyway, it never really hurts to do 'sudo ldconfig' to make sure things are up-to-date.

Cheers,

Ryan