Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JCusolverSpSample.java:[218,26] error: no suitable method found for createDoubleMatrixHostCSR #4

Closed
mjw99 opened this issue Mar 8, 2019 · 2 comments

Comments

@mjw99
Copy link

mjw99 commented Mar 8, 2019

Hi, on the current head, I am seeing this:


 mvn clean test
....

[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/mw529/workspace/jcuda-samples/JCudaSamples/src/main/java/jcuda/jcusolver/samples/JCusolverSpSample.java:[218,26] error: no suitable method found for createDoubleMatrixHostCSR(int,int,double[],int[],int[])
[ERROR]     method DoubleMatrices.createDoubleMatrixHostCSR(DoubleMatrixHost,double) is not applicable
      (actual and formal argument lists differ in length)
    method DoubleMatrices.createDoubleMatrixHostCSR(DoubleMatrixDeviceCSR) is not applicable
      (actual and formal argument lists differ in length)
    method DoubleMatrices.createDoubleMatrixHostCSR(int,int,int) is not applicable
      (actual and formal argument lists differ in length)
/home/mw529/workspace/jcuda-samples/JCudaSamples/src/main/java/jcuda/jcusolver/samples/JCusolverSpSample.java:[897,29] error: no suitable method found for createDoubleMatrixHostCSR(int,int,double[],int[],int[])
[INFO] 2 errors 

Any suggestions?

@jcuda
Copy link
Owner

jcuda commented Mar 8, 2019

Thanks for this hint.

Indeed, the method name for creating the matrix in the jcuda-matrix-utils project had been changed from create to a somewhat more elaborate, "self documenting" createDoubleMatrixHostCSR in jcuda/jcuda-matrix-utils@284dc78

I have updated the local maven repository here in the jcuda-samples project with the latest version of the jcuda-matrix-utils, so after an update, the necessary method should be found. (Alternatively, you could just call the previous create method).

I should probably also deploy the jcuda-matrix-utils properly to Maven Central. Although it is not really a full-fledged matrix library, it is unlikely to change significantly in the near future and thus can at least be considered as a handy utility for dealing with JCusparse.

Another note: As the README also says, the jcuda-samples project is not supposed (or at least, not guaranteed) to compile without possible manual steps (e.g. it might be necessary to add some library to the classpath manually). It's rather a quarry of snippets for people to have some example to get started.

But of course, I'd like to minimize the hassle for people who check it out completely, so hints about possible caveats that can easily be avoided are always welcome.

@mjw99
Copy link
Author

mjw99 commented Mar 10, 2019

Thanks Marco, having used the updated local maven repository and this modification to the pom.xml

			<!-- Maven Shade Plugin -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>3.2.1</version>
				<executions>
					<!-- Run shade goal on package phase -->
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<transformers>
								<!-- add Main-Class to manifest file -->
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<mainClass>jcuda.driver.samples.JCudaDeviceQueryV8</mainClass>
								</transformer>
							</transformers>
						</configuration>
					</execution>
				</executions>
			</plugin>

I am obtaining the following:

mjw@lags:~/workspace/jcuda-samples/JCudaSamples$ mvn clean package
.....

mjw@lags:~/workspace/jcuda-samples/JCudaSamples$ java -jar ./target/jcuda-samples-0.0.0-SNAPSHOT.jar 
Found 1 devices
Device 0: GeForce GTX 1070 with Compute Capability 6.1
    Maximum number of threads per block                                              : 1024
    Maximum x-dimension of a block                                                   : 1024
    Maximum y-dimension of a block                                                   : 1024
    Maximum z-dimension of a block                                                   : 64

Thanks again.

@mjw99 mjw99 closed this as completed Mar 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants